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",
21 // the latter is Mozilla-specific
23 Constructor(Principal? prin, optional URI? documentURI = null,
24 optional URI? baseURI = null)]
27 Document parseFromString(DOMString str, SupportedType type);
29 // Mozilla-specific stuff
30 // Throws if the passed-in length is greater than the actual sequence length
31 [NewObject, Throws, ChromeOnly]
32 Document parseFromBuffer(sequence<octet> buf, unsigned long bufLen,
34 // Throws if the passed-in length is greater than the actual typed array length
35 [NewObject, Throws, ChromeOnly]
36 Document parseFromBuffer(Uint8Array buf, unsigned long bufLen,
38 [NewObject, Throws, ChromeOnly]
39 Document parseFromStream(InputStream stream, DOMString? charset,
40 long contentLength, SupportedType type);
42 void init(optional Principal? principal = null,
43 optional URI? documentURI = null,
44 optional URI? baseURI = null);