aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom')
-rw-r--r--components/script/dom/navigator.rs5
-rw-r--r--components/script/dom/workernavigator.rs5
2 files changed, 10 insertions, 0 deletions
diff --git a/components/script/dom/navigator.rs b/components/script/dom/navigator.rs
index ffbf2546a80..ee67359f859 100644
--- a/components/script/dom/navigator.rs
+++ b/components/script/dom/navigator.rs
@@ -222,6 +222,11 @@ impl NavigatorMethods<crate::DomTypeHolder> for Navigator {
to_frozen_array(&[self.Language()], cx, retval, can_gc)
}
+ /// <https://html.spec.whatwg.org/multipage/#dom-navigator-online>
+ fn OnLine(&self) -> bool {
+ true
+ }
+
// https://html.spec.whatwg.org/multipage/#dom-navigator-plugins
fn Plugins(&self) -> DomRoot<PluginArray> {
self.plugins
diff --git a/components/script/dom/workernavigator.rs b/components/script/dom/workernavigator.rs
index e3a406ed4f8..0b0e90ffd0c 100644
--- a/components/script/dom/workernavigator.rs
+++ b/components/script/dom/workernavigator.rs
@@ -105,6 +105,11 @@ impl WorkerNavigatorMethods<crate::DomTypeHolder> for WorkerNavigator {
to_frozen_array(&[self.Language()], cx, retval, can_gc)
}
+ /// <https://html.spec.whatwg.org/multipage/#dom-navigator-online>
+ fn OnLine(&self) -> bool {
+ true
+ }
+
// https://w3c.github.io/permissions/#navigator-and-workernavigator-extension
fn Permissions(&self) -> DomRoot<Permissions> {
self.permissions