mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-17 06:09:19 +00:00
Bug 1926815 Remove inline event handler from fullscreen warning notification r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D226811
This commit is contained in:
parent
99b0c1dcb4
commit
00c09d178a
@ -305,6 +305,11 @@ var FullScreen = {
|
||||
"permissions.fullscreen.allowed"
|
||||
);
|
||||
|
||||
let notificationExitButton = document.getElementById(
|
||||
"fullscreen-exit-button"
|
||||
);
|
||||
notificationExitButton.addEventListener("click", this.exitDomFullScreen);
|
||||
|
||||
// Called when the Firefox window go into fullscreen.
|
||||
addEventListener("fullscreen", this, true);
|
||||
|
||||
@ -400,6 +405,7 @@ var FullScreen = {
|
||||
},
|
||||
|
||||
exitDomFullScreen() {
|
||||
// Don't use `this` here. It does not reliably refer to this object.
|
||||
if (document.fullscreen) {
|
||||
document.exitFullscreen();
|
||||
}
|
||||
|
@ -10,7 +10,6 @@
|
||||
<html:div class="pointerlockfswarning-generic-text"
|
||||
data-l10n-id="fullscreen-warning-no-domain"></html:div>
|
||||
<html:button id="fullscreen-exit-button"
|
||||
onclick="FullScreen.exitDomFullScreen();"
|
||||
#ifdef XP_MACOSX
|
||||
data-l10n-id="fullscreen-exit-mac-button"
|
||||
#else
|
||||
|
Loading…
x
Reference in New Issue
Block a user