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
18 interface ContentSecurityPolicy;
20 interface WindowProxy;
21 interface nsISupports;
23 interface nsIDocShell;
24 interface nsILoadGroup;
25 interface nsIReferrerInfo;
26 interface nsICookieJarSettings;
27 interface nsIPermissionDelegateHandler;
28 interface XULCommandDispatcher;
30 enum VisibilityState { "hidden", "visible" };
32 /* https://dom.spec.whatwg.org/#dictdef-elementcreationoptions */
33 dictionary ElementCreationOptions {
40 /* https://dom.spec.whatwg.org/#interface-document */
42 InstrumentedProps=(caretRangeFromPoint,
53 onwebkitfullscreenchange,
54 onwebkitfullscreenerror,
55 pictureInPictureElement,
56 pictureInPictureEnabled,
59 webkitCancelFullScreen,
60 webkitCurrentFullScreenElement,
62 webkitFullscreenElement,
63 webkitFullscreenEnabled,
66 webkitVisibilityState,
70 interface Document : Node {
75 readonly attribute DOMImplementation implementation;
76 [Pure, Throws, BinaryName="documentURIFromJS", NeedsCallerType]
77 readonly attribute DOMString URL;
78 [Pure, Throws, BinaryName="documentURIFromJS", NeedsCallerType]
79 readonly attribute DOMString documentURI;
81 readonly attribute DOMString compatMode;
83 readonly attribute DOMString characterSet;
84 [Pure,BinaryName="characterSet"]
85 readonly attribute DOMString charset; // legacy alias of .characterSet
86 [Pure,BinaryName="characterSet"]
87 readonly attribute DOMString inputEncoding; // legacy alias of .characterSet
89 readonly attribute DOMString contentType;
92 readonly attribute DocumentType? doctype;
94 readonly attribute Element? documentElement;
96 HTMLCollection getElementsByTagName(DOMString localName);
98 HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName);
100 HTMLCollection getElementsByClassName(DOMString classNames);
102 Element? getElementById(DOMString elementId);
104 // These DOM methods cannot be accessed by UA Widget scripts
105 // because the DOM element reflectors will be in the content scope,
106 // instead of the desired UA Widget scope.
107 [CEReactions, NewObject, Throws, Func="IsNotUAWidget"]
108 Element createElement(DOMString localName, optional (ElementCreationOptions or DOMString) options = {});
109 [CEReactions, NewObject, Throws, Func="IsNotUAWidget"]
110 Element createElementNS(DOMString? namespace, DOMString qualifiedName, optional (ElementCreationOptions or DOMString) options = {});
112 DocumentFragment createDocumentFragment();
113 [NewObject, Func="IsNotUAWidget"]
114 Text createTextNode(DOMString data);
115 [NewObject, Func="IsNotUAWidget"]
116 Comment createComment(DOMString data);
118 ProcessingInstruction createProcessingInstruction(DOMString target, DOMString data);
120 [CEReactions, Throws, Func="IsNotUAWidget"]
121 Node importNode(Node node, optional boolean deep = false);
122 [CEReactions, Throws, Func="IsNotUAWidget"]
123 Node adoptNode(Node node);
125 [NewObject, Throws, NeedsCallerType]
126 Event createEvent(DOMString interface);
131 // NodeFilter.SHOW_ALL = 0xFFFFFFFF
133 NodeIterator createNodeIterator(Node root, optional unsigned long whatToShow = 0xFFFFFFFF, optional NodeFilter? filter = null);
135 TreeWalker createTreeWalker(Node root, optional unsigned long whatToShow = 0xFFFFFFFF, optional NodeFilter? filter = null);
138 // No support for prepend/append yet
139 // undefined prepend((Node or DOMString)... nodes);
140 // undefined append((Node or DOMString)... nodes);
142 // These are not in the spec, but leave them for now for backwards compat.
143 // So sort of like Gecko extensions
145 CDATASection createCDATASection(DOMString data);
147 Attr createAttribute(DOMString name);
149 Attr createAttributeNS(DOMString? namespace, DOMString name);
152 // https://html.spec.whatwg.org/multipage/dom.html#the-document-object
153 partial interface Document {
154 [PutForwards=href, LegacyUnforgeable] readonly attribute Location? location;
155 [SetterThrows] attribute DOMString domain;
156 readonly attribute DOMString referrer;
157 [Throws] attribute DOMString cookie;
158 readonly attribute DOMString lastModified;
159 readonly attribute DOMString readyState;
161 // DOM tree accessors
162 //(Not proxy yet)getter object (DOMString name);
163 [CEReactions, SetterThrows, Pure]
164 attribute DOMString title;
166 attribute DOMString dir;
167 [CEReactions, Pure, SetterThrows]
168 attribute HTMLElement? body;
170 readonly attribute HTMLHeadElement? head;
171 [SameObject] readonly attribute HTMLCollection images;
172 [SameObject] readonly attribute HTMLCollection embeds;
173 [SameObject] readonly attribute HTMLCollection plugins;
174 [SameObject] readonly attribute HTMLCollection links;
175 [SameObject] readonly attribute HTMLCollection forms;
176 [SameObject] readonly attribute HTMLCollection scripts;
178 NodeList getElementsByName(DOMString elementName);
179 //(Not implemented)readonly attribute DOMElementMap cssElementMap;
181 // dynamic markup insertion
182 [CEReactions, Throws]
183 Document open(optional DOMString unused1, optional DOMString unused2); // both arguments are ignored
184 [CEReactions, Throws]
185 WindowProxy? open(USVString url, DOMString name, DOMString features);
186 [CEReactions, Throws]
188 [CEReactions, Throws]
189 undefined write(DOMString... text);
190 [CEReactions, Throws]
191 undefined writeln(DOMString... text);
195 readonly attribute WindowProxy? defaultView;
198 [CEReactions, SetterThrows, SetterNeedsSubjectPrincipal]
199 attribute DOMString designMode;
200 [CEReactions, Throws, NeedsSubjectPrincipal]
201 boolean execCommand(DOMString commandId, optional boolean showUI = false,
202 optional DOMString value = "");
203 [Throws, NeedsSubjectPrincipal]
204 boolean queryCommandEnabled(DOMString commandId);
206 boolean queryCommandIndeterm(DOMString commandId);
208 boolean queryCommandState(DOMString commandId);
209 [Throws, NeedsCallerType]
210 boolean queryCommandSupported(DOMString commandId);
212 DOMString queryCommandValue(DOMString commandId);
213 //(Not implemented)readonly attribute HTMLCollection commands;
215 // special event handler IDL attributes that only apply to Document objects
216 [LegacyLenientThis] attribute EventHandler onreadystatechange;
219 attribute EventHandler onbeforescriptexecute;
220 attribute EventHandler onafterscriptexecute;
223 * True if this document is synthetic : stand alone image, video, audio file,
226 [Func="IsChromeOrUAWidget"] readonly attribute boolean mozSyntheticDocument;
228 * Returns the script element whose script is currently being processed.
230 * @see <https://developer.mozilla.org/en/DOM/document.currentScript>
233 readonly attribute Element? currentScript;
235 * Release the current mouse capture if it is on an element within this
238 * @see <https://developer.mozilla.org/en/DOM/document.releaseCapture>
240 [Deprecated=DocumentReleaseCapture, Pref="dom.mouse_capture.enabled"]
241 undefined releaseCapture();
243 * Use the given DOM element as the source image of target |-moz-element()|.
245 * This function introduces a new special ID (called "image element ID"),
246 * which is only used by |-moz-element()|, and associates it with the given
247 * DOM element. Image elements ID's have the higher precedence than general
248 * HTML id's, so if |document.mozSetImageElement(<id>, <element>)| is called,
249 * |-moz-element(#<id>)| uses |<element>| as the source image even if there
250 * is another element with id attribute = |<id>|. To unregister an image
251 * element ID |<id>|, call |document.mozSetImageElement(<id>, null)|.
255 * canvas = document.createElement("canvas");
256 * canvas.setAttribute("width", 100);
257 * canvas.setAttribute("height", 100);
259 * document.mozSetImageElement("canvasbg", canvas);
261 * <div style="background-image: -moz-element(#canvasbg);"></div>
263 * @param aImageElementId an image element ID to associate with
265 * @param aImageElement a DOM element to be used as the source image of
266 * |-moz-element(#aImageElementId)|. If this is null, the function will
267 * unregister the image element ID |aImageElementId|.
269 * @see <https://developer.mozilla.org/en/DOM/document.mozSetImageElement>
272 undefined mozSetImageElement(DOMString aImageElementId,
273 Element? aImageElement);
276 readonly attribute URI? documentURIObject;
279 * Current referrer policy - one of the referrer policy value from
280 * ReferrerPolicy.webidl.
283 readonly attribute ReferrerPolicy referrerPolicy;
286 * Current referrer info, which holds all referrer related information
287 * including referrer policy and raw referrer of document.
290 readonly attribute nsIReferrerInfo referrerInfo;
294 // https://html.spec.whatwg.org/multipage/obsolete.html#other-elements%2C-attributes-and-apis
295 partial interface Document {
296 [CEReactions] attribute [LegacyNullToEmptyString] DOMString fgColor;
297 [CEReactions] attribute [LegacyNullToEmptyString] DOMString linkColor;
298 [CEReactions] attribute [LegacyNullToEmptyString] DOMString vlinkColor;
299 [CEReactions] attribute [LegacyNullToEmptyString] DOMString alinkColor;
300 [CEReactions] attribute [LegacyNullToEmptyString] DOMString bgColor;
302 [SameObject] readonly attribute HTMLCollection anchors;
303 [SameObject] readonly attribute HTMLCollection applets;
306 // @deprecated These are old Netscape 4 methods. Do not use,
307 // the implementation is no-op.
308 // XXXbz do we actually need these anymore?
309 undefined captureEvents();
310 undefined releaseEvents();
312 [SameObject] readonly attribute HTMLAllCollection all;
315 // https://fullscreen.spec.whatwg.org/#api
316 partial interface Document {
317 // Note: Per spec the 'S' in these two is lowercase, but the "Moz"
318 // versions have it uppercase.
319 [LegacyLenientSetter, Unscopable]
320 readonly attribute boolean fullscreen;
321 [BinaryName="fullscreen"]
322 readonly attribute boolean mozFullScreen;
323 [LegacyLenientSetter, NeedsCallerType]
324 readonly attribute boolean fullscreenEnabled;
325 [BinaryName="fullscreenEnabled", NeedsCallerType]
326 readonly attribute boolean mozFullScreenEnabled;
329 Promise<undefined> exitFullscreen();
330 [NewObject, BinaryName="exitFullscreen"]
331 Promise<undefined> mozCancelFullScreen();
334 attribute EventHandler onfullscreenchange;
335 attribute EventHandler onfullscreenerror;
338 // https://w3c.github.io/pointerlock/#extensions-to-the-document-interface
339 // https://w3c.github.io/pointerlock/#extensions-to-the-documentorshadowroot-mixin
340 partial interface Document {
341 undefined exitPointerLock();
344 attribute EventHandler onpointerlockchange;
345 attribute EventHandler onpointerlockerror;
348 // Mozilla-internal document extensions specific to error pages.
349 partial interface Document {
350 [Func="Document::CallerIsTrustedAboutCertError", NewObject]
351 Promise<any> addCertException(boolean isTemporary);
353 [Func="Document::CallerIsTrustedAboutHttpsOnlyError"]
354 undefined reloadWithHttpsOnlyException();
356 [Func="Document::CallerIsTrustedAboutCertError", Throws]
357 FailedCertSecurityInfo getFailedCertSecurityInfo();
359 [Func="Document::CallerIsTrustedAboutNetError", Throws]
360 NetErrorInfo getNetErrorInfo();
363 // https://w3c.github.io/page-visibility/#extensions-to-the-document-interface
364 partial interface Document {
365 readonly attribute boolean hidden;
366 readonly attribute VisibilityState visibilityState;
367 attribute EventHandler onvisibilitychange;
370 // https://drafts.csswg.org/cssom/#extensions-to-the-document-interface
371 partial interface Document {
372 attribute DOMString? selectedStyleSheetSet;
373 readonly attribute DOMString? lastStyleSheetSet;
374 readonly attribute DOMString? preferredStyleSheetSet;
376 readonly attribute DOMStringList styleSheetSets;
377 undefined enableStyleSheetsForSet (DOMString? name);
380 // https://drafts.csswg.org/cssom-view/#extensions-to-the-document-interface
381 partial interface Document {
382 CaretPosition? caretPositionFromPoint (float x, float y);
384 readonly attribute Element? scrollingElement;
387 // http://dev.w3.org/2006/webapi/selectors-api2/#interface-definitions
388 partial interface Document {
390 Element? querySelector(UTF8String selectors);
392 NodeList querySelectorAll(UTF8String selectors);
394 //(Not implemented)Element? find(DOMString selectors, optional (Element or sequence<Node>)? refNodes);
395 //(Not implemented)NodeList findAll(DOMString selectors, optional (Element or sequence<Node>)? refNodes);
398 // https://drafts.csswg.org/web-animations/#extensions-to-the-document-interface
399 partial interface Document {
400 [Func="Document::AreWebAnimationsTimelinesEnabled"]
401 readonly attribute DocumentTimeline timeline;
404 // https://svgwg.org/svg2-draft/struct.html#InterfaceDocumentExtensions
405 partial interface Document {
406 [BinaryName="SVGRootElement"]
407 readonly attribute SVGSVGElement? rootElement;
410 // Mozilla extensions of various sorts
411 partial interface Document {
412 // Creates a new XUL element regardless of the document's default type.
413 [ChromeOnly, CEReactions, NewObject, Throws]
414 Element createXULElement(DOMString localName, optional (ElementCreationOptions or DOMString) options = {});
415 // Wether the document was loaded using a nsXULPrototypeDocument.
417 readonly attribute boolean loadedFromPrototype;
419 // The principal to use for the storage area of this document
421 readonly attribute Principal effectiveStoragePrincipal;
423 // You should probably not be using this principal getter since it performs
424 // no checks to ensure that the partitioned principal should really be used
425 // here. It is only designed to be used in very specific circumstances, such
426 // as when inheriting the document/storage principal.
428 readonly attribute Principal partitionedPrincipal;
430 // The cookieJarSettings of this document
432 readonly attribute nsICookieJarSettings cookieJarSettings;
435 // XXXbz I can't find the sane spec for this stuff, so just cribbing
436 // from our xpidl for now.
437 [NewObject, Func="nsGenericHTMLElement::LegacyTouchAPIEnabled"]
438 Touch createTouch(optional Window? view = null,
439 optional EventTarget? target = null,
440 optional long identifier = 0,
441 optional long pageX = 0,
442 optional long pageY = 0,
443 optional long screenX = 0,
444 optional long screenY = 0,
445 optional long clientX = 0,
446 optional long clientY = 0,
447 optional long radiusX = 0,
448 optional long radiusY = 0,
449 optional float rotationAngle = 0,
450 optional float force = 0);
451 // XXXbz a hack to get around the fact that we don't support variadics as
452 // distinguishing arguments yet. Once this hack is removed. we can also
453 // remove the corresponding overload on Document, since Touch... and
454 // sequence<Touch> look the same in the C++.
455 [NewObject, Func="nsGenericHTMLElement::LegacyTouchAPIEnabled"]
456 TouchList createTouchList(Touch touch, Touch... touches);
457 // XXXbz and another hack for the fact that we can't usefully have optional
458 // distinguishing arguments but need a working zero-arg form of
459 // createTouchList().
460 [NewObject, Func="nsGenericHTMLElement::LegacyTouchAPIEnabled"]
461 TouchList createTouchList();
462 [NewObject, Func="nsGenericHTMLElement::LegacyTouchAPIEnabled"]
463 TouchList createTouchList(sequence<Touch> touches);
466 attribute boolean styleSheetChangeEventsEnabled;
469 attribute boolean devToolsAnonymousAndShadowEventsEnabled;
471 [ChromeOnly] readonly attribute DOMString contentLanguage;
473 [ChromeOnly] readonly attribute nsILoadGroup? documentLoadGroup;
475 // Blocks the initial document parser until the given promise is settled.
476 [ChromeOnly, NewObject]
477 Promise<any> blockParsing(Promise<any> promise,
478 optional BlockParsingOptions options = {});
480 [Func="nsContentUtils::IsSystemOrPDFJS", BinaryName="blockUnblockOnloadForSystemOrPDFJS"]
481 undefined blockUnblockOnload(boolean block);
483 // like documentURI, except that for error pages, it returns the URI we were
484 // trying to load when we hit an error, rather than the error page's own URI.
485 [ChromeOnly] readonly attribute URI? mozDocumentURIIfNotForErrorPages;
487 // A promise that is resolved when we have both fired DOMContentLoaded and
488 // are ready to start layout.
489 // This is used for the "document_idle" webextension script injection point.
491 readonly attribute Promise<undefined> documentReadyForIdle;
493 // Lazily created command dispatcher, returns null if the document is not
494 // chrome privileged.
496 readonly attribute XULCommandDispatcher? commandDispatcher;
499 attribute boolean devToolsWatchingDOMMutations;
502 * Returns all the shadow roots connected to the document, in no particular
503 * order, and without regard to open/closed-ness. Also returns UA widgets
504 * (like <video> controls), which can be checked using
505 * ShadowRoot.isUAWidget().
508 sequence<ShadowRoot> getConnectedShadowRoots();
511 dictionary BlockParsingOptions {
513 * If true, blocks script-created parsers (created via document.open()) in
514 * addition to network-created parsers.
516 boolean blockScriptCreated = true;
519 // Extension to give chrome JS the ability to determine when a document was
520 // created to satisfy an iframe with srcdoc attribute.
521 partial interface Document {
522 [ChromeOnly] readonly attribute boolean isSrcdocDocument;
526 // Extension to give chrome JS the ability to get the underlying
527 // sandbox flag attribute
528 partial interface Document {
529 [ChromeOnly] readonly attribute DOMString? sandboxFlagsAsString;
534 * Chrome document anonymous content management.
535 * This is a Chrome-only API that allows inserting fixed positioned anonymous
536 * content on top of the current page displayed in the document.
538 partial interface Document {
540 * If aForce is true, tries to update layout to be able to insert the element
543 [ChromeOnly, NewObject, Throws]
544 AnonymousContent insertAnonymousContent(optional boolean aForce = false);
547 * Removes the element inserted into the CanvasFrame given an AnonymousContent
551 undefined removeAnonymousContent(AnonymousContent aContent);
554 // http://w3c.github.io/selection-api/#extensions-to-document-interface
555 partial interface Document {
557 Selection? getSelection();
560 // https://github.com/whatwg/html/issues/3338
561 partial interface Document {
562 [Pref="dom.storage_access.enabled", NewObject]
563 Promise<boolean> hasStorageAccess();
564 [Pref="dom.storage_access.enabled", NewObject]
565 Promise<undefined> requestStorageAccess();
566 // https://github.com/privacycg/storage-access/pull/100
567 [Pref="dom.storage_access.forward_declared.enabled", NewObject]
568 Promise<undefined> requestStorageAccessUnderSite(DOMString serializedSite);
569 [Pref="dom.storage_access.forward_declared.enabled", NewObject]
570 Promise<undefined> completeStorageAccessRequestFromSite(DOMString serializedSite);
573 // A privileged API to give chrome privileged code and the content script of the
574 // webcompat extension the ability to request the storage access for a given
576 partial interface Document {
577 [Func="Document::CallerCanAccessPrivilegeSSA", NewObject]
578 Promise<undefined> requestStorageAccessForOrigin(DOMString thirdPartyOrigin, optional boolean requireUserInteraction = true);
581 // Extension to give chrome JS the ability to determine whether
582 // the user has interacted with the document or not.
583 partial interface Document {
584 [ChromeOnly] readonly attribute boolean userHasInteracted;
587 // Extension to give chrome JS the ability to simulate activate the document
589 partial interface Document {
591 undefined notifyUserGestureActivation();
594 undefined clearUserGestureActivation();
596 readonly attribute boolean hasBeenUserGestureActivated;
598 readonly attribute boolean hasValidTransientUserGestureActivation;
600 readonly attribute DOMHighResTimeStamp lastUserGestureTimeStamp;
602 boolean consumeTransientUserGestureActivation();
605 // Extension to give chrome JS the ability to set an event handler which is
606 // called with certain events that happened while events were suppressed in the
607 // document or one of its subdocuments.
608 partial interface Document {
610 undefined setSuppressedEventListener(EventListener? aListener);
613 // Allows frontend code to query a CSP which needs to be passed for a
614 // new load into docshell. Further, allows to query the CSP in JSON
615 // format for testing purposes.
616 partial interface Document {
617 [ChromeOnly] readonly attribute ContentSecurityPolicy? csp;
618 [ChromeOnly] readonly attribute DOMString cspJSON;
621 partial interface Document {
622 [Func="Document::DocumentSupportsL10n"] readonly attribute DocumentL10n? l10n;
623 [Func="Document::DocumentSupportsL10n"] readonly attribute boolean hasPendingL10nMutations;
626 Document includes XPathEvaluatorMixin;
627 Document includes GlobalEventHandlers;
628 Document includes TouchEventHandlers;
629 Document includes ParentNode;
630 Document includes OnErrorEventHandlerForNodes;
631 Document includes GeometryUtils;
632 Document includes FontFaceSource;
633 Document includes DocumentOrShadowRoot;
635 // https://w3c.github.io/webappsec-feature-policy/#idl-index
636 partial interface Document {
637 [SameObject, Pref="dom.security.featurePolicy.webidl.enabled"]
638 readonly attribute FeaturePolicy featurePolicy;
641 // Extension to give chrome JS the ability to specify a non-default keypress
643 partial interface Document {
645 * setKeyPressEventModel() is called when we need to check whether the web
646 * app requires specific keypress event model or not.
648 * @param aKeyPressEventModel Proper keypress event model for the web app.
649 * KEYPRESS_EVENT_MODEL_DEFAULT:
650 * Use default keypress event model. I.e., depending on
651 * "dom.keyboardevent.keypress.set_keycode_and_charcode_to_same_value"
653 * KEYPRESS_EVENT_MODEL_SPLIT:
654 * Use split model. I.e, if keypress event inputs a character,
655 * keyCode should be 0. Otherwise, charCode should be 0.
656 * KEYPRESS_EVENT_MODEL_CONFLATED:
657 * Use conflated model. I.e., keyCode and charCode values of each
658 * keypress event should be set to same value.
661 const unsigned short KEYPRESS_EVENT_MODEL_DEFAULT = 0;
663 const unsigned short KEYPRESS_EVENT_MODEL_SPLIT = 1;
665 const unsigned short KEYPRESS_EVENT_MODEL_CONFLATED = 2;
667 undefined setKeyPressEventModel(unsigned short aKeyPressEventModel);
670 // Extensions to return information about about the nodes blocked by the
671 // Safebrowsing API inside a document.
672 partial interface Document {
674 * Number of nodes that have been blocked by the Safebrowsing API to prevent
675 * tracking, cryptomining and so on. This method is for testing only.
678 readonly attribute long blockedNodeByClassifierCount;
681 * List of nodes that have been blocked by the Safebrowsing API to prevent
682 * tracking, fingerprinting, cryptomining and so on. This method is for
686 readonly attribute NodeList blockedNodesByClassifier;
689 // Extension to programmatically simulate a user interaction on a document,
691 partial interface Document {
692 [ChromeOnly, BinaryName="setUserHasInteracted"]
693 undefined userInteractionForTesting();
696 // Extension for permission delegation.
697 partial interface Document {
699 readonly attribute nsIPermissionDelegateHandler permDelegateHandler;
702 // Extension used by the password manager to infer form submissions.
703 partial interface Document {
705 * Set whether the document notifies an event when a fetch or
706 * XHR completes successfully.
709 undefined setNotifyFetchSuccess(boolean aShouldNotify);
712 * Set whether a form and a password field notify an event when it is
713 * removed from the DOM tree.
716 undefined setNotifyFormOrPasswordRemoved(boolean aShouldNotify);
719 // Extension to allow chrome code to detect initial about:blank documents.
720 partial interface Document {
722 readonly attribute boolean isInitialDocument;
725 // Extension to allow chrome code to get some wireframe-like structure.
726 enum WireframeRectType {
732 dictionary WireframeTaggedRect {
733 unrestricted double x = 0;
734 unrestricted double y = 0;
735 unrestricted double width = 0;
736 unrestricted double height = 0;
737 unsigned long color = 0; // in nscolor format
738 WireframeRectType type;
742 dictionary Wireframe {
743 unsigned long canvasBackground = 0; // in nscolor format
744 sequence<WireframeTaggedRect> rects;
745 unsigned long version = 1; // Increment when the wireframe structure changes in backwards-incompatible ways
747 partial interface Document {
749 Wireframe? getWireframe(optional boolean aIncludeNodes = false);
752 partial interface Document {
753 // Returns true if the document is the current active document in a browsing
754 // context which isn't in bfcache.