summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dom/webidl/Document.webidl3
-rw-r--r--modules/libpref/init/all.js3
2 files changed, 6 insertions, 0 deletions
diff --git a/dom/webidl/Document.webidl b/dom/webidl/Document.webidl
index 0b8c278fe..904b1fb77 100644
--- a/dom/webidl/Document.webidl
+++ b/dom/webidl/Document.webidl
@@ -277,8 +277,11 @@ partial interface Document {
// https://w3c.github.io/page-visibility/#extensions-to-the-document-interface
partial interface Document {
+ [Pref="dom.visibilityAPI.enabled"]
readonly attribute boolean hidden;
+ [Pref="dom.visibilityAPI.enabled"]
readonly attribute VisibilityState visibilityState;
+ [Pref="dom.visibilityAPI.enabled"]
attribute EventHandler onvisibilitychange;
};
diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js
index b8defcfbf..bee38d6c4 100644
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -155,6 +155,9 @@ pref("dom.select_events.textcontrols.enabled", true);
pref("dom.select_events.textcontrols.enabled", false);
#endif
+// Whether or not the document visbility API is enabled
+pref("dom.visibilityAPI.enabled", true);
+
// Whether or not Web Workers are enabled.
pref("dom.workers.enabled", true);