Bug 1526591 - Remove devtools.inspector.shapesHighlighter.enabled pref. r=rcaliman
[gecko.git] / dom / webidl / XMLSerializer.webidl
blobc337ba45113c558f9043d2f948bfe54cf7a53d1c
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-xmlserializer-interface
7  */
9 interface OutputStream;
11 [Constructor]
12 interface XMLSerializer {
13   /**
14    * The subtree rooted by the specified element is serialized to
15    * a string.
16    *
17    * @param root The root of the subtree to be serialized. This could
18    *             be any node, including a Document.
19    * @returns The serialized subtree in the form of a Unicode string
20    */
21   [Throws]
22   DOMString serializeToString(Node root);
24   // Mozilla-specific stuff
25   /**
26    * The subtree rooted by the specified element is serialized to
27    * a byte stream using the character set specified.
28    * @param root The root of the subtree to be serialized. This could
29    *             be any node, including a Document.
30    * @param stream The byte stream to which the subtree is serialized.
31    * @param charset The name of the character set to use for the encoding
32    *                to a byte stream.  If this string is empty and root is
33    *                a document, the document's character set will be used.
34    */
35   [Throws, ChromeOnly]
36   void serializeToStream(Node root, OutputStream stream, DOMString? charset);