×

Welcome to TagMyCode

Please login or create account to add a snippet.
2
0
 
1
Language: Javascript
Posted by: petecocoon
Added: May 29, 2012 11:40 AM
Modified: May 29, 2012 11:42 AM
Views: 113
Original post
http://stackoverflow.com/questions/7836204/chrome-fullscreen-api
Note that the code runs only in user interaction for security reason
  1. var el = document.documentElement;
  2. var rfs =  el.requestFullScreen
  3.             || el.webkitRequestFullScreen
  4.             || el.mozRequestFullScreen
  5.             || el.requestFullscreen;
  6.  
  7. rfs.call(el);

1 comment

user07bd9 5 years ago
I think that's ok but not powerfull.
How about http://xme.im/display-fullscreen-website-using-javascript it also work in IE but can't not fullscreen a DOM element. How can we display an element in fullscreen mode in IE?

Write a comment