Bug 1861467 - [wpt-sync] Update web-platform-tests to eedf737ce39c512d0ca3471f988972e...
[gecko.git] / dom / webidl / DocumentOrShadowRoot.webidl
blobc0952ff11154481a61f1e8a35d8954dc6cb9d409
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
4  * You can obtain one at http://mozilla.org/MPL/2.0/.
5  *
6  * The origin of this IDL file is
7  * https://dom.spec.whatwg.org/#documentorshadowroot
8  * http://w3c.github.io/webcomponents/spec/shadow/#extensions-to-the-documentorshadowroot-mixin
9  * https://wicg.github.io/construct-stylesheets/#using-constructed-stylesheets
10  */
12 interface mixin DocumentOrShadowRoot {
13   // Not implemented yet: bug 1430308.
14   // Selection? getSelection();
15   Element? elementFromPoint(float x, float y);
16   sequence<Element> elementsFromPoint(float x, float y);
18   // TODO: Avoid making these ChromeOnly, see:
19   // https://github.com/w3c/csswg-drafts/issues/556
20   [ChromeOnly]
21   Node? nodeFromPoint(float x, float y);
22   [ChromeOnly]
23   sequence<Node> nodesFromPoint(float x, float y);
25   // Not implemented yet: bug 1430307.
26   // CaretPosition? caretPositionFromPoint (float x, float y);
28   readonly attribute Element? activeElement;
29   readonly attribute StyleSheetList styleSheets;
31   readonly attribute Element? pointerLockElement;
32   [LegacyLenientSetter]
33   readonly attribute Element? fullscreenElement;
34   [BinaryName="fullscreenElement"]
35   readonly attribute Element? mozFullScreenElement;
38 // https://drafts.csswg.org/web-animations-1/#extensions-to-the-documentorshadowroot-interface-mixin
39 partial interface mixin DocumentOrShadowRoot {
40   [Func="Document::IsWebAnimationsGetAnimationsEnabled"]
41   sequence<Animation> getAnimations();
44 // https://wicg.github.io/construct-stylesheets/#using-constructed-stylesheets
45 partial interface mixin DocumentOrShadowRoot {
46   // We are using [Pure, Cached, Frozen] sequence until `FrozenArray` is implemented.
47   // See https://bugzilla.mozilla.org/show_bug.cgi?id=1236777 for more details.
48   attribute ObservableArray<CSSStyleSheet> adoptedStyleSheets;