Javascript DOM fullscreenerror Event

Introduction

The fullscreenerror event occurs when an element can not be viewed in full screen mode.

This event requires specific prefixes to work in different browsers.

Use the element.requestFullscreen() method to view an element in full screen mode.

Use the element.exitFullscreen() method to cancel full screen mode.

* Standard syntax */ //  w  ww  .  j  ava2 s . com
document.addEventListener("fullscreenerror", function() { ? ... }); 

/* Firefox */ 
document.addEventListener("mozfullscreenerror", function() { ? ... }); 

/* Chrome, Safari and Opera */ 
document.addEventListener("webkitfullscreenerror", function() { ? ... }); 

/* IE / Edge */ 
document.addEventListener("msfullscreenerror", function() { ? ... });

In JavaScript:

object.onfullscreenerror = function(){myScript};

In JavaScript, using the addEventListener() method:

object.addEventListener("fullscreenerror",myScript);
Bubbles: Yes
Cancelable: No
Event type: Event
Supported HTML tags: ALL HTML elements



PreviousNext

Related