Liking cljdoc? Tell your friends :D

domina.events


capture!cljs

(capture! type listener)
(capture! content type listener)

Add an event listener to each node in a DomContent. Listens for events during the capture phase. Returns a sequence of listener keys (one for each item in the content). If content is omitted, binds a listener to the document's root element.

Add an event listener to each node in a DomContent. Listens for events during the capture phase.  Returns a sequence of listener keys (one for each item in the content). If content is omitted, binds a listener to the document's root element.
raw docstring

capture-once!cljs

(capture-once! type listener)
(capture-once! content type listener)

Add an event listener to each node in a DomContent. Listens for events during the capture phase. De-registers the listener after the first time it is invoked. Returns a sequence of listener keys (one for each item in the content). If content is omitted, binds a listener to the document's root element.

Add an event listener to each node in a DomContent. Listens for events during the capture phase. De-registers the listener after the first time it is invoked.  Returns a sequence of listener keys (one for each item in the content). If content is omitted, binds a listener to the document's root element.
raw docstring

dispatch!cljs

(dispatch! type evt-map)
(dispatch! source type evt-map)

Dispatches an event of the given type, adding the values in event map to the event object. Optionally takes an event source. If none is provided, dispatches on the document's root element. Returns false if any handlers called prevent-default, otherwise true.

Dispatches an event of the given type, adding the values in event map to the event object. Optionally takes an event source. If none is provided, dispatches on the document's root element. Returns false if any handlers called prevent-default, otherwise true.
raw docstring

dispatch-browser!cljs

(dispatch-browser! source evt)

Intended for internal/testing use only. Clients should prefer dispatch!. Dispatches an event as a simulated browser event from the given source node. Emulates capture/bubble behavior. Returns false if any handlers called prevent-default, otherwise true.

Intended for internal/testing use only. Clients should prefer dispatch!. Dispatches an event as a simulated browser event from the given source node. Emulates capture/bubble behavior. Returns false if any handlers called prevent-default, otherwise true.
raw docstring

dispatch-event-target!cljs

(dispatch-event-target! source evt)

Intended for internal/testing use only. Clients should prefer dispatch!. Dispatches an event using GClosure's event handling. The event source must extend goog.event.EventTarget

Intended for internal/testing use only. Clients should prefer dispatch!. Dispatches an event using GClosure's event handling. The event source must extend goog.event.EventTarget
raw docstring

Eventcljsprotocol

current-targetcljs

(current-target evt)

Returns the object that had the listener attached

Returns the object that had the listener attached

event-typecljs

(event-type evt)

Returns the type of the the event

Returns the type of the the event

prevent-defaultcljs

(prevent-default evt)

Prevents the default action, for example a link redirecting to a URL

Prevents the default action, for example a link redirecting to a URL

raw-eventcljs

(raw-event evt)

Returns the original GClosure event

Returns the original GClosure event

stop-propagationcljs

(stop-propagation evt)

Stops event propagation

Stops event propagation

targetcljs

(target evt)

Returns the target of the event

Returns the target of the event

get-listenerscljs

(get-listeners content type)

Returns a sequence of event listeners for all the nodes in the content of a given type.

Returns a sequence of event listeners for all the nodes in the
content of a given type.
raw docstring

listen!cljs

(listen! type listener)
(listen! content type listener)

Add an event listener to each node in a DomContent. Listens for events during the bubble phase. Returns a sequence of listener keys (one for each item in the content). If content is omitted, binds a listener to the document's root element.

Add an event listener to each node in a DomContent. Listens for events during the bubble phase. Returns a sequence of listener keys (one for each item in the content). If content is omitted, binds a listener to the document's root element.
raw docstring

listen-once!cljs

(listen-once! type listener)
(listen-once! content type listener)

Add an event listener to each node in a DomContent. Listens for events during the bubble phase. De-registers the listener after the first time it is invoked. Returns a sequence of listener keys (one for each item in the content). If content is omitted, binds a listener to the document's root element.

Add an event listener to each node in a DomContent. Listens for events during the bubble phase. De-registers the listener after the first time it is invoked.  Returns a sequence of listener keys (one for each item in the content). If content is omitted, binds a listener to the document's root element.
raw docstring

root-elementcljs


unlisten!cljs

(unlisten!)
(unlisten! content)
(unlisten! content type)

Removes event listeners from each node in the content. If a listener type is supplied, removes only listeners of that type. If content is omitted, it will remove listeners from the document's root element.

Removes event listeners from each node in the content. If a listener type is supplied, removes only listeners of that type. If content is omitted, it will remove listeners from the document's root element.
raw docstring

unlisten-by-key!cljs

(unlisten-by-key! key)

Given a listener key, removes the listener.

Given a listener key, removes the listener.
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close