PageRenderTime 103ms CodeModel.GetById 60ms app.highlight 1ms RepoModel.GetById 39ms app.codeStats 0ms

/gecko_sdk/idl/nsIDOMNode.idl

http://firefox-mac-pdf.googlecode.com/
IDL | 110 lines | 47 code | 5 blank | 58 comment | 0 complexity | de93ff9368117df07718a9216323aff8 MD5 | raw file
  1/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2/* ***** BEGIN LICENSE BLOCK *****
  3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  4 *
  5 * The contents of this file are subject to the Mozilla Public License Version
  6 * 1.1 (the "License"); you may not use this file except in compliance with
  7 * the License. You may obtain a copy of the License at
  8 * http://www.mozilla.org/MPL/
  9 *
 10 * Software distributed under the License is distributed on an "AS IS" basis,
 11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 12 * for the specific language governing rights and limitations under the
 13 * License.
 14 *
 15 * The Original Code is mozilla.org code.
 16 *
 17 * The Initial Developer of the Original Code is
 18 * Netscape Communications Corporation.
 19 * Portions created by the Initial Developer are Copyright (C) 2000
 20 * the Initial Developer. All Rights Reserved.
 21 *
 22 * Contributor(s):
 23 *   Vidur Apparao <vidur@netscape.com> (original author)
 24 *   Johnny Stenback <jst@netscape.com>
 25 *
 26 * Alternatively, the contents of this file may be used under the terms of
 27 * either of the GNU General Public License Version 2 or later (the "GPL"),
 28 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
 29 * in which case the provisions of the GPL or the LGPL are applicable instead
 30 * of those above. If you wish to allow use of your version of this file only
 31 * under the terms of either the GPL or the LGPL, and not to allow others to
 32 * use your version of this file under the terms of the MPL, indicate your
 33 * decision by deleting the provisions above and replace them with the notice
 34 * and other provisions required by the GPL or the LGPL. If you do not delete
 35 * the provisions above, a recipient may use your version of this file under
 36 * the terms of any one of the MPL, the GPL or the LGPL.
 37 *
 38 * ***** END LICENSE BLOCK ***** */
 39
 40#include "domstubs.idl"
 41
 42/**
 43 * The nsIDOMNode interface is the primary datatype for the entire 
 44 * Document Object Model.
 45 * It represents a single node in the document tree.
 46 *
 47 * For more information on this interface please see 
 48 * http://www.w3.org/TR/DOM-Level-2-Core/
 49 *
 50 * @status FROZEN
 51 */
 52
 53[scriptable, uuid(a6cf907c-15b3-11d2-932e-00805f8add32)]
 54interface nsIDOMNode : nsISupports
 55{
 56  const unsigned short      ELEMENT_NODE       = 1;
 57  const unsigned short      ATTRIBUTE_NODE     = 2;
 58  const unsigned short      TEXT_NODE          = 3;
 59  const unsigned short      CDATA_SECTION_NODE = 4;
 60  const unsigned short      ENTITY_REFERENCE_NODE = 5;
 61  const unsigned short      ENTITY_NODE        = 6;
 62  const unsigned short      PROCESSING_INSTRUCTION_NODE = 7;
 63  const unsigned short      COMMENT_NODE       = 8;
 64  const unsigned short      DOCUMENT_NODE      = 9;
 65  const unsigned short      DOCUMENT_TYPE_NODE = 10;
 66  const unsigned short      DOCUMENT_FRAGMENT_NODE = 11;
 67  const unsigned short      NOTATION_NODE      = 12;
 68
 69  readonly attribute DOMString        nodeName;
 70           attribute DOMString        nodeValue;
 71                                          // raises(DOMException) on setting
 72                                          // raises(DOMException) on retrieval
 73  readonly attribute unsigned short   nodeType;
 74  readonly attribute nsIDOMNode       parentNode;
 75  readonly attribute nsIDOMNodeList   childNodes;
 76  readonly attribute nsIDOMNode       firstChild;
 77  readonly attribute nsIDOMNode       lastChild;
 78  readonly attribute nsIDOMNode       previousSibling;
 79  readonly attribute nsIDOMNode       nextSibling;
 80  readonly attribute nsIDOMNamedNodeMap attributes;
 81  // Modified in DOM Level 2:
 82  readonly attribute nsIDOMDocument   ownerDocument;
 83  nsIDOMNode                insertBefore(in nsIDOMNode newChild, 
 84                                         in nsIDOMNode refChild)
 85                                          raises(DOMException);
 86  nsIDOMNode                replaceChild(in nsIDOMNode newChild, 
 87                                         in nsIDOMNode oldChild)
 88                                          raises(DOMException);
 89  nsIDOMNode                removeChild(in nsIDOMNode oldChild)
 90                                         raises(DOMException);
 91  nsIDOMNode                appendChild(in nsIDOMNode newChild)
 92                                         raises(DOMException);
 93  boolean                   hasChildNodes();
 94  nsIDOMNode                cloneNode(in boolean deep);
 95  // Modified in DOM Level 2:
 96  void                      normalize();
 97  // Introduced in DOM Level 2:
 98  boolean                   isSupported(in DOMString feature, 
 99                                        in DOMString version);
100  // Introduced in DOM Level 2:
101  readonly attribute DOMString        namespaceURI;
102  // Introduced in DOM Level 2:
103           attribute DOMString        prefix;
104                                         // raises(DOMException) on setting
105
106  // Introduced in DOM Level 2:
107  readonly attribute DOMString        localName;
108  // Introduced in DOM Level 2:
109  boolean            hasAttributes();
110};