onsuspend Event in JavaScript
onsuspend Event in JavaScript
The onsuspend event is used to trigger when the browser is intentionally not getting media data. This happens because the downloading is either complete or get paused.
Some of its relative events are:-
- onabort
- onemptied
- onerror
- onstalled
Syntax:-
Its syntax is:- < element onsuspend="my_script" > OR object.onsuspend= function(){my_script} OR object.addEventListener("suspend", my_script)