mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Auto merge of #12457 - johannhof:worker-global, r=Ms2ger
Expose Worker interfaces only to Worker <!-- Please describe your changes on the following line: --> Partial #12415. Let me know if you suspect some other tests may be affected by this. r? @Ms2ger --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors <!-- Either: --> - [x] There (sorta) are tests for these changes <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12457) <!-- Reviewable:end -->
This commit is contained in:
commit
efa5a0329a
6 changed files with 7 additions and 18 deletions
|
@ -4,7 +4,8 @@
|
|||
|
||||
// https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#service-worker-global-scope
|
||||
|
||||
[Global=(Worker,ServiceWorker), Pref="dom.serviceworker.enabled"]
|
||||
[Global=(Worker,ServiceWorker), Exposed=ServiceWorker,
|
||||
Pref="dom.serviceworker.enabled"]
|
||||
interface ServiceWorkerGlobalScope : WorkerGlobalScope {
|
||||
// A container for a list of Client objects that correspond to
|
||||
// browsing contexts (or shared workers) that are on the origin of this SW
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#workerglobalscope
|
||||
[Abstract, Exposed=(Window,Worker)]
|
||||
[Abstract, Exposed=Worker]
|
||||
interface WorkerGlobalScope : EventTarget {
|
||||
[BinaryName="Self_"] readonly attribute WorkerGlobalScope self;
|
||||
readonly attribute WorkerLocation location;
|
||||
|
@ -16,7 +16,7 @@ interface WorkerGlobalScope : EventTarget {
|
|||
};
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#WorkerGlobalScope-partial
|
||||
[Exposed=(Window,Worker)]
|
||||
[Exposed=Worker]
|
||||
partial interface WorkerGlobalScope { // not obsolete
|
||||
[Throws]
|
||||
void importScripts(DOMString... urls);
|
||||
|
@ -26,7 +26,7 @@ WorkerGlobalScope implements WindowTimers;
|
|||
WorkerGlobalScope implements WindowBase64;
|
||||
|
||||
// Proprietary
|
||||
[Exposed=(Window,Worker)]
|
||||
[Exposed=Worker]
|
||||
partial interface WorkerGlobalScope {
|
||||
[Replaceable]
|
||||
readonly attribute Console console;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#worker-locations
|
||||
[Exposed=(Window,Worker)]
|
||||
[Exposed=Worker]
|
||||
interface WorkerLocation {
|
||||
/*stringifier*/ readonly attribute USVString href;
|
||||
// readonly attribute USVString origin;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#workernavigator
|
||||
[Exposed=(Window,Worker)]
|
||||
[Exposed=Worker]
|
||||
interface WorkerNavigator {};
|
||||
WorkerNavigator implements NavigatorID;
|
||||
WorkerNavigator implements NavigatorLanguage;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue