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:
Anthony Ramine 2016-09-26 15:48:09 +02:00
parent b745866a4d
commit 5a42bb58f9
12 changed files with 91 additions and 36 deletions

View 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 {};

View file

@ -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;

View file

@ -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;