mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Most of the code refactoring needed to be done is done with this commit.
This commit is contained in:
parent
dbec9d8454
commit
883902bd97
86 changed files with 469 additions and 469 deletions
|
@ -21,7 +21,7 @@ pub struct Navigator {
|
|||
bluetooth: MutNullableHeap<JS<Bluetooth>>,
|
||||
plugins: MutNullableHeap<JS<PluginArray>>,
|
||||
mime_types: MutNullableHeap<JS<MimeTypeArray>>,
|
||||
serviceWorker: MutNullableHeap<JS<ServiceWorkerContainer>>,
|
||||
service_worker: MutNullableHeap<JS<ServiceWorkerContainer>>,
|
||||
}
|
||||
|
||||
impl Navigator {
|
||||
|
@ -31,7 +31,7 @@ impl Navigator {
|
|||
bluetooth: Default::default(),
|
||||
plugins: Default::default(),
|
||||
mime_types: Default::default(),
|
||||
serviceWorker: Default::default(),
|
||||
service_worker: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -105,7 +105,7 @@ impl NavigatorMethods for Navigator {
|
|||
|
||||
// https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#navigator-service-worker-attribute
|
||||
fn ServiceWorker(&self) -> Root<ServiceWorkerContainer> {
|
||||
self.serviceWorker.or_init(|| ServiceWorkerContainer::new(self.global().r()))
|
||||
self.service_worker.or_init(|| ServiceWorkerContainer::new(self.global().r()))
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-navigator-cookieenabled
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue