blob: 05afebdeb7659b7af9faecc103e5f72b9d7dfba2 [file] [log] [blame]
/*
* Copyright 2014 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// https://www.w3.org/TR/dom/#node
[
GetOpaqueRoot=GetRootNode,
AddOpaqueRoots=(GetRootNode),
]
interface Node : EventTarget {
const unsigned short ELEMENT_NODE = 1;
const unsigned short TEXT_NODE = 3;
const unsigned short CDATA_SECTION_NODE = 4; // historical
const unsigned short COMMENT_NODE = 8;
const unsigned short DOCUMENT_NODE = 9;
readonly attribute unsigned short nodeType;
readonly attribute DOMString nodeName;
readonly attribute Document? ownerDocument;
readonly attribute Node? parentNode;
readonly attribute Element? parentElement;
boolean hasChildNodes();
[SameObject] readonly attribute NodeList childNodes;
readonly attribute Node? firstChild;
readonly attribute Node? lastChild;
readonly attribute Node? previousSibling;
readonly attribute Node? nextSibling;
attribute DOMString? nodeValue;
attribute DOMString? textContent;
Node cloneNode(optional boolean deep = false);
boolean contains(Node? other);
Node insertBefore(Node node, Node? child);
Node appendChild(Node node);
Node replaceChild(Node node, Node child);
Node removeChild(Node child);
};