Removes an event listener.
The name of the event.
The event handler.
Optionaloptions: boolean | EventListenerOptionsOptional event listener options or boolean.
This instance for chaining.
Adds an event listener.
The name of the event.
The event handler.
Optionaloptions: AddEventListenerOptionsOptional event listener options.
This instance for chaining.
Runs a function in the context of this JJET instance.
The synchronous function to run. this inside the function will refer to this JJET instance, and the wrapped instance is also passed as the first argument.
This instance for chaining.
node
.run(function (context) {
console.log(this.ref)
console.log(context.ref)
})
.trigger(new Event('ready'))
Dispatches an Event at the specified EventTarget.
The Event object to dispatch.
This instance for chaining.
Creates and dispatches a CustomEvent on the wrapped target.
This instance for chaining.
This is a convenience wrapper around trigger for the common case of dispatching a payload-bearing custom event.
The created event defaults to bubbles: true and composed: true.
Pass options to override those defaults.
StaticfromCreates a JJET instance from an EventTarget reference.
The EventTarget instance.
A new JJET instance.
constructor for input validation behavior.
Wraps a DOM EventTarget.
Remarks
This is the base class for all JJ wrappers that wrap an EventTarget.
See
EventTarget