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 */
8
9// invalid widl
10// interface Principal;
11// interface URI;
12// interface InputStream;
13
14enum SupportedType {
15  "text/html",
16  "text/xml",
17  "application/xml",
18  "application/xhtml+xml",
19  "image/svg+xml"
20};
21
22[Constructor]
23interface DOMParser {
24  [NewObject, Throws]
25  Document parseFromString(DOMString str, SupportedType type);
26
27  // Can be used to allow a DOMParser to parse XUL/XBL no matter what
28  // principal it's using for the document.
29  [ChromeOnly]
30  undefined forceEnableXULXBL();
31};
32