diff options
Diffstat (limited to 'components/script/dom/navigator.rs')
-rw-r--r-- | components/script/dom/navigator.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/components/script/dom/navigator.rs b/components/script/dom/navigator.rs index d4e4629e486..51dbf5bbfa7 100644 --- a/components/script/dom/navigator.rs +++ b/components/script/dom/navigator.rs @@ -79,7 +79,7 @@ impl NavigatorMethods for Navigator { // https://webbluetoothcg.github.io/web-bluetooth/#dom-navigator-bluetooth fn Bluetooth(&self) -> Root<Bluetooth> { - self.bluetooth.or_init(|| Bluetooth::new(self.global().r().as_global_scope())) + self.bluetooth.or_init(|| Bluetooth::new(&self.global_scope())) } // https://html.spec.whatwg.org/multipage/#navigatorlanguage @@ -89,12 +89,12 @@ impl NavigatorMethods for Navigator { // https://html.spec.whatwg.org/multipage/#dom-navigator-plugins fn Plugins(&self) -> Root<PluginArray> { - self.plugins.or_init(|| PluginArray::new(self.global().r().as_global_scope())) + self.plugins.or_init(|| PluginArray::new(&self.global_scope())) } // https://html.spec.whatwg.org/multipage/#dom-navigator-mimetypes fn MimeTypes(&self) -> Root<MimeTypeArray> { - self.mime_types.or_init(|| MimeTypeArray::new(self.global().r().as_global_scope())) + self.mime_types.or_init(|| MimeTypeArray::new(&self.global_scope())) } // https://html.spec.whatwg.org/multipage/#dom-navigator-javaenabled @@ -105,7 +105,7 @@ impl NavigatorMethods for Navigator { // https://w3c.github.io/ServiceWorker/#navigator-service-worker-attribute fn ServiceWorker(&self) -> Root<ServiceWorkerContainer> { self.service_worker.or_init(|| { - ServiceWorkerContainer::new(self.global().r().as_global_scope()) + ServiceWorkerContainer::new(&self.global_scope()) }) } |