Search...
onPause( )
Adds an event handler that runs when playback is paused.
Description
An element can be paused by a user clicking the gallery or slideshow's
pause button or by calling its pause()
function
Notes:
When using
onPause()
on a gallery, make sure the gallery is one where theisPlayable
capability istrue
.If you change a gallery's type to one that doesn't support
onPause()
, your code may no longer function correctly.
Syntax
function onPause(handler: EventHandler): Gallery | Slideshowhandler: function EventHandler(event: Event): void
onPause Parameters
NAME
TYPE
DESCRIPTION
handler
The name of the function or the function expression to run when the element is paused.
EventHandler Parameters
NAME
TYPE
DESCRIPTION
Returns
This function does not return anything.
Return Type:
void
Mixed in from:$w.PlayableMixin
Related Content:
Was this helpful?
Get the ID of the element that has been paused
Copy Code
1$w("#myElement").onPause( (event) => {2 let targetId = event.target.id; // "myElement"3});