InterestEvent: InterestEvent() constructor - Web APIs | MDN
Syntax
js
new InterestEvent(type, init)
Parameters
type-
A string representing the type of event. For
InterestEvent, this is alwaysinterestorloseinterest. initOptional-
An object containing the following property:
sourceOptional-
An
Elementrepresenting the interest invoker element on which interest was shown or lost.
Examples
Normally, you would not use this constructor manually. A new InterestEvent object is constructed when a handler is invoked as a result of a relevant event firing.
See the Using interest invokers guide and the interest event reference page for examples.