Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <head> | |
|
foolip
2016/12/02 10:52:09
head can be omitted
lunalu1
2016/12/02 19:22:06
Done.
| |
| 3 <title>Feature-Policy Fullscreen Disabled</title> | |
| 4 </head> | |
| 5 <div>Fullscreen</div> | |
| 6 <script> | |
| 7 document.onwebkitfullscreenerror = function() { | |
| 8 parent.postMessage({ type: 'error', enabled: document.webkitFullscreenEnabled }, '*'); | |
| 9 }; | |
| 10 | |
| 11 document.onwebkitfullscreenchange = function() { | |
| 12 document.webkitExitFullscreen(); | |
| 13 parent.postMessage({ type: 'change', enabled: document.webkitFullscreenEnabled }, '*'); | |
| 14 }; | |
| 15 | |
| 16 document.addEventListener('keypress', function() { | |
| 17 document.querySelector('div').webkitRequestFullscreen(); | |
| 18 }, { once: true }); | |
|
foolip
2016/12/02 10:52:09
{ once: true } is harmless here, but also not need
lunalu1
2016/12/02 19:22:06
Done.
| |
| 19 | |
| 20 window.onload = function() { | |
| 21 focus(); | |
| 22 eventSender.keyDown('a', []); | |
| 23 } | |
| 24 </script> | |
| OLD | NEW |