Static
Private
targetStatic
initThe target window to which messages will be sent.
Returns true if the target is successfully set, otherwise false.
Initializes the EventHelper with a target window.
This method sets the target window where the messages will be posted to.
Static
onReturns the EventHelper class for method chaining.
Sets up an event listener for a specific event type.
This method listens for messages of the specified event type and executes the provided function when such an event occurs.
Static
sendReturns the EventHelper class for method chaining.
Sends a message to the target window.
This method encodes a message of the specified event type and data, then posts it to the target window.
Generated using TypeDoc
Description
Helper class for managing custom events across different windows or iframes.
This class provides static methods to initialize the event system, send encoded messages, and listen for specific event types. It uses the
Base64helper
class for encoding and decoding messages.