mirror of
https://github.com/servo/servo.git
synced 2025-08-11 16:35:33 +01:00
Implement [Inline] interfaces
Inline interfaces just appear as a Rust type and in the TypeId hierarchy. They are completely invisible on the JS side.
This commit is contained in:
parent
b745866a4d
commit
5a42bb58f9
12 changed files with 91 additions and 36 deletions
10
components/script/dom/webidls/GlobalScope.webidl
Normal file
10
components/script/dom/webidls/GlobalScope.webidl
Normal file
|
@ -0,0 +1,10 @@
|
|||
/* 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/. */
|
||||
|
||||
// This interface is entirely internal to Servo, and should not be accessible to
|
||||
// web pages.
|
||||
|
||||
[Exposed=(Window,Worker),
|
||||
Inline]
|
||||
interface GlobalScope : EventTarget {};
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
// https://html.spec.whatwg.org/multipage/#window
|
||||
[PrimaryGlobal, Exposed=(Window,Worker)]
|
||||
/*sealed*/ interface Window : EventTarget {
|
||||
/*sealed*/ interface Window : GlobalScope {
|
||||
// the current browsing context
|
||||
[Unforgeable] readonly attribute WindowProxy window;
|
||||
[BinaryName="Self_", Replaceable] readonly attribute WindowProxy self;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
// https://html.spec.whatwg.org/multipage/#workerglobalscope
|
||||
[Abstract, Exposed=Worker]
|
||||
interface WorkerGlobalScope : EventTarget {
|
||||
interface WorkerGlobalScope : GlobalScope {
|
||||
[BinaryName="Self_"] readonly attribute WorkerGlobalScope self;
|
||||
readonly attribute WorkerLocation location;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue