Skip to content

Instantly share code, notes, and snippets.

@mikeconley
Created November 26, 2018 19:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikeconley/73a0ee8af8eeb5f8b085f4bd8319dfd4 to your computer and use it in GitHub Desktop.
Save mikeconley/73a0ee8af8eeb5f8b085f4bd8319dfd4 to your computer and use it in GitHub Desktop.
diff --git a/browser/base/content/content.js b/browser/base/content/content.js
--- a/browser/base/content/content.js
+++ b/browser/base/content/content.js
@@ -67,8 +67,12 @@ addEventListener("DOMAutoComplete", func
ContentMetaHandler.init(this);
// This is a temporary hack to prevent regressions (bug 1471327).
void content;
addEventListener("DOMWindowFocus", function(event) {
sendAsyncMessage("DOMWindowFocus", {});
}, false);
+
+addEventListener("mconleytest", function() {
+ dump("Saw the event!\n\n");
+}, true, true);
diff --git a/toolkit/content/widgets/videocontrols.js b/toolkit/content/widgets/videocontrols.js
--- a/toolkit/content/widgets/videocontrols.js
+++ b/toolkit/content/widgets/videocontrols.js
@@ -1285,16 +1285,17 @@ this.VideoControlsImplPageWidget = class
// controlling volume.
},
get isVideoInFullScreen() {
return this.document.mozFullScreenElement == this.shadowRoot.host;
},
toggleFullscreen() {
+ this.videocontrols.dispatchEvent(new this.window.CustomEvent("mconleytest"));
this.isVideoInFullScreen ?
this.document.mozCancelFullScreen() :
this.video.mozRequestFullScreen();
},
setFullscreenButtonState() {
if (this.isAudioOnly || !this.document.mozFullScreenEnabled) {
this.controlBar.setAttribute("fullscreen-unavailable", true);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment