The EventTarget.addEventListener() method registers the specified listener on the EventTarget it's called on.
Disconnects the port,so it is no longer active.
Dispatches an Event at the specified EventTarget, invoking the affected EventListeners in the appropriate order.
An EventListener, called whenever an MessageEvent of type message is fired on the port — that is, when the port receives a message.
Sends a message from the port, and optionally, transfers ownership of objects to other browsing contexts.
The message you want to send through the channel. This can be of any basic data type. Multiple data items can be sent as an array.
Removes the event listener previously registered with EventTarget.addEventListener.