Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

event exit fullscreen

document.getElementById('fullscreen-div').addEventListener('fullscreenchange', (event) => {
  // document.fullscreenElement will point to the element that
  // is in fullscreen mode if there is one. If not, the value
  // of the property is null.
  if (document.fullscreenElement) {
    console.log(`Element: ${document.fullscreenElement.id} entered fullscreen mode.`);
  } else {
    console.log('Leaving full-screen mode.');
  }
});

document.getElementById('toggle-fullscreen').addEventListener('click', (event) => {
  if (document.fullscreenElement) {
    // exitFullscreen is only available on the Document object.
    document.exitFullscreen();
  } else {
    document.getElementById('fullscreen-div').requestFullscreen();
  }
});
Comment

JS exit fullscreen

document.exitFullscreen();
Comment

PREVIOUS NEXT
Code Example
Javascript :: how to set disabled flag formgroup angular 
Javascript :: javascript random alphabet 
Javascript :: js onchange paramteter sring 
Javascript :: clear all intervals javascript 
Javascript :: javascript push in specific index 
Javascript :: datatable desc active 
Javascript :: vscode jsx html autocomplete 
Javascript :: get platform node 
Javascript :: separatly fetch a strings with commas inn js 
Javascript :: get nearest multiple of a number javascript 
Javascript :: js html play beep 
Javascript :: react lottie player on hover 
Javascript :: how to update all node libraries 
Javascript :: node_env is not an internal or external command error 
Javascript :: onpress image react native 
Javascript :: shuffling in js 
Javascript :: javascript get line number of error 
Javascript :: react native get current time 
Javascript :: auto comoplete off in vu js 
Javascript :: jquery change href value 
Javascript :: hnazmul hassan 
Javascript :: remove empty values from array javascript 
Javascript :: turn object to json javascript 
Javascript :: change js to json 
Javascript :: nodejs how cpu handle worker_threads 
Javascript :: nuxt window is not defined 
Javascript :: change mouse highlight color js 
Javascript :: javascript how to change anchor style 
Javascript :: js redirect to url 
Javascript :: js display only date 
ADD CONTENT
Topic
Content
Source link
Name
7+5 =