mirror of
https://github.com/servo/servo.git
synced 2025-06-06 00:25:37 +00:00
"Links to the multipage version of the specification are unfortunately likely to break over time." -- https://html.spec.whatwg.org/multipage/asefij.html This commit removes all references to the specific pages when viewing WHATWG using multipage mode. I went through all these links and they redirect fine. Regex used to generate this commit: `s_whatwg.org/multipage/.*#_whatwg.org/multipage/#_g`
63 lines
1.7 KiB
Rust
63 lines
1.7 KiB
Rust
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
use dom::bindings::codegen::Bindings::WorkerNavigatorBinding;
|
|
use dom::bindings::codegen::Bindings::WorkerNavigatorBinding::WorkerNavigatorMethods;
|
|
use dom::bindings::global::GlobalRef;
|
|
use dom::bindings::js::{JSRef, Temporary};
|
|
use dom::bindings::utils::{Reflector, reflect_dom_object};
|
|
use dom::navigatorinfo;
|
|
use dom::workerglobalscope::WorkerGlobalScope;
|
|
use util::str::DOMString;
|
|
|
|
// https://html.spec.whatwg.org/multipage/#workernavigator
|
|
#[dom_struct]
|
|
pub struct WorkerNavigator {
|
|
reflector_: Reflector,
|
|
}
|
|
|
|
impl WorkerNavigator {
|
|
fn new_inherited() -> WorkerNavigator {
|
|
WorkerNavigator {
|
|
reflector_: Reflector::new(),
|
|
}
|
|
}
|
|
|
|
pub fn new(global: JSRef<WorkerGlobalScope>) -> Temporary<WorkerNavigator> {
|
|
reflect_dom_object(box WorkerNavigator::new_inherited(),
|
|
GlobalRef::Worker(global),
|
|
WorkerNavigatorBinding::Wrap)
|
|
}
|
|
}
|
|
|
|
impl<'a> WorkerNavigatorMethods for JSRef<'a, WorkerNavigator> {
|
|
fn Product(self) -> DOMString {
|
|
navigatorinfo::Product()
|
|
}
|
|
|
|
fn TaintEnabled(self) -> bool {
|
|
navigatorinfo::TaintEnabled()
|
|
}
|
|
|
|
fn AppName(self) -> DOMString {
|
|
navigatorinfo::AppName()
|
|
}
|
|
|
|
fn AppCodeName(self) -> DOMString {
|
|
navigatorinfo::AppCodeName()
|
|
}
|
|
|
|
fn Platform(self) -> DOMString {
|
|
navigatorinfo::Platform()
|
|
}
|
|
|
|
fn UserAgent(self) -> DOMString {
|
|
navigatorinfo::UserAgent()
|
|
}
|
|
|
|
fn AppVersion(self) -> DOMString {
|
|
navigatorinfo::AppVersion()
|
|
}
|
|
}
|
|
|