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 event handler.
Optionaloptions: AddEventListenerOptionsOptional event listener options.
This instance for chaining.
const target = {
dispatching a plain Event object.
increment() {
this.count++
},
}
@param options Optional event initialization dictionary.
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 (jjContext) {
console.log(this.ref)
console.log(jjContext.ref)
})
.trigger(new Event('ready'))
Dispatches an Event at the specified EventTarget.
The Event object to dispatch. Since CustomEvent extends Event, you can also dispatch CustomEvent instances here.
This instance for chaining.
Creates a new CustomEvent and dispatches 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.
Creates a new Event and dispatches on the wrapped target.
The name identifying the type of the event for example 'click'
Optionaloptions: EventInitOptional event initialization dictionary.
This instance for chaining.
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