(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.
(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.
(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.
(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.
(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
(current-target evt)
Returns the object that had the listener attached
Returns the object that had the listener attached
(event-type evt)
Returns the type of the the event
Returns the type of the the event
(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-event evt)
Returns the original GClosure event
Returns the original GClosure event
(stop-propagation evt)
Stops event propagation
Stops event propagation
(target evt)
Returns the target of the event
Returns the target of the event
(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.
(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.
(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.
(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.
(unlisten-by-key! key)
Given a listener key, removes the listener.
Given a listener key, removes the listener.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close