Constructor
new WebElementEventTarget(messageManagerFn)
Parameters:
Name | Type | Description |
---|---|---|
messageManagerFn |
function | Message manager to the current browser. |
Methods
addEventListener(type, listener, onceopt)
Register an event handler of a specific event type from the content frame.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
type |
string | Event type to listen for. |
|
listener |
EventListener | Object which receives a notification (a |
|
once |
boolean |
<optional> |
Indicates that the listener should be invoked at most once after being added. If true, the listener would automatically be removed when invoked. |
removeEventListener(type, listener)
Removes an event listener.
Parameters:
Name | Type | Description |
---|---|---|
type |
string | Type of event to cease listening for. |
listener |
EventListener | Event handler to remove from the event target. |