Skip to content

Commit

Permalink
Move around WindowOrWorkerGlobalScope methods
Browse files Browse the repository at this point in the history
  • Loading branch information
nox committed Apr 27, 2018
1 parent d234aeb commit 88a0265
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 30 deletions.
22 changes: 0 additions & 22 deletions components/script/dom/webidls/Window.webidl
Original file line number Diff line number Diff line change
Expand Up @@ -75,28 +75,6 @@ Window implements WindowEventHandlers;
[NoInterfaceObject]
interface WindowProxy {};

// https://html.spec.whatwg.org/multipage/#timers
[NoInterfaceObject, Exposed=(Window,Worker)]
interface WindowTimers {
long setTimeout(Function handler, optional long timeout = 0, any... arguments);
long setTimeout(DOMString handler, optional long timeout = 0, any... arguments);
void clearTimeout(optional long handle = 0);
long setInterval(Function handler, optional long timeout = 0, any... arguments);
long setInterval(DOMString handler, optional long timeout = 0, any... arguments);
void clearInterval(optional long handle = 0);
};
Window implements WindowTimers;

// https://html.spec.whatwg.org/multipage/#atob
[NoInterfaceObject, Exposed=(Window,Worker)]
interface WindowBase64 {
[Throws]
DOMString btoa(DOMString btoa);
[Throws]
DOMString atob(DOMString atob);
};
Window implements WindowBase64;

// https://html.spec.whatwg.org/multipage/#Window-partial
partial interface Window {
void captureEvents();
Expand Down
17 changes: 11 additions & 6 deletions components/script/dom/webidls/WindowOrWorkerGlobalScope.webidl
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,26 @@

// https://html.spec.whatwg.org/multipage/#windoworworkerglobalscope

// FIXME(nox): https://github.com/servo/servo/issues/20700
// typedef (DOMString or Function) TimerHandler;

[NoInterfaceObject, Exposed=(Window,Worker)]
interface WindowOrWorkerGlobalScope {
// [Replaceable] readonly attribute USVString origin;

// base64 utility methods
// DOMString btoa(DOMString data);
// DOMString atob(DOMString data);
[Throws] DOMString btoa(DOMString data);
[Throws] DOMString atob(DOMString data);

// timers
// long setTimeout(TimerHandler handler, optional long timeout = 0, any... arguments);
// void clearTimeout(optional long handle = 0);
// long setInterval(TimerHandler handler, optional long timeout = 0, any... arguments);
// void clearInterval(optional long handle = 0);
// FIXME(nox): https://github.com/servo/servo/issues/20700
long setTimeout(Function handler, optional long timeout = 0, any... arguments);
long setTimeout(DOMString handler, optional long timeout = 0, any... arguments);
void clearTimeout(optional long handle = 0);
// FIXME(nox): https://github.com/servo/servo/issues/20700
long setInterval(Function handler, optional long timeout = 0, any... arguments);
long setInterval(DOMString handler, optional long timeout = 0, any... arguments);
void clearInterval(optional long handle = 0);

// ImageBitmap
// Promise<ImageBitmap> createImageBitmap(ImageBitmapSource image, optional ImageBitmapOptions options);
Expand Down
2 changes: 0 additions & 2 deletions components/script/dom/webidls/WorkerGlobalScope.webidl
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,3 @@ partial interface WorkerGlobalScope { // not obsolete
void importScripts(DOMString... urls);
readonly attribute WorkerNavigator navigator;
};
WorkerGlobalScope implements WindowTimers;
WorkerGlobalScope implements WindowBase64;

0 comments on commit 88a0265

Please sign in to comment.