Note: This standard element event is not relevant for Chatbox.
Adds an event handler that runs when an element is no longer displayed in the viewable part of the current window.
An element leaves the viewport when the page is scrolled so that the
element is completely out of view. An element also leaves the viewport
if it was shown or expanded and is then hidden
or collapsed from the viewable part
of the current window.
is not fired for hidden or collapsed
elements even if they are scrolled out of view.
function onViewportLeave(handler: EventHandler): Elementhandler: function EventHandler(event: Event): void
The name of the function or the function expression to run when the element leaves the viewport.
The element on which the event is now registered.
The event that occurred.
This function does not return anything.
Was this helpful?