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/.
6 * https://dom.spec.whatwg.org/#interface-document
7 * https://html.spec.whatwg.org/multipage/dom.html#the-document-object
8 * https://html.spec.whatwg.org/multipage/obsolete.html#other-elements%2C-attributes-and-apis
9 * https://fullscreen.spec.whatwg.org/#api
10 * https://w3c.github.io/pointerlock/#extensions-to-the-document-interface
11 * https://w3c.github.io/pointerlock/#extensions-to-the-documentorshadowroot-mixin
12 * https://w3c.github.io/page-visibility/#extensions-to-the-document-interface
13 * https://drafts.csswg.org/cssom/#extensions-to-the-document-interface
14 * https://drafts.csswg.org/cssom-view/#extensions-to-the-document-interface
15 * https://wicg.github.io/feature-policy/#policy
16 * https://wicg.github.io/scroll-to-text-fragment/#feature-detectability
19 interface ContentSecurityPolicy;
21 interface WindowProxy;
22 interface nsISupports;
24 interface nsIDocShell;
25 interface nsILoadGroup;
26 interface nsIReferrerInfo;
27 interface nsICookieJarSettings;
28 interface nsIPermissionDelegateHandler;
29 interface XULCommandDispatcher;
31 enum VisibilityState { "hidden", "visible" };
33 /* https://dom.spec.whatwg.org/#dictdef-elementcreationoptions */
34 dictionary ElementCreationOptions {
41 /* https://dom.spec.whatwg.org/#interface-document */
43 InstrumentedProps=(caretRangeFromPoint,
54 onwebkitfullscreenchange,
55 onwebkitfullscreenerror,
56 pictureInPictureElement,
57 pictureInPictureEnabled,
60 webkitCancelFullScreen,
61 webkitCurrentFullScreenElement,
63 webkitFullscreenElement,
64 webkitFullscreenEnabled,
67 webkitVisibilityState,
71 interface Document : Node {
76 readonly attribute DOMImplementation implementation;
77 [Pure, Throws, BinaryName="documentURIFromJS", NeedsCallerType]
78 readonly attribute DOMString URL;
79 [Pure, Throws, BinaryName="documentURIFromJS", NeedsCallerType]
80 readonly attribute DOMString documentURI;
82 readonly attribute DOMString compatMode;
84 readonly attribute DOMString characterSet;
85 [Pure,BinaryName="characterSet"]
86 readonly attribute DOMString charset; // legacy alias of .characterSet
87 [Pure,BinaryName="characterSet"]
88 readonly attribute DOMString inputEncoding; // legacy alias of .characterSet
90 readonly attribute DOMString contentType;
93 readonly attribute DocumentType? doctype;
95 readonly attribute Element? documentElement;
97 HTMLCollection getElementsByTagName(DOMString localName);
99 HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName);
101 HTMLCollection getElementsByClassName(DOMString classNames);
103 // These DOM methods cannot be accessed by UA Widget scripts
104 // because the DOM element reflectors will be in the content scope,
105 // instead of the desired UA Widget scope.
106 [CEReactions, NewObject, Throws, Func="IsNotUAWidget"]
107 Element createElement(DOMString localName, optional (ElementCreationOptions or DOMString) options = {});
108 [CEReactions, NewObject, Throws, Func="IsNotUAWidget"]
109 Element createElementNS(DOMString? namespace, DOMString qualifiedName, optional (ElementCreationOptions or DOMString) options = {});
111 DocumentFragment createDocumentFragment();
112 [NewObject, Func="IsNotUAWidget"]
113 Text createTextNode(DOMString data);
114 [NewObject, Func="IsNotUAWidget"]
115 Comment createComment(DOMString data);
117 ProcessingInstruction createProcessingInstruction(DOMString target, DOMString data);
119 [CEReactions, Throws, Func="IsNotUAWidget"]
120 Node importNode(Node node, optional boolean deep = false);
121 [CEReactions, Throws, Func="IsNotUAWidget"]
122 Node adoptNode(Node node);
124 [NewObject, Throws, NeedsCallerType]
125 Event createEvent(DOMString interface);
130 // NodeFilter.SHOW_ALL = 0xFFFFFFFF
132 NodeIterator createNodeIterator(Node root, optional unsigned long whatToShow = 0xFFFFFFFF, optional NodeFilter? filter = null);
134 TreeWalker createTreeWalker(Node root, optional unsigned long whatToShow = 0xFFFFFFFF, optional NodeFilter? filter = null);
137 // No support for prepend/append yet
138 // undefined prepend((Node or DOMString)... nodes);
139 // undefined append((Node or DOMString)... nodes);
141 // These are not in the spec, but leave them for now for backwards compat.
142 // So sort of like Gecko extensions
144 CDATASection createCDATASection(DOMString data);
146 Attr createAttribute(DOMString name);
148 Attr createAttributeNS(DOMString? namespace, DOMString name);
151 // https://html.spec.whatwg.org/multipage/dom.html#the-document-object
152 partial interface Document {
153 [Pref="dom.webcomponents.shadowdom.declarative.enabled"]
154 static Document parseHTMLUnsafe(DOMString html);
156 [PutForwards=href, LegacyUnforgeable] readonly attribute Location? location;
157 [SetterThrows] attribute DOMString domain;
158 readonly attribute DOMString referrer;
159 [Throws] attribute DOMString cookie;
160 readonly attribute DOMString lastModified;
161 readonly attribute DOMString readyState;
163 // DOM tree accessors
164 //(Not proxy yet)getter object (DOMString name);
165 [CEReactions, SetterThrows, Pure]
166 attribute DOMString title;
168 attribute DOMString dir;
169 [CEReactions, Pure, SetterThrows]
170 attribute HTMLElement? body;
172 readonly attribute HTMLHeadElement? head;
173 [SameObject] readonly attribute HTMLCollection images;
174 [SameObject] readonly attribute HTMLCollection embeds;
175 [SameObject] readonly attribute HTMLCollection plugins;
176 [SameObject] readonly attribute HTMLCollection links;
177 [SameObject] readonly attribute HTMLCollection forms;
178 [SameObject] readonly attribute HTMLCollection scripts;
180 NodeList getElementsByName(DOMString elementName);
181 //(Not implemented)readonly attribute DOMElementMap cssElementMap;
183 // dynamic markup insertion
184 [CEReactions, Throws]
185 Document open(optional DOMString unused1, optional DOMString unused2); // both arguments are ignored
186 [CEReactions, Throws]
187 WindowProxy? open(USVString url, DOMString name, DOMString features);
188 [CEReactions, Throws]
190 [CEReactions, Throws]
191 undefined write(DOMString... text);
192 [CEReactions, Throws]
193 undefined writeln(DOMString... text);
197 readonly attribute WindowProxy? defaultView;
200 [CEReactions, SetterThrows, SetterNeedsSubjectPrincipal]
201 attribute DOMString designMode;
202 [CEReactions, Throws, NeedsSubjectPrincipal]
203 boolean execCommand(DOMString commandId, optional boolean showUI = false,
204 optional DOMString value = "");
205 [Throws, NeedsSubjectPrincipal]
206 boolean queryCommandEnabled(DOMString commandId);
208 boolean queryCommandIndeterm(DOMString commandId);
210 boolean queryCommandState(DOMString commandId);
211 [Throws, NeedsCallerType]
212 boolean queryCommandSupported(DOMString commandId);
214 DOMString queryCommandValue(DOMString commandId);
215 //(Not implemented)readonly attribute HTMLCollection commands;
217 // special event handler IDL attributes that only apply to Document objects
218 [LegacyLenientThis] attribute EventHandler onreadystatechange;
221 attribute EventHandler onbeforescriptexecute;
222 attribute EventHandler onafterscriptexecute;
225 * True if this document is synthetic : stand alone image, video, audio file,
228 [Func="IsChromeOrUAWidget"] readonly attribute boolean mozSyntheticDocument;
230 * Returns the script element whose script is currently being processed.
232 * @see <https://developer.mozilla.org/en/DOM/document.currentScript>
235 readonly attribute Element? currentScript;
237 * Release the current mouse capture if it is on an element within this
240 * @see <https://developer.mozilla.org/en/DOM/document.releaseCapture>
242 [Deprecated=DocumentReleaseCapture, Pref="dom.mouse_capture.enabled"]
243 undefined releaseCapture();
245 * Use the given DOM element as the source image of target |-moz-element()|.
247 * This function introduces a new special ID (called "image element ID"),
248 * which is only used by |-moz-element()|, and associates it with the given
249 * DOM element. Image elements ID's have the higher precedence than general
250 * HTML id's, so if |document.mozSetImageElement(<id>, <element>)| is called,
251 * |-moz-element(#<id>)| uses |<element>| as the source image even if there
252 * is another element with id attribute = |<id>|. To unregister an image
253 * element ID |<id>|, call |document.mozSetImageElement(<id>, null)|.
257 * canvas = document.createElement("canvas");
258 * canvas.setAttribute("width", 100);
259 * canvas.setAttribute("height", 100);
261 * document.mozSetImageElement("canvasbg", canvas);
263 * <div style="background-image: -moz-element(#canvasbg);"></div>
265 * @param aImageElementId an image element ID to associate with
267 * @param aImageElement a DOM element to be used as the source image of
268 * |-moz-element(#aImageElementId)|. If this is null, the function will
269 * unregister the image element ID |aImageElementId|.
271 * @see <https://developer.mozilla.org/en/DOM/document.mozSetImageElement>
274 undefined mozSetImageElement(DOMString aImageElementId,
275 Element? aImageElement);
278 readonly attribute URI? documentURIObject;
281 * Current referrer policy - one of the referrer policy value from
282 * ReferrerPolicy.webidl.
285 readonly attribute ReferrerPolicy referrerPolicy;
288 * Current referrer info, which holds all referrer related information
289 * including referrer policy and raw referrer of document.
292 readonly attribute nsIReferrerInfo referrerInfo;
296 // https://html.spec.whatwg.org/multipage/obsolete.html#other-elements%2C-attributes-and-apis
297 partial interface Document {
298 [CEReactions] attribute [LegacyNullToEmptyString] DOMString fgColor;
299 [CEReactions] attribute [LegacyNullToEmptyString] DOMString linkColor;
300 [CEReactions] attribute [LegacyNullToEmptyString] DOMString vlinkColor;
301 [CEReactions] attribute [LegacyNullToEmptyString] DOMString alinkColor;
302 [CEReactions] attribute [LegacyNullToEmptyString] DOMString bgColor;
304 [SameObject] readonly attribute HTMLCollection anchors;
305 [SameObject] readonly attribute HTMLCollection applets;
308 // @deprecated These are old Netscape 4 methods. Do not use,
309 // the implementation is no-op.
310 // XXXbz do we actually need these anymore?
311 undefined captureEvents();
312 undefined releaseEvents();
314 [SameObject] readonly attribute HTMLAllCollection all;
317 // https://fullscreen.spec.whatwg.org/#api
318 partial interface Document {
319 // Note: Per spec the 'S' in these two is lowercase, but the "Moz"
320 // versions have it uppercase.
321 [LegacyLenientSetter, Unscopable]
322 readonly attribute boolean fullscreen;
323 [BinaryName="fullscreen"]
324 readonly attribute boolean mozFullScreen;
325 [LegacyLenientSetter, NeedsCallerType]
326 readonly attribute boolean fullscreenEnabled;
327 [BinaryName="fullscreenEnabled", NeedsCallerType]
328 readonly attribute boolean mozFullScreenEnabled;
331 Promise<undefined> exitFullscreen();
332 [NewObject, BinaryName="exitFullscreen"]
333 Promise<undefined> mozCancelFullScreen();
336 attribute EventHandler onfullscreenchange;
337 attribute EventHandler onfullscreenerror;
340 // https://w3c.github.io/pointerlock/#extensions-to-the-document-interface
341 // https://w3c.github.io/pointerlock/#extensions-to-the-documentorshadowroot-mixin
342 partial interface Document {
343 undefined exitPointerLock();
346 attribute EventHandler onpointerlockchange;
347 attribute EventHandler onpointerlockerror;
350 // Mozilla-internal document extensions specific to error pages.
351 partial interface Document {
352 [Func="Document::CallerIsTrustedAboutCertError", NewObject]
353 Promise<any> addCertException(boolean isTemporary);
355 [Func="Document::CallerIsTrustedAboutHttpsOnlyError"]
356 undefined reloadWithHttpsOnlyException();
358 [Func="Document::CallerIsTrustedAboutCertError", Throws]
359 FailedCertSecurityInfo getFailedCertSecurityInfo();
361 [Func="Document::CallerIsTrustedAboutNetError", Throws]
362 NetErrorInfo getNetErrorInfo();
365 // https://w3c.github.io/page-visibility/#extensions-to-the-document-interface
366 partial interface Document {
367 readonly attribute boolean hidden;
368 readonly attribute VisibilityState visibilityState;
369 attribute EventHandler onvisibilitychange;
372 // https://drafts.csswg.org/cssom/#extensions-to-the-document-interface
373 partial interface Document {
374 attribute DOMString? selectedStyleSheetSet;
375 readonly attribute DOMString? lastStyleSheetSet;
376 readonly attribute DOMString? preferredStyleSheetSet;
378 readonly attribute DOMStringList styleSheetSets;
379 undefined enableStyleSheetsForSet (DOMString? name);
382 // https://drafts.csswg.org/cssom-view/#extensions-to-the-document-interface
383 partial interface Document {
384 CaretPosition? caretPositionFromPoint (float x, float y);
386 readonly attribute Element? scrollingElement;
389 // https://drafts.csswg.org/web-animations/#extensions-to-the-document-interface
390 partial interface Document {
391 [Func="Document::AreWebAnimationsTimelinesEnabled"]
392 readonly attribute DocumentTimeline timeline;
395 // https://svgwg.org/svg2-draft/struct.html#InterfaceDocumentExtensions
396 partial interface Document {
397 [BinaryName="SVGRootElement"]
398 readonly attribute SVGSVGElement? rootElement;
401 // Mozilla extensions of various sorts
402 partial interface Document {
403 // Creates a new XUL element regardless of the document's default type.
404 [ChromeOnly, CEReactions, NewObject, Throws]
405 Element createXULElement(DOMString localName, optional (ElementCreationOptions or DOMString) options = {});
406 // Wether the document was loaded using a nsXULPrototypeDocument.
408 readonly attribute boolean loadedFromPrototype;
410 // The principal to use for the storage area of this document
412 readonly attribute Principal effectiveStoragePrincipal;
414 // You should probably not be using this principal getter since it performs
415 // no checks to ensure that the partitioned principal should really be used
416 // here. It is only designed to be used in very specific circumstances, such
417 // as when inheriting the document/storage principal.
419 readonly attribute Principal partitionedPrincipal;
421 // The cookieJarSettings of this document
423 readonly attribute nsICookieJarSettings cookieJarSettings;
426 // XXXbz I can't find the sane spec for this stuff, so just cribbing
427 // from our xpidl for now.
428 [NewObject, Func="nsGenericHTMLElement::LegacyTouchAPIEnabled"]
429 Touch createTouch(optional Window? view = null,
430 optional EventTarget? target = null,
431 optional long identifier = 0,
432 optional long pageX = 0,
433 optional long pageY = 0,
434 optional long screenX = 0,
435 optional long screenY = 0,
436 optional long clientX = 0,
437 optional long clientY = 0,
438 optional long radiusX = 0,
439 optional long radiusY = 0,
440 optional float rotationAngle = 0,
441 optional float force = 0);
442 // XXXbz a hack to get around the fact that we don't support variadics as
443 // distinguishing arguments yet. Once this hack is removed. we can also
444 // remove the corresponding overload on Document, since Touch... and
445 // sequence<Touch> look the same in the C++.
446 [NewObject, Func="nsGenericHTMLElement::LegacyTouchAPIEnabled"]
447 TouchList createTouchList(Touch touch, Touch... touches);
448 // XXXbz and another hack for the fact that we can't usefully have optional
449 // distinguishing arguments but need a working zero-arg form of
450 // createTouchList().
451 [NewObject, Func="nsGenericHTMLElement::LegacyTouchAPIEnabled"]
452 TouchList createTouchList();
453 [NewObject, Func="nsGenericHTMLElement::LegacyTouchAPIEnabled"]
454 TouchList createTouchList(sequence<Touch> touches);
457 attribute boolean styleSheetChangeEventsEnabled;
460 attribute boolean devToolsAnonymousAndShadowEventsEnabled;
462 [ChromeOnly, BinaryName="contentLanguageForBindings"] readonly attribute DOMString contentLanguage;
464 [ChromeOnly] readonly attribute nsILoadGroup? documentLoadGroup;
466 // Blocks the initial document parser until the given promise is settled.
467 [ChromeOnly, NewObject]
468 Promise<any> blockParsing(Promise<any> promise,
469 optional BlockParsingOptions options = {});
471 [Func="nsContentUtils::IsSystemOrPDFJS", BinaryName="blockUnblockOnloadForSystemOrPDFJS"]
472 undefined blockUnblockOnload(boolean block);
474 // like documentURI, except that for error pages, it returns the URI we were
475 // trying to load when we hit an error, rather than the error page's own URI.
476 [ChromeOnly] readonly attribute URI? mozDocumentURIIfNotForErrorPages;
478 // A promise that is resolved when we have both fired DOMContentLoaded and
479 // are ready to start layout.
480 // This is used for the "document_idle" webextension script injection point.
482 readonly attribute Promise<undefined> documentReadyForIdle;
484 // Lazily created command dispatcher, returns null if the document is not
485 // chrome privileged.
487 readonly attribute XULCommandDispatcher? commandDispatcher;
490 attribute boolean devToolsWatchingDOMMutations;
493 * Returns all the shadow roots connected to the document, in no particular
494 * order, and without regard to open/closed-ness. Also returns UA widgets
495 * (like <video> controls), which can be checked using
496 * ShadowRoot.isUAWidget().
499 sequence<ShadowRoot> getConnectedShadowRoots();
502 dictionary BlockParsingOptions {
504 * If true, blocks script-created parsers (created via document.open()) in
505 * addition to network-created parsers.
507 boolean blockScriptCreated = true;
510 // Extension to give chrome JS the ability to determine when a document was
511 // created to satisfy an iframe with srcdoc attribute.
512 partial interface Document {
513 [ChromeOnly] readonly attribute boolean isSrcdocDocument;
517 // Extension to give chrome JS the ability to get the underlying
518 // sandbox flag attribute
519 partial interface Document {
520 [ChromeOnly] readonly attribute DOMString? sandboxFlagsAsString;
525 * Chrome document anonymous content management.
526 * This is a Chrome-only API that allows inserting fixed positioned anonymous
527 * content on top of the current page displayed in the document.
529 partial interface Document {
531 * If aForce is true, tries to update layout to be able to insert the element
534 [ChromeOnly, NewObject, Throws]
535 AnonymousContent insertAnonymousContent(optional boolean aForce = false);
538 * Removes the element inserted into the CanvasFrame given an AnonymousContent
542 undefined removeAnonymousContent(AnonymousContent aContent);
545 // http://w3c.github.io/selection-api/#extensions-to-document-interface
546 partial interface Document {
548 Selection? getSelection();
551 // https://github.com/whatwg/html/issues/3338
552 partial interface Document {
553 [Pref="dom.storage_access.enabled", NewObject]
554 Promise<boolean> hasStorageAccess();
555 [Pref="dom.storage_access.enabled", NewObject]
556 Promise<undefined> requestStorageAccess();
557 // https://github.com/privacycg/storage-access/pull/100
558 [Pref="dom.storage_access.forward_declared.enabled", NewObject]
559 Promise<undefined> requestStorageAccessUnderSite(DOMString serializedSite);
560 [Pref="dom.storage_access.forward_declared.enabled", NewObject]
561 Promise<undefined> completeStorageAccessRequestFromSite(DOMString serializedSite);
564 // A privileged API to give chrome privileged code and the content script of the
565 // webcompat extension the ability to request the storage access for a given
567 partial interface Document {
568 [Func="Document::CallerCanAccessPrivilegeSSA", NewObject]
569 Promise<undefined> requestStorageAccessForOrigin(DOMString thirdPartyOrigin, optional boolean requireUserInteraction = true);
572 // Extension to give chrome JS the ability to determine whether
573 // the user has interacted with the document or not.
574 partial interface Document {
575 [ChromeOnly] readonly attribute boolean userHasInteracted;
578 // Extension to give chrome JS the ability to simulate activate the document
580 partial interface Document {
582 undefined notifyUserGestureActivation();
585 undefined clearUserGestureActivation();
587 readonly attribute boolean hasBeenUserGestureActivated;
589 readonly attribute boolean hasValidTransientUserGestureActivation;
591 readonly attribute DOMHighResTimeStamp lastUserGestureTimeStamp;
593 boolean consumeTransientUserGestureActivation();
596 // Extension to give chrome JS the ability to set an event handler which is
597 // called with certain events that happened while events were suppressed in the
598 // document or one of its subdocuments.
599 partial interface Document {
601 undefined setSuppressedEventListener(EventListener? aListener);
604 // Allows frontend code to query a CSP which needs to be passed for a
605 // new load into docshell. Further, allows to query the CSP in JSON
606 // format for testing purposes.
607 partial interface Document {
608 [ChromeOnly] readonly attribute ContentSecurityPolicy? csp;
609 [ChromeOnly] readonly attribute DOMString cspJSON;
612 partial interface Document {
613 [Func="Document::DocumentSupportsL10n"] readonly attribute DocumentL10n? l10n;
614 [Func="Document::DocumentSupportsL10n"] readonly attribute boolean hasPendingL10nMutations;
617 Document includes XPathEvaluatorMixin;
618 Document includes GlobalEventHandlers;
619 Document includes TouchEventHandlers;
620 Document includes ParentNode;
621 Document includes OnErrorEventHandlerForNodes;
622 Document includes GeometryUtils;
623 Document includes FontFaceSource;
624 Document includes DocumentOrShadowRoot;
626 // https://w3c.github.io/webappsec-feature-policy/#idl-index
627 partial interface Document {
628 [SameObject, Pref="dom.security.featurePolicy.webidl.enabled"]
629 readonly attribute FeaturePolicy featurePolicy;
632 // Extension to give chrome JS the ability to specify a non-default keypress
634 partial interface Document {
636 * setKeyPressEventModel() is called when we need to check whether the web
637 * app requires specific keypress event model or not.
639 * @param aKeyPressEventModel Proper keypress event model for the web app.
640 * KEYPRESS_EVENT_MODEL_DEFAULT:
641 * Use default keypress event model. I.e., depending on
642 * "dom.keyboardevent.keypress.set_keycode_and_charcode_to_same_value"
644 * KEYPRESS_EVENT_MODEL_SPLIT:
645 * Use split model. I.e, if keypress event inputs a character,
646 * keyCode should be 0. Otherwise, charCode should be 0.
647 * KEYPRESS_EVENT_MODEL_CONFLATED:
648 * Use conflated model. I.e., keyCode and charCode values of each
649 * keypress event should be set to same value.
652 const unsigned short KEYPRESS_EVENT_MODEL_DEFAULT = 0;
654 const unsigned short KEYPRESS_EVENT_MODEL_SPLIT = 1;
656 const unsigned short KEYPRESS_EVENT_MODEL_CONFLATED = 2;
658 undefined setKeyPressEventModel(unsigned short aKeyPressEventModel);
661 // Extensions to return information about about the nodes blocked by the
662 // Safebrowsing API inside a document.
663 partial interface Document {
665 * Number of nodes that have been blocked by the Safebrowsing API to prevent
666 * tracking, cryptomining and so on. This method is for testing only.
669 readonly attribute long blockedNodeByClassifierCount;
672 * List of nodes that have been blocked by the Safebrowsing API to prevent
673 * tracking, fingerprinting, cryptomining and so on. This method is for
677 readonly attribute NodeList blockedNodesByClassifier;
680 // Extension to programmatically simulate a user interaction on a document,
682 partial interface Document {
683 [ChromeOnly, BinaryName="setUserHasInteracted"]
684 undefined userInteractionForTesting();
687 // Extension for permission delegation.
688 partial interface Document {
690 readonly attribute nsIPermissionDelegateHandler permDelegateHandler;
693 // Extension used by the password manager to infer form submissions.
694 partial interface Document {
696 * Set whether the document notifies an event when a fetch or
697 * XHR completes successfully.
700 undefined setNotifyFetchSuccess(boolean aShouldNotify);
703 * Set whether a form and a password field notify an event when it is
704 * removed from the DOM tree.
707 undefined setNotifyFormOrPasswordRemoved(boolean aShouldNotify);
710 // Extension to allow chrome code to detect initial about:blank documents.
711 partial interface Document {
713 readonly attribute boolean isInitialDocument;
716 // Extension to allow chrome code to get some wireframe-like structure.
717 enum WireframeRectType {
723 dictionary WireframeTaggedRect {
724 unrestricted double x = 0;
725 unrestricted double y = 0;
726 unrestricted double width = 0;
727 unrestricted double height = 0;
728 unsigned long color = 0; // in nscolor format
729 WireframeRectType type;
733 dictionary Wireframe {
734 unsigned long canvasBackground = 0; // in nscolor format
735 sequence<WireframeTaggedRect> rects;
736 unsigned long version = 1; // Increment when the wireframe structure changes in backwards-incompatible ways
738 partial interface Document {
740 Wireframe? getWireframe(optional boolean aIncludeNodes = false);
743 partial interface Document {
744 // Returns true if the document is the current active document in a browsing
745 // context which isn't in bfcache.
750 Document includes NonElementParentNode;
753 * Extension to add the fragmentDirective property.
754 * https://wicg.github.io/scroll-to-text-fragment/#feature-detectability
756 partial interface Document {
757 [Pref="dom.text_fragments.enabled", Exposed=Window, SameObject]
758 readonly attribute FragmentDirective fragmentDirective;