Class type Goog.Events.eventHandler
class type eventHandler = object..end
Inherits
method disposeInternal : unit Js.meth
Disposes of this EventHandler and remove all listeners that it registered.
method handleEvent : event Js.t -> unit Js.meth
Default event handler
method listen :
(eventTarget Js.t, Dom_html.eventTarget Js.t)
Goog.Tools.Union.t ->
(Js.js_string Js.t, Js.js_string Js.t Js.js_array Js.t) Goog.Tools.Union.t ->
(unit -> unit) Js.opt ->
bool Js.t Js.opt -> eventHandler Js.t Js.meth
Listen to an event on a DOM node or EventTarget. If the function is omitted
then the EventHandler's handleEvent method will be used.
Returns This object, allowing for chaining of
calls.
method listenOnce :
(eventTarget Js.t, Dom_html.eventTarget Js.t)
Goog.Tools.Union.t ->
(Js.js_string Js.t, Js.js_string Js.t Js.js_array Js.t) Goog.Tools.Union.t ->
(unit -> unit) Js.opt ->
bool Js.t Js.opt -> eventHandler Js.t Js.meth
Listen to an event on a DOM node or EventTarget. If the function is omitted
then the EventHandler's handleEvent method will be used. After the event has
fired the event listener is removed from the target. If an array of event
types is provided, each event type will be listened to once.
Returns This object, allowing for chaining of
calls.
method listenWithWrapper :
(eventTarget Js.t, Dom_html.eventTarget Js.t)
Goog.Tools.Union.t ->
eventWrapper Js.t ->
(unit -> unit) Js.opt ->
bool Js.t Js.opt -> eventHandler Js.t Js.meth
Adds an event listener with a specific event wrapper on a DOM Node or an
object that has implemented goog.events.EventTarget. A listener can
only be added once to an object.
Returns This object, allowing for chaining of
calls.
method removeAll : unit Js.meth
Unlistens to all events.
method unlisten :
(eventTarget Js.t, Dom_html.eventTarget Js.t)
Goog.Tools.Union.t ->
(Js.js_string Js.t, Js.js_string Js.t Js.js_array Js.t) Goog.Tools.Union.t ->
(unit -> unit) Js.opt ->
bool Js.t Js.opt -> eventHandler Js.t Js.meth
Unlistens on an event.
Returns This object, allowing for chaining of
calls.
method unlistenWithWrapper :
(eventTarget Js.t, Dom_html.eventTarget Js.t)
Goog.Tools.Union.t ->
eventWrapper Js.t ->
(unit -> unit) Js.opt ->
bool Js.t Js.opt -> eventHandler Js.t Js.meth
Removes an event listener which was added with listenWithWrapper().
Returns This object, allowing for chaining of
calls.
