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/.
5 * The origin of this IDL file is
6 * http://domparsing.spec.whatwg.org/#the-domparser-interface
11 interface InputStream;
17 "application/xhtml+xml",
26 [NewObject, Throws, UseCounter]
27 Document parseFromString(DOMString str, SupportedType type);
29 [NewObject, ChromeOnly, Throws]
30 Document parseFromSafeString(DOMString str, SupportedType type);
32 // Mozilla-specific stuff
33 [NewObject, Throws, ChromeOnly]
34 Document parseFromBuffer(sequence<octet> buf, SupportedType type);
35 [NewObject, Throws, ChromeOnly]
36 Document parseFromBuffer(Uint8Array buf, SupportedType type);
37 [NewObject, Throws, ChromeOnly]
38 Document parseFromStream(InputStream stream, DOMString? charset,
39 long contentLength, SupportedType type);
40 // Can be used to allow a DOMParser to parse XUL/XBL no matter what
41 // principal it's using for the document.
43 undefined forceEnableXULXBL();
45 // Can be used to allow a DOMParser to load DTDs from URLs that
46 // normally would not be allowed based on the document principal.
47 [Func="IsChromeOrUAWidget"]
48 undefined forceEnableDTD();