1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
4 * You can obtain one at http://mozilla.org/MPL/2.0/.
8 * This file declares the AnonymousContent interface which is used to
9 * manipulate content that has been inserted into the document's canvasFrame
10 * anonymous container.
11 * See Document.insertAnonymousContent.
13 * This API never returns a reference to the actual inserted DOM node on
14 * purpose. This is to make sure the content cannot be randomly changed and the
15 * DOM cannot be traversed from the node, so that Gecko can remain in control of
16 * the inserted content.
20 interface AnonymousContent {
22 * Get the text content of an element inside this custom anonymous content.
25 DOMString getTextContentForElement(DOMString elementId);
28 * Set the text content of an element inside this custom anonymous content.
31 void setTextContentForElement(DOMString elementId, DOMString text);
34 * Get the value of an attribute of an element inside this custom anonymous
38 DOMString? getAttributeForElement(DOMString elementId,
39 DOMString attributeName);
42 * Set the value of an attribute of an element inside this custom anonymous
46 void setAttributeForElement(DOMString elementId,
47 DOMString attributeName,
51 * Remove an attribute from an element inside this custom anonymous content.
54 void removeAttributeForElement(DOMString elementId,
55 DOMString attributeName);