Bug 1526591 - Remove devtools.inspector.shapesHighlighter.enabled pref. r=rcaliman
[gecko.git] / dom / webidl / DOMParser.webidl
blob8afff03da2256a1bf4b9b8e17a2c8ef9ea0c3292
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
3  * You can obtain one at http://mozilla.org/MPL/2.0/.
4  *
5  * The origin of this IDL file is
6  * http://domparsing.spec.whatwg.org/#the-domparser-interface
7  */
9 interface Principal;
10 interface URI;
11 interface InputStream;
13 enum SupportedType {
14   "text/html",
15   "text/xml",
16   "application/xml",
17   "application/xhtml+xml",
18   "image/svg+xml"
21 // the latter is Mozilla-specific
22 [Constructor]
23 interface DOMParser {
24   [NewObject, Throws]
25   Document parseFromString(DOMString str, SupportedType type);
27   // Mozilla-specific stuff
28   [NewObject, Throws, ChromeOnly]
29   Document parseFromBuffer(sequence<octet> buf, SupportedType type);
30   [NewObject, Throws, ChromeOnly]
31   Document parseFromBuffer(Uint8Array buf, SupportedType type);
32   [NewObject, Throws, ChromeOnly]
33   Document parseFromStream(InputStream stream, DOMString? charset,
34                            long contentLength, SupportedType type);
35   // Can be used to allow a DOMParser to parse XUL/XBL no matter what
36   // principal it's using for the document.
37   [ChromeOnly]
38   void forceEnableXULXBL();