mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Add spec links
This commit is contained in:
parent
f039827dcd
commit
233a769c67
61 changed files with 284 additions and 87 deletions
|
@ -173,22 +173,27 @@ impl<'a> WorkerGlobalScopeMethods for &'a WorkerGlobalScope {
|
|||
self.navigator.or_init(|| WorkerNavigator::new(self))
|
||||
}
|
||||
|
||||
// https://developer.mozilla.org/en-US/docs/Web/API/WorkerGlobalScope/console
|
||||
fn Console(self) -> Root<Console> {
|
||||
self.console.or_init(|| Console::new(GlobalRef::Worker(self)))
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dfn-Crypto
|
||||
fn Crypto(self) -> Root<Crypto> {
|
||||
self.crypto.or_init(|| Crypto::new(GlobalRef::Worker(self)))
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-windowbase64-btoa
|
||||
fn Btoa(self, btoa: DOMString) -> Fallible<DOMString> {
|
||||
base64_btoa(btoa)
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-windowbase64-atob
|
||||
fn Atob(self, atob: DOMString) -> Fallible<DOMString> {
|
||||
base64_atob(atob)
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-windowtimers-setinterval
|
||||
fn SetTimeout(self, _cx: *mut JSContext, callback: Rc<Function>, timeout: i32, args: Vec<HandleValue>) -> i32 {
|
||||
self.timers.set_timeout_or_interval(TimerCallback::FunctionTimerCallback(callback),
|
||||
args,
|
||||
|
@ -198,6 +203,7 @@ impl<'a> WorkerGlobalScopeMethods for &'a WorkerGlobalScope {
|
|||
self.script_chan())
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-windowtimers-setinterval
|
||||
fn SetTimeout_(self, _cx: *mut JSContext, callback: DOMString, timeout: i32, args: Vec<HandleValue>) -> i32 {
|
||||
self.timers.set_timeout_or_interval(TimerCallback::StringTimerCallback(callback),
|
||||
args,
|
||||
|
@ -207,10 +213,12 @@ impl<'a> WorkerGlobalScopeMethods for &'a WorkerGlobalScope {
|
|||
self.script_chan())
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-windowtimers-clearinterval
|
||||
fn ClearTimeout(self, handle: i32) {
|
||||
self.timers.clear_timeout_or_interval(handle);
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-windowtimers-setinterval
|
||||
fn SetInterval(self, _cx: *mut JSContext, callback: Rc<Function>, timeout: i32, args: Vec<HandleValue>) -> i32 {
|
||||
self.timers.set_timeout_or_interval(TimerCallback::FunctionTimerCallback(callback),
|
||||
args,
|
||||
|
@ -220,6 +228,7 @@ impl<'a> WorkerGlobalScopeMethods for &'a WorkerGlobalScope {
|
|||
self.script_chan())
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-windowtimers-setinterval
|
||||
fn SetInterval_(self, _cx: *mut JSContext, callback: DOMString, timeout: i32, args: Vec<HandleValue>) -> i32 {
|
||||
self.timers.set_timeout_or_interval(TimerCallback::StringTimerCallback(callback),
|
||||
args,
|
||||
|
@ -229,6 +238,7 @@ impl<'a> WorkerGlobalScopeMethods for &'a WorkerGlobalScope {
|
|||
self.script_chan())
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-windowtimers-clearinterval
|
||||
fn ClearInterval(self, handle: i32) {
|
||||
self.ClearTimeout(handle);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue