Make sure events are stopped at the capturing phase, instead of the target phase.
This commit is contained in:
Родитель
5c02cf103f
Коммит
6477ecd015
|
@ -4,15 +4,15 @@
|
|||
Object.defineProperties(document.wrappedJSObject,
|
||||
{ 'hidden': {value: false}, 'visibilityState': {value: 'visible'} });
|
||||
|
||||
document.addEventListener(
|
||||
window.addEventListener(
|
||||
'visibilitychange', evt => evt.stopImmediatePropagation(), true);
|
||||
|
||||
// Fullscreen API
|
||||
document.addEventListener('fullscreenchange', evt => {
|
||||
window.addEventListener('fullscreenchange', evt => {
|
||||
Object.defineProperties(document.wrappedJSObject,
|
||||
{ 'fullscreenEnabled': {value: true},
|
||||
'fullscreen': {value: true},
|
||||
'fullscreenElement': {value: document.fullscreenElement.wrappedJSObject}});
|
||||
document.addEventListener(
|
||||
window.addEventListener(
|
||||
'fullscreenchange', evt => evt.stopImmediatePropagation(), true);
|
||||
}, { capture: true, once: true });
|
||||
|
|
Загрузка…
Ссылка в новой задаче