mozilla

Revision 380709 of Document

  • 리비전 슬러그: DOM/document
  • 리비전 제목: document
  • 리비전 아이디: 380709
  • 제작일시:
  • 만든이: jryans
  • 현재 리비전인가요? 아니오
  • 댓글 Added createNodeIterator.

리비전 내용

{{DomRef}}

Each web page loaded in the browser has its own document object. This object serves as an entry point to the web page's content (the DOM tree, including elements such as {{HTMLElement("body")}} and {{HTMLElement("table")}}) and provides functionality global to the document (such as obtaining the page's URL and creating new elements in the document).

A document object can be obtained from various APIs:

  • Most commonly, you work with the document the script is running in by using document in document's scripts. (The same document can also be referred to as {{domxref("window.document")}}.)
  • The document of an iframe via the iframe's contentDocument property.
  • The responseXML of an XMLHttpRequest object.
  • The document that a given node or element belongs to can be retrieved using the node's {{domxref("Node.ownerDocument","ownerDocument")}} property.
  • ...and more.

Depending on the kind of the document (e.g. HTML or XML) different APIs may be available on the document object. This theoretical availability of APIs is usually described in terms of implementing interfaces defined in the relevant W3C DOM specifications:

  • All document objects implement the DOM Core Document and {{domxref("Node")}} interfaces, meaning that the "core" properties and methods are available for all kinds of documents.
  • In addition to the generalized DOM Core document interface, HTML documents also implement the HTMLDocument interface, which is a more specialized interface for dealing with HTML documents (e.g., {{domxref("document.cookie")}}, {{domxref("document.alinkColor")}}).
  • XUL documents (available to Mozilla add-on and application developers) implement their own additions to the core Document functionality.

Methods or properties listed here that are part of a more specialized interface have an asterisk (*) next to them and have additional information in the Availability column.

Note that some APIs listed below are not available in all browsers for various reasons:

  • Obsolete: on its way of being removed from supporting browsers.
  • Non-standard: either an experimental feature not (yet?) agreed upon by all vendors, or a feature targeted specifically at the code running in a specific browser (e.g. Mozilla has a few DOM APIs created for its add-ons and application development).
  • Part of a completed or an emerging standard, but not (yet?) implemented in all browsers or implemented in the newest versions of the browsers.

Detailed browser compatibility tables are located at the pages describing each property or method.

Properties

Name Description Return Type Availability
{{domxref("document.activeElement")}} Returns the currently focused element {{domxref("element","Element")}} All
{{domxref("document.alinkColor")}}* {{Deprecated_inline}} Returns or sets the color of active links in the document body. String HTML
{{domxref("document.all")}}* {{Deprecated_inline}}     HTML
{{domxref("document.anchors")}}* Returns a list of all of the anchors in the document. {{domxref("HTMLCollection")}} HTML
{{domxref("document.applets")}}* {{Deprecated_inline}} Returns an ordered list of the applets within a document. {{domxref("HTMLCollection")}} HTML
{{domxref("document.async")}} Used with {{domxref("document.load")}} to indicate an asynchronous request. n/a All
{{domxref("Node.attributes")}} Returns a collection of attributes of the given element {{domxref("NamedNodeMap")}} All
{{domxref("Node.baseURI")}} Gets the base URI for the document String All
{{domxref("document.baseURIObject")}} {{gecko_minversion_inline("1.9")}} {{non-standard_inline}} (Mozilla add-ons only!) Returns an {{Interface("nsIURI")}} object representing the base URI for the document. {{Interface("nsIURI")}} All (with UniversalXPConnect privileges)
{{domxref("document.bgColor")}}* {{Deprecated_inline}} Gets/sets the background color of the current document. String HTML
{{domxref("document.body")}}* Returns the BODY node of the current document. {{domxref("HTMLBodyElement")}} HTML
{{domxref("document.characterSet")}} Returns the character set being used by the document. String All
{{domxref("Node.childNodes")}} returns a collection of child nodes of the given node {{domxref("NodeList")}} All
{{domxref("document.compatMode")}}* Indicates whether the document is rendered in Quirks or Strict mode. String HTML
{{domxref("document.contentType")}} {{non-standard_inline}} Returns the Content-Type from the MIME Header of the current document. String All
{{domxref("document.cookie")}}* Returns a semicolon-separated list of the cookies for that document or sets a single cookie. String HTML
{{domxref("document.currentScript")}}* {{gecko_minversion_inline("2.0")}} {{non-standard_inline}} Returns the {{HTMLElement("script")}} element that is currently executing. {{domxref("Element")}} HTML, XUL
{{domxref("document.defaultView")}} Returns a reference to the window object. {{domxref("window","Window")}} All
{{domxref("document.designMode")}}* Gets/sets WYSYWIG editing capability of Midas. It can only be used for HTML documents. String HTML
{{domxref("document.dir")}} Gets/sets directionality (rtl/ltr) of the document String ?
{{domxref("document.doctype")}} Returns the Document Type Definition (DTD) of the current document. {{domxref("DocumentType")}} All
{{domxref("document.documentElement")}} Returns the Element that is a direct child of document. For HTML documents, this is normally the HTML element. {{domxref("element", "Element")}} All
{{domxref("document.documentURI")}} Returns the document location. String All
{{domxref("document.documentURIObject")}} {{gecko_minversion_inline("1.9")}} {{non-standard_inline}} (Mozilla add-ons only!) Returns the {{Interface("nsIURI")}} object representing the URI of the document. This property only has special meaning in privileged JavaScript code (with UniversalXPConnect privileges). nsIURI All (with UniversalXPConnect privileges)
{{domxref("document.domain")}}* Returns the domain of the current document. String HTML
{{domxref("document.domConfig")}} {{obsolete_inline}} Should return a DOMConfiguration object DOMConfiguration DOM 3
{{domxref("document.embeds")}}* Returns a list of the embedded OBJECTS within the current document. {{domxref("HTMLCollection")}} HTML
{{domxref("document.fgColor")}}* {{Deprecated_inline}} Gets/sets the foreground color, or text color, of the current document. String HTML
{{domxref("document.fileSize")}}* {{non-standard_inline}} {{unimplemented_inline}}

(IE-only!) Returns size in bytes of the document. See MSDN.

Number HTML
{{domxref("Node.firstChild")}} Returns the first node in the list of direct children of the document, typically (but not limited to) the DocumentType (same as {{domxref("document.doctype")}}) or the root element ({{domxref("document.documentElement")}}) Node All
{{domxref("document.forms")}}* Returns a list of the FORM elements within the current document. {{domxref("HTMLCollection")}} HTML
{{domxref("document.head")}}* Returns the HEAD node of the current document. {{domxref("HTMLHeadElement")}} HTML
{{domxref("document.height")}} {{obsolete_inline("6")}} Gets/sets the height of the current document. Number ?
{{domxref("document.images")}}* Returns a list of the images in the current document. {{domxref("HTMLCollection")}} HTML
{{domxref("document.implementation")}} Returns the DOM implementation associated with the current document. {{domxref("DOMImplementation")}} All
{{domxref("document.inputEncoding")}} Returns the encoding used when the document was parsed. String All
{{domxref("Node.lastChild")}} Returns the last child of a node {{domxref("Node")}} All
{{domxref("document.lastModified")}} Returns the date on which the document was last modified. String All
{{domxref("document.lastStyleSheetSet")}} {{gecko_minversion_inline("1.9")}} Returns the name of the style sheet set that was last enabled. Has the value null until the style sheet is changed by setting the value of {{domxref("document.selectedStyleSheetSet","selectedStyleSheetSet")}}. String All
{{domxref("document.linkColor")}}* {{Deprecated_inline}} Gets/sets the color of hyperlinks in the document. String HTML
{{domxref("document.links")}}* Returns a list of all the hyperlinks in the document. {{domxref("HTMLCollection")}} HTML
{{domxref("Node.localName")}} Returns the local part of the qualified name of this node (null for a document) String All
{{domxref("document.location")}} Returns the URI of the current document. {{domxref("Location")}} All
{{domxref("document.mozSyntheticDocument")}} {{non-standard_inline}} {{gecko_minversion_inline("8.0")}} true if this document is synthetic, such as a standalone image, video, audio file, or the like. Boolean All
{{domxref("document.mozFullScreen")}} {{non-standard_inline}} {{gecko_minversion_inline("9.0")}} true when the document is in {{domxref("Using_full-screen_mode","full-screen mode")}}. Boolean All
{{domxref("document.mozFullScreenElement")}} {{non-standard_inline}} {{gecko_minversion_inline("9.0")}} The element that's currently in full screen mode for this document. {{domxref("Element")}} All
{{domxref("document.mozFullScreenEnabled")}} {{non-standard_inline}} {{gecko_minversion_inline("9.0")}} true if calling {{domxref("element.mozRequestFullscreen()")}} would succeed in the curent document. Boolean All
{{domxref("Node.namespaceURI")}} Returns the XML namespace of the current document.   All
{{domxref("Node.nextSibling")}} Returns the node immediately following the specified one in its parent's childNodes list, or null if the specified node is the last node in that list (null for documents)   All
{{domxref("Node.nodeName")}} Returns the node's name (#document for document) String All
{{domxref("Node.nodeType")}} Returns a node type constant (9 for document) Number All
{{domxref("Node.nodeValue")}} Returns the node's value (null for document)   All
{{domxref("Node.nodePrincipal")}} {{non-standard_inline}} {{gecko_minversion_inline("1.9")}} (Mozilla add-ons only!) Returns the nsIPrincipal object representing current security context of the document. {{Interface("nsIPrincipal")}} All (with UniversalXPConnect privileges)
{{domxref("Node.ownerDocument")}} Returns the top-level document object for this node (null if already is the document).   All
{{domxref("Node.parentNode")}} Returns the parent of the specified node in the DOM tree (null for document)   All
{{domxref("document.plugins")}} Returns a list of the available plugins. {{domxref("HTMLCollection")}} HTML
{{domxref("document.popupNode")}}* Returns the node upon which a popup was invoked (XUL documents only). {{domxref("Node")}} XUL
{{domxref("document.preferredStyleSheetSet")}} Returns the preferred style sheet set as specified by the page author. String All
{{domxref("Node.prefix")}} Returns the namespace prefix of the specified node, or null if no prefix is specified   All
{{domxref("Node.previousSibling")}} Returns the node immediately preceding the specified one in its parent's {{domxref("element.childNodes","childNodes")}} list, null if the specified node is the first in that list (null for document)   All
{{domxref("document.readyState")}} {{gecko_minversion_inline("1.9.2")}} Returns loading status of the document String All
{{domxref("document.referrer")}}* Returns the URI of the page that linked to this page. String All
{{domxref("document.scripts")}} Returns all the {{HTMLElement("script")}} elements on the document. {{domxref("HTMLCollection")}} HTML
{{domxref("document.selectedStyleSheetSet")}} {{gecko_minversion_inline("1.9")}} Returns which style sheet set is currently in use. String All
{{domxref("document.styleSheets")}} Returns a list of the stylesheet objects on the current document. {{domxref("StyleSheetList")}} All
{{domxref("document.styleSheetSets")}} {{gecko_minversion_inline("1.9")}} Returns a list of the style sheet sets available on the document. StringList All
{{domxref("Node.textContent")}} Returns null (returns other values for other nodes). Null All
{{domxref("document.title")}}* Returns the title of the current document. String HTML, XUL
{{domxref("document.tooltipNode")}}* Returns the node which is the target of the current tooltip. Node Object XUL
{{domxref("document.URL")}}* Returns a string containing the URL of the current document. String HTML
{{domxref("document.vlinkColor")}}* {{Deprecated_inline}} Gets/sets the color of visited hyperlinks. String HTML
{{domxref("document.width")}} {{obsolete_inline("6")}} Returns the width of the current document. Number ?
{{domxref("document.xmlEncoding")}} {{Deprecated_inline}} Returns the encoding as determined by the XML declaration.
Firefox 10 and later don't implement it anymore.
String DOM 3 Removed in DOM 4
{{domxref("document.xmlStandalone")}} {{obsolete_inline("10.0")}}

Returns true if the XML declaration specifies the document is standalone (e.g., An external part of the DTD affects the document's content), else false.

Boolean DOM 3 Removed in DOM 4
{{domxref("document.xmlVersion")}} {{obsolete_inline("10.0")}}

Returns the version number as specified in the XML declaration or "1.0" if the declaration is absent.

String DOM 3 Removed in DOM 4

Methods

{{domxref("element.addEventListener")}}
Adds an event listener to the document.
{{domxref("document.adoptNode")}} {{Fx_minversion_inline("3")}}
Adopt node from an external document
{{domxref("Node.appendChild")}}
Adds a node to the end of the list of children of a specified parent node.
{{domxref("document.captureEvents")}}
{{todo("Description")}}
{{domxref("document.caretPositionFromPoint")}}
Gets a {{domxref("CaretPosition")}} based on two coordinates.
{{domxref("document.clear")}}* {{Deprecated_inline}}
In majority of modern browsers, including recent versions of Firefox and Internet Explorer, this method does nothing.
{{domxref("Node.cloneNode")}}
Makes a copy of a node or document
{{domxref("document.close")}}*
Closes a document stream for writing.
{{domxref("Node.compareDocumentPosition")}}
Compares the position of the current node against another node in any other document.
{{domxref("document.createAttribute")}}
Creates a new attribute node and returns it.
{{domxref("document.createAttributeNS")}}
Creates a new attribute node in a given namespace and returns it.
{{domxref("document.createCDATASection")}}
Creates a new CDATA node and returns it.
{{domxref("document.createComment")}}
Creates a new comment node and returns it.
{{domxref("document.createDocumentFragment")}}
Creates a new document fragment.
{{domxref("document.createElement")}}
Creates a new element with the given tag name.
{{domxref("document.createElementNS")}}
Creates a new element with the given tag name and namespace URI.
{{domxref("document.createEntityReference")}} {{obsolete_inline("7.0")}}
Creates a new entity reference object and returns it.
{{domxref("document.createEvent")}}
Creates an event.
{{domxref("document.createExpression")}}
Compiles an XPathExpression which can then be used for (repeated) evaluations.
{{domxref("document.createNodeIterator")}}
Creates a {{domxref("NodeIterator")}} object.
{{domxref("document.createNSResolver")}}
Creates an XPathNSResolver.
{{domxref("document.createProcessingInstruction")}}
Creates a new processing instruction element and returns it.
{{domxref("document.createRange")}}
Creates a {{domxref("range","Range")}} object.
{{domxref("document.createTextNode")}}
Creates a text node.
{{domxref("document.createTreeWalker")}}
Creates a {{domxref("treeWalker")}} object.
{{domxref("document.elementFromPoint")}} {{Fx_minversion_inline("3")}}
Returns the element visible at the specified coordinates.
{{domxref("document.enableStyleSheetsForSet()")}} {{gecko_minversion_inline("1.9")}}
Enables the style sheets for the specified style sheet set.
{{domxref("document.evaluate")}}
Evaluates an XPath expression.
document.execCommand*
Executes a Midas command.
{{domxref("document.execCommandShowHelp")}} {{obsolete_inline("14.0")}}
This method never did anything and always threw an exception, so it was removed in Gecko 14.0 {{geckoRelease("14.0")}}
{{domxref("document.getBoxObjectFor")}}
{{todo("Description")}}
{{domxref("document.getElementById")}}
Returns an object reference to the identified element.
{{domxref("document.getElementsByClassName")}} {{Fx_minversion_inline("3")}}
Returns a list of elements with the given class name.
{{domxref("document.getElementsByName")}}*
Returns a list of elements with the given name.
{{domxref("document.getElementsByTagName")}}
Returns a list of elements with the given tag name.
{{domxref("document.getElementsByTagNameNS")}}
Returns a list of elements with the given tag name and namespace.
{{domxref("Node.getFeature")}}
{{todo("Description")}}
{{domxref("document.getSelection")}}
Returns a {{domxref("Selection")}} object related to text selected in the document.
{{domxref("Node.getUserData")}}
Returns any data previously set on the node via setUserData() by key
{{domxref("Node.hasAttributes")}}
Indicates whether the node possesses attributes
{{domxref("Node.hasChildNodes")}}
Returns a Boolean value indicating whether the current element has child nodes or not.
{{domxref("document.hasFocus")}}
Returns true if the focus is currently located anywhere inside the specified document.
{{domxref("document.importNode")}}
Returns a clone of a node from an external document
{{domxref("Node.insertBefore")}}
Inserts the specified node before a reference node as a child of the current node.
{{domxref("Node.isDefaultNamespace")}}
Returns true if the namespace is the default namespace on the given node
{{domxref("Node.isEqualNode")}}
Indicates whether the node is equal to the given node
{{domxref("Node.isSameNode")}}
Indicates whether the node is the same as the given node
{{domxref("Node.isSupported")}}
Tests whether the DOM implementation implements a specific feature and that feature is supported by this node or document
{{domxref("document.load")}}
Load an XML document
{{domxref("document.loadOverlay")}}* {{Fx_minversion_inline("1.5")}}
Loads a XUL overlay dynamically. This only works in XUL documents.
{{domxref("Node.lookupNamespaceURI")}}
Returns the namespaceURI associated with a given prefix on the given node object
{{domxref("Node.lookupPrefix")}}
Returns the prefix for a given namespaceURI on the given node if present
{{domxref("Node.normalize")}}
Normalizes the node or document
{{domxref("document.normalizeDocument")}} {{obsolete_inline("7.0")}}
Replaces entities, normalizes text nodes, etc.
{{domxref("document.open")}}*
Opens a document stream for writing.
{{domxref("document.queryCommandEnabled")}}*
Returns true if the Midas command can be executed on the current range.
{{domxref("document.queryCommandIndeterm")}}*
Returns true if the Midas command is in a indeterminate state on the current range.
{{domxref("document.queryCommandState")}}*
Returns true if the Midas command has been executed on the current range.
{{domxref("document.queryCommandSupported")}}
{{todo("Description")}}
{{domxref("document.queryCommandText")}} {{obsolete_inline("14.0")}}
This method never did anything but throw an exception, and was removed in Gecko 14.0 {{geckoRelease("14.0")}}.
{{domxref("document.queryCommandValue")}}*
Returns the current value of the current range for Midas command. As of Firefox 2.0.0.2, queryCommandValue will return an empty string when a command value has not been explicitly set.
{{domxref("document.querySelector")}} {{gecko_minversion_inline("1.9.1")}}
Returns the first Element node within the document, in document order, that matches the specified selectors.
{{domxref("document.querySelectorAll")}} {{gecko_minversion_inline("1.9.1")}}
Returns a list of all the Element nodes within the document that match the specified selectors.
{{domxref("document.releaseCapture()")}} {{gecko_minversion_inline("2.0")}}
Releases the current mouse capture if it's on an element in this document.
{{domxref("document.releaseEvents")}}
{{todo("Description")}}
{{domxref("Node.removeChild")}}
Removes a child node from the DOM
{{domxref("document.removeEventListener")}}
Removes an event listener from the document
{{domxref("Node.replaceChild")}}
Replaces one child node of the specified node with another
{{domxref("document.routeEvent")}}
{{todo("Description")}}
{{domxref("document.mozSetImageElement")}} {{gecko_minversion_inline("2.0")}}
Allows you to change the element being used as the background image for a specified element ID.
{{domxref("Node.setUserData")}}
Attaches arbitrary data to a node, along with a user-defined key and an optional handler to be triggered upon events such as cloning of the node upon which the data was attached
{{domxref("document.write")}}*
Writes text to a document.
{{domxref("document.writeln")}}*
Write a line of text to a document.

Event handlers

Firefox 3 introduces two new events: "online" and "offline". These two events are fired on the {{HTMLElement("body")}} of each page when the browser switches between online and offline mode. Additionally, the events bubble up from {{domxref("document.body")}}, to {{domxref("Document")}}, ending at {{domxref("Window")}}. Both events are non-cancelable (you can't prevent the user from coming online, or going offline). For more details see Online and offline events.

Also, see the {{domxref("DOM_event_reference","DOM event reference")}} for a list of available events.

{{domxref("document.ononline")}} {{Fx_minversion_inline("3")}}
Returns the event handling code for the online event.
{{domxref("document.onoffline")}} {{Fx_minversion_inline("3")}}
Returns the event handling code for the offline event.
{{domxref("document.onreadystatechange")}} {{gecko_minversion_inline("1.9.2")}}
Returns the event handling code for the readystatechange event.

{{gecko_callout_heading("9.0")}}

Starting in Gecko 9.0 {{geckoRelease("9.0")}}, you can now use the syntax if ("onabort" in document) to determine whether or not a given event handler property exists. This is because event handler interfaces have been updated to be proper web IDL interfaces. See {{domxref("DOM_event_handlers","DOM event handlers")}} for details.

Security notes

{{Fx_minversion_note(3, "This section covers security improvements made in Firefox 3/Gecko 1.9.")}}

When a new document is created, it initially gets "about:blank" loaded into it. In versions of Firefox prior to Firefox 3, "about:blank" documents didn't get the parent principal. This means that access to their contents was not restricted. While this doesn't seem like a significant issue, it can be if code proceeds to add content to the document using DOM methods and properties such as {{domxref("Node.appendChild")}} and so forth, because that content would not be protected from unauthorized access.

Firefox 3 updates Gecko so that new documents inherit the parent principal. This improves security both for iframes and documents that are in the process of being loaded, as well as for documents constructed programmatically.

Specification

리비전 소스

<div>
  {{DomRef}}</div>
<p>Each web page loaded in the browser has its own <strong>document</strong> object. This object serves as an entry point to the web page's content (the <a href="/en-US/docs/Using_the_W3C_DOM_Level_1_Core" title="Using_the_W3C_DOM_Level_1_Core">DOM tree</a>, including elements such as {{HTMLElement("body")}} and {{HTMLElement("table")}}) and provides functionality global to the document (such as obtaining the page's URL and creating new elements in the document).</p>
<p>A document object can be obtained from various APIs:</p>
<ul>
  <li>Most commonly, you work with the document the script is running in by using <code>document</code> in document's <a href="/en-US/docs/HTML/Element/Script" title="HTML/Element/Script">scripts</a>. (The same document can also be referred to as {{domxref("window.document")}}.)</li>
  <li>The document of an iframe via the iframe's <code><a href="/en-US/docs/DOM/HTMLIFrameElement#Properties" title="DOM/HTMLIFrameElement#Properties">contentDocument</a></code> property.</li>
  <li>The <a href="/en-US/docs/nsIXMLHttpRequest#Attributes" title="XMLHttpRequest#Attributes"><code>responseXML</code> of an <code>XMLHttpRequest</code> object</a>.</li>
  <li>The document that a given node or element belongs to can be retrieved using the node's {{domxref("Node.ownerDocument","ownerDocument")}} property.</li>
  <li>...and more.</li>
</ul>
<p>Depending on the kind of the document (e.g. <a href="/en-US/docs/HTML" title="HTML">HTML</a> or <a href="/en-US/docs/XML" title="XML">XML</a>) different APIs may be available on the document object. This theoretical availability of APIs is usually described in terms of <em>implementing interfaces</em> defined in the relevant W3C DOM specifications:</p>
<ul>
  <li>All document objects implement the DOM Core <a href="http://www.w3.org/TR/DOM-Level-2-Core/core.html#i-Document"><code>Document</code></a> and {{domxref("Node")}} interfaces, meaning that the "core" properties and methods are available for all kinds of documents.</li>
  <li>In addition to the generalized DOM Core document interface, HTML documents also implement the <code><a href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-26809268">HTMLDocument</a></code> interface, which is a more specialized interface for dealing with HTML documents (e.g., {{domxref("document.cookie")}}, {{domxref("document.alinkColor")}}).</li>
  <li><a href="/en-US/docs/XUL" title="XUL">XUL</a> documents (available to Mozilla add-on and application developers) implement their own additions to the core Document functionality.</li>
</ul>
<p>Methods or properties listed here that are part of a more specialized interface have an asterisk (*) next to them and have additional information in the Availability column.</p>
<p>Note that some APIs listed below are not available in all browsers for various reasons:</p>
<ul>
  <li><strong>Obsolete</strong>: on its way of being removed from supporting browsers.</li>
  <li><strong>Non-standard</strong>: either an experimental feature not (yet?) agreed upon by all vendors, or a feature targeted specifically at the code running in a specific browser (e.g. Mozilla has a few DOM APIs created for its add-ons and application development).</li>
  <li>Part of a completed or an emerging standard, but not (yet?) implemented in all browsers or implemented in the newest versions of the browsers.</li>
</ul>
<p>Detailed browser compatibility tables are located at the pages describing each property or method.</p>
<h2 id="Properties" name="Properties">Properties</h2>
<table>
  <thead>
    <tr>
      <th scope="col">Name</th>
      <th scope="col">Description</th>
      <th scope="col">Return Type</th>
      <th scope="col">Availability</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>{{domxref("document.activeElement")}}</td>
      <td>Returns the currently focused element</td>
      <td>{{domxref("element","Element")}}</td>
      <td>All</td>
    </tr>
    <tr>
      <td>{{domxref("document.alinkColor")}}* {{Deprecated_inline}}</td>
      <td>Returns or sets the color of active links in the document body.</td>
      <td><a href="/en-US/docs/JavaScript/Reference/Global_Objects/String" title="JavaScript/Reference/Global_Objects/String">String</a></td>
      <td>HTML</td>
    </tr>
    <tr>
      <td>{{domxref("document.all")}}* {{Deprecated_inline}}</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>HTML</td>
    </tr>
    <tr>
      <td>{{domxref("document.anchors")}}*</td>
      <td>Returns a list of all of the anchors in the document.</td>
      <td>{{domxref("HTMLCollection")}}</td>
      <td>HTML</td>
    </tr>
    <tr>
      <td>{{domxref("document.applets")}}* {{Deprecated_inline}}</td>
      <td>Returns an ordered list of the applets within a document.</td>
      <td>{{domxref("HTMLCollection")}}</td>
      <td>HTML</td>
    </tr>
    <tr>
      <td>{{domxref("document.async")}}</td>
      <td>Used with {{domxref("document.load")}} to indicate an asynchronous request.</td>
      <td>n/a</td>
      <td>All</td>
    </tr>
    <tr>
      <td>{{domxref("Node.attributes")}}</td>
      <td>Returns a collection of attributes of the given element</td>
      <td>{{domxref("NamedNodeMap")}}</td>
      <td>All</td>
    </tr>
    <tr>
      <td>{{domxref("Node.baseURI")}}</td>
      <td>Gets the base URI for the document</td>
      <td><a href="/en-US/docs/JavaScript/Reference/Global_Objects/String" title="JavaScript/Reference/Global_Objects/String">String</a></td>
      <td>All</td>
    </tr>
    <tr>
      <td>{{domxref("document.baseURIObject")}} {{gecko_minversion_inline("1.9")}} {{non-standard_inline}}</td>
      <td>(<strong>Mozilla add-ons only!</strong>) Returns an {{Interface("nsIURI")}} object representing the base URI for the document.</td>
      <td>{{Interface("nsIURI")}}</td>
      <td>All <small>(with UniversalXPConnect privileges)</small></td>
    </tr>
    <tr>
      <td>{{domxref("document.bgColor")}}* {{Deprecated_inline}}</td>
      <td>Gets/sets the background color of the current document.</td>
      <td>String</td>
      <td>HTML</td>
    </tr>
    <tr>
      <td>{{domxref("document.body")}}*</td>
      <td>Returns the BODY node of the current document.</td>
      <td>{{domxref("HTMLBodyElement")}}</td>
      <td>HTML</td>
    </tr>
    <tr>
      <td>{{domxref("document.characterSet")}}</td>
      <td>Returns the character set being used by the document.</td>
      <td>String</td>
      <td>All</td>
    </tr>
    <tr>
      <td>{{domxref("Node.childNodes")}}</td>
      <td>returns a <em>collection</em> of child nodes of the given node</td>
      <td>{{domxref("NodeList")}}</td>
      <td>All</td>
    </tr>
    <tr>
      <td>{{domxref("document.compatMode")}}*</td>
      <td>Indicates whether the document is rendered in Quirks or Strict mode.</td>
      <td>String</td>
      <td>HTML</td>
    </tr>
    <tr>
      <td>{{domxref("document.contentType")}} {{non-standard_inline}}</td>
      <td>Returns the Content-Type from the MIME Header of the current document.</td>
      <td>String</td>
      <td>All</td>
    </tr>
    <tr>
      <td>{{domxref("document.cookie")}}*</td>
      <td>Returns a semicolon-separated list of the cookies for that document or sets a single cookie.</td>
      <td>String</td>
      <td>HTML</td>
    </tr>
    <tr>
      <td>{{domxref("document.currentScript")}}* {{gecko_minversion_inline("2.0")}} {{non-standard_inline}}</td>
      <td>Returns the {{HTMLElement("script")}} element that is currently executing.</td>
      <td>{{domxref("Element")}}</td>
      <td>HTML, XUL</td>
    </tr>
    <tr>
      <td>{{domxref("document.defaultView")}}</td>
      <td>Returns a reference to the window object.</td>
      <td>{{domxref("window","Window")}}</td>
      <td>All</td>
    </tr>
    <tr>
      <td>{{domxref("document.designMode")}}*</td>
      <td>Gets/sets WYSYWIG editing capability of <a href="/en-US/docs/Midas" title="Midas">Midas</a>. It can only be used for HTML documents.</td>
      <td>String</td>
      <td>HTML</td>
    </tr>
    <tr>
      <td>{{domxref("document.dir")}}</td>
      <td>Gets/sets directionality (rtl/ltr) of the document</td>
      <td>String</td>
      <td>?</td>
    </tr>
    <tr>
      <td>{{domxref("document.doctype")}}</td>
      <td>Returns the Document Type Definition (DTD) of the current document.</td>
      <td>{{domxref("DocumentType")}}</td>
      <td>All</td>
    </tr>
    <tr>
      <td>{{domxref("document.documentElement")}}</td>
      <td>Returns the Element that is a direct child of document. For HTML documents, this is normally the HTML element.</td>
      <td>{{domxref("element", "Element")}}</td>
      <td>All</td>
    </tr>
    <tr>
      <td>{{domxref("document.documentURI")}}</td>
      <td>Returns the document location.</td>
      <td>String</td>
      <td>All</td>
    </tr>
    <tr>
      <td>{{domxref("document.documentURIObject")}} {{gecko_minversion_inline("1.9")}} {{non-standard_inline}}</td>
      <td>(<strong>Mozilla add-ons only!</strong>) Returns the {{Interface("nsIURI")}} object representing the URI of the document. This property only has special meaning in privileged JavaScript code (with UniversalXPConnect privileges).</td>
      <td><a href="/en-US/docs/XPCOM_Interface_Reference/nsIURI" title="nsIURI">nsIURI</a></td>
      <td>All <small>(with UniversalXPConnect privileges)</small></td>
    </tr>
    <tr>
      <td>{{domxref("document.domain")}}*</td>
      <td>Returns the domain of the current document.</td>
      <td>String</td>
      <td>HTML</td>
    </tr>
    <tr>
      <td>{{domxref("document.domConfig")}} {{obsolete_inline}}</td>
      <td>Should return a DOMConfiguration object</td>
      <td>DOMConfiguration</td>
      <td>DOM 3</td>
    </tr>
    <tr>
      <td>{{domxref("document.embeds")}}*</td>
      <td>Returns a list of the embedded OBJECTS within the current document.</td>
      <td>{{domxref("HTMLCollection")}}</td>
      <td>HTML</td>
    </tr>
    <tr>
      <td>{{domxref("document.fgColor")}}* {{Deprecated_inline}}</td>
      <td>Gets/sets the foreground color, or text color, of the current document.</td>
      <td>String</td>
      <td>HTML</td>
    </tr>
    <tr>
      <td>{{domxref("document.fileSize")}}* {{non-standard_inline}} {{unimplemented_inline}}</td>
      <td>
        <p>(<strong>IE-only!</strong>) Returns size in bytes of the document. See <a href="http://msdn.microsoft.com/en-us/library/ms533752%28v=VS.85%29.aspx" title="http://msdn.microsoft.com/en-us/library/ms533752%28v=VS.85%29.aspx">MSDN</a>.</p>
      </td>
      <td>Number</td>
      <td>HTML</td>
    </tr>
    <tr>
      <td>{{domxref("Node.firstChild")}}</td>
      <td>Returns the first node in the list of direct children of the document, typically (but not limited to) the <a href="/DocumentType" title="DocumentType">DocumentType</a> (same as {{domxref("document.doctype")}}) or the root element ({{domxref("document.documentElement")}})</td>
      <td>Node</td>
      <td>All</td>
    </tr>
    <tr>
      <td>{{domxref("document.forms")}}*</td>
      <td>Returns a list of the FORM elements within the current document.</td>
      <td>{{domxref("HTMLCollection")}}</td>
      <td>HTML</td>
    </tr>
    <tr>
      <td>{{domxref("document.head")}}*</td>
      <td>Returns the HEAD node of the current document.</td>
      <td>{{domxref("HTMLHeadElement")}}</td>
      <td>HTML</td>
    </tr>
    <tr>
      <td>{{domxref("document.height")}} {{obsolete_inline("6")}}</td>
      <td>Gets/sets the height of the current document.</td>
      <td><a href="/en-US/docs/JavaScript/Reference/Global_Objects/Number" title="JavaScript/Reference/Global_Objects/Number">Number</a></td>
      <td>?</td>
    </tr>
    <tr>
      <td>{{domxref("document.images")}}*</td>
      <td>Returns a list of the images in the current document.</td>
      <td>{{domxref("HTMLCollection")}}</td>
      <td>HTML</td>
    </tr>
    <tr>
      <td>{{domxref("document.implementation")}}</td>
      <td>Returns the DOM implementation associated with the current document.</td>
      <td>{{domxref("DOMImplementation")}}</td>
      <td>All</td>
    </tr>
    <tr>
      <td>{{domxref("document.inputEncoding")}}</td>
      <td>Returns the encoding used when the document was parsed.</td>
      <td>String</td>
      <td>All</td>
    </tr>
    <tr>
      <td>{{domxref("Node.lastChild")}}</td>
      <td>Returns the last child of a node</td>
      <td>{{domxref("Node")}}</td>
      <td>All</td>
    </tr>
    <tr>
      <td>{{domxref("document.lastModified")}}</td>
      <td>Returns the date on which the document was last modified.</td>
      <td>String</td>
      <td>All</td>
    </tr>
    <tr>
      <td>{{domxref("document.lastStyleSheetSet")}} {{gecko_minversion_inline("1.9")}}</td>
      <td>Returns the name of the style sheet set that was last enabled. Has the value <code>null</code> until the style sheet is changed by setting the value of {{domxref("document.selectedStyleSheetSet","selectedStyleSheetSet")}}.</td>
      <td>String</td>
      <td>All</td>
    </tr>
    <tr>
      <td>{{domxref("document.linkColor")}}* {{Deprecated_inline}}</td>
      <td>Gets/sets the color of hyperlinks in the document.</td>
      <td>String</td>
      <td>HTML</td>
    </tr>
    <tr>
      <td>{{domxref("document.links")}}*</td>
      <td>Returns a list of all the hyperlinks in the document.</td>
      <td>{{domxref("HTMLCollection")}}</td>
      <td>HTML</td>
    </tr>
    <tr>
      <td>{{domxref("Node.localName")}}</td>
      <td>Returns the local part of the qualified name of this node (null for a document)</td>
      <td>String</td>
      <td>All</td>
    </tr>
    <tr>
      <td>{{domxref("document.location")}}</td>
      <td>Returns the URI of the current document.</td>
      <td>{{domxref("Location")}}</td>
      <td>All</td>
    </tr>
    <tr>
      <td>{{domxref("document.mozSyntheticDocument")}} {{non-standard_inline}} {{gecko_minversion_inline("8.0")}}</td>
      <td><code>true</code> if this document is synthetic, such as a standalone image, video, audio file, or the like.</td>
      <td>Boolean</td>
      <td>All</td>
    </tr>
    <tr>
      <td>{{domxref("document.mozFullScreen")}} {{non-standard_inline}} {{gecko_minversion_inline("9.0")}}</td>
      <td><code>true</code> when the document is in {{domxref("Using_full-screen_mode","full-screen mode")}}.</td>
      <td>Boolean</td>
      <td>All</td>
    </tr>
    <tr>
      <td>{{domxref("document.mozFullScreenElement")}} {{non-standard_inline}} {{gecko_minversion_inline("9.0")}}</td>
      <td>The element that's currently in full screen mode for this document.</td>
      <td>{{domxref("Element")}}</td>
      <td>All</td>
    </tr>
    <tr>
      <td>{{domxref("document.mozFullScreenEnabled")}} {{non-standard_inline}} {{gecko_minversion_inline("9.0")}}</td>
      <td><code>true</code> if calling {{domxref("element.mozRequestFullscreen()")}} would succeed in the curent document.</td>
      <td>Boolean</td>
      <td>All</td>
    </tr>
    <tr>
      <td>{{domxref("Node.namespaceURI")}}</td>
      <td>Returns the XML namespace of the current document.</td>
      <td>&nbsp;</td>
      <td>All</td>
    </tr>
    <tr>
      <td>{{domxref("Node.nextSibling")}}</td>
      <td>Returns the node immediately following the specified one in its parent's childNodes list, or null if the specified node is the last node in that list (null for documents)</td>
      <td>&nbsp;</td>
      <td>All</td>
    </tr>
    <tr>
      <td>{{domxref("Node.nodeName")}}</td>
      <td>Returns the node's name (#document for document)</td>
      <td>String</td>
      <td>All</td>
    </tr>
    <tr>
      <td>{{domxref("Node.nodeType")}}</td>
      <td>Returns a node type constant (9 for document)</td>
      <td>Number</td>
      <td>All</td>
    </tr>
    <tr>
      <td>{{domxref("Node.nodeValue")}}</td>
      <td>Returns the node's value (null for document)</td>
      <td>&nbsp;</td>
      <td>All</td>
    </tr>
    <tr>
      <td>{{domxref("Node.nodePrincipal")}} {{non-standard_inline}} {{gecko_minversion_inline("1.9")}}</td>
      <td>(<strong>Mozilla add-ons only!</strong>) Returns the <code>nsIPrincipal</code> object representing current security context of the document.</td>
      <td>{{Interface("nsIPrincipal")}}</td>
      <td>All <small>(with UniversalXPConnect privileges)</small></td>
    </tr>
    <tr>
      <td>{{domxref("Node.ownerDocument")}}</td>
      <td>Returns the top-level document object for this node (null if already is the document).</td>
      <td>&nbsp;</td>
      <td>All</td>
    </tr>
    <tr>
      <td>{{domxref("Node.parentNode")}}</td>
      <td>Returns the parent of the specified node in the DOM tree (null for document)</td>
      <td>&nbsp;</td>
      <td>All</td>
    </tr>
    <tr>
      <td>{{domxref("document.plugins")}}</td>
      <td>Returns a list of the available plugins.</td>
      <td>{{domxref("HTMLCollection")}}</td>
      <td>HTML</td>
    </tr>
    <tr>
      <td>{{domxref("document.popupNode")}}*</td>
      <td>Returns the node upon which a popup was invoked (XUL documents only).</td>
      <td>{{domxref("Node")}}</td>
      <td>XUL</td>
    </tr>
    <tr>
      <td>{{domxref("document.preferredStyleSheetSet")}}</td>
      <td>Returns the preferred style sheet set as specified by the page author.</td>
      <td>String</td>
      <td>All</td>
    </tr>
    <tr>
      <td>{{domxref("Node.prefix")}}</td>
      <td>Returns the namespace prefix of the specified node, or <code>null</code> if no prefix is specified</td>
      <td>&nbsp;</td>
      <td>All</td>
    </tr>
    <tr>
      <td>{{domxref("Node.previousSibling")}}</td>
      <td>Returns the node immediately preceding the specified one in its parent's {{domxref("element.childNodes","childNodes")}} list, <code>null</code> if the specified node is the first in that list (null for document)</td>
      <td>&nbsp;</td>
      <td>All</td>
    </tr>
    <tr>
      <td>{{domxref("document.readyState")}} {{gecko_minversion_inline("1.9.2")}}</td>
      <td>Returns loading status of the document</td>
      <td>String</td>
      <td>All</td>
    </tr>
    <tr>
      <td>{{domxref("document.referrer")}}*</td>
      <td>Returns the URI of the page that linked to this page.</td>
      <td>String</td>
      <td>All</td>
    </tr>
    <tr>
      <td>{{domxref("document.scripts")}}</td>
      <td>Returns all the {{HTMLElement("script")}} elements on the document.</td>
      <td>{{domxref("HTMLCollection")}}</td>
      <td>HTML</td>
    </tr>
    <tr>
      <td>{{domxref("document.selectedStyleSheetSet")}} {{gecko_minversion_inline("1.9")}}</td>
      <td>Returns which style sheet set is currently in use.</td>
      <td>String</td>
      <td>All</td>
    </tr>
    <tr>
      <td>{{domxref("document.styleSheets")}}</td>
      <td>Returns a list of the stylesheet objects on the current document.</td>
      <td>{{domxref("StyleSheetList")}}</td>
      <td>All</td>
    </tr>
    <tr>
      <td>{{domxref("document.styleSheetSets")}} {{gecko_minversion_inline("1.9")}}</td>
      <td>Returns a list of the style sheet sets available on the document.</td>
      <td>StringList</td>
      <td>All</td>
    </tr>
    <tr>
      <td>{{domxref("Node.textContent")}}</td>
      <td>Returns null (returns other values for other nodes).</td>
      <td>Null</td>
      <td>All</td>
    </tr>
    <tr>
      <td>{{domxref("document.title")}}*</td>
      <td>Returns the title of the current document.</td>
      <td>String</td>
      <td>HTML, XUL</td>
    </tr>
    <tr>
      <td>{{domxref("document.tooltipNode")}}*</td>
      <td>Returns the node which is the target of the current tooltip.</td>
      <td>Node Object</td>
      <td>XUL</td>
    </tr>
    <tr>
      <td>{{domxref("document.URL")}}*</td>
      <td>Returns a string containing the URL of the current document.</td>
      <td>String</td>
      <td>HTML</td>
    </tr>
    <tr>
      <td>{{domxref("document.vlinkColor")}}* {{Deprecated_inline}}</td>
      <td>Gets/sets the color of visited hyperlinks.</td>
      <td>String</td>
      <td>HTML</td>
    </tr>
    <tr>
      <td>{{domxref("document.width")}} {{obsolete_inline("6")}}</td>
      <td>Returns the width of the current document.</td>
      <td>Number</td>
      <td>?</td>
    </tr>
    <tr>
      <td>{{domxref("document.xmlEncoding")}} {{Deprecated_inline}}</td>
      <td>Returns the encoding as determined by the XML declaration.<br />
        <div class="note">
          Firefox 10 and later don't implement it anymore.</div>
      </td>
      <td>String</td>
      <td>DOM 3 Removed in DOM 4</td>
    </tr>
    <tr>
      <td>{{domxref("document.xmlStandalone")}} {{obsolete_inline("10.0")}}</td>
      <td>
        <p>Returns <code>true</code> if the XML declaration specifies the document is standalone (<em>e.g.,</em> An external part of the DTD affects the document's content), else <code>false</code>.</p>
      </td>
      <td><a href="/en-US/docs/JavaScript/Reference/Global_Objects/Boolean" title="JavaScript/Reference/Global_Objects/Boolean">Boolean</a></td>
      <td>DOM 3 Removed in DOM 4</td>
    </tr>
    <tr>
      <td>{{domxref("document.xmlVersion")}} {{obsolete_inline("10.0")}}</td>
      <td>
        <p>Returns the version number as specified in the XML declaration or <code>"1.0"</code> if the declaration is absent.</p>
      </td>
      <td>String</td>
      <td>DOM 3 Removed in DOM 4</td>
    </tr>
  </tbody>
</table>
<h2 id="Methods" name="Methods">Methods</h2>
<dl>
  <dt>
    {{domxref("element.addEventListener")}}</dt>
  <dd>
    Adds an event listener to the document.</dd>
  <dt>
    {{domxref("document.adoptNode")}} {{Fx_minversion_inline("3")}}</dt>
  <dd>
    Adopt node from an external document</dd>
  <dt>
    {{domxref("Node.appendChild")}}</dt>
  <dd>
    Adds a node to the end of the list of children of a specified parent node.</dd>
  <dt>
    {{domxref("document.captureEvents")}}</dt>
  <dd>
    {{todo("Description")}}</dd>
  <dt>
    {{domxref("document.caretPositionFromPoint")}}</dt>
  <dd>
    Gets a {{domxref("CaretPosition")}} based on two coordinates.</dd>
  <dt>
    {{domxref("document.clear")}}* {{Deprecated_inline}}</dt>
  <dd>
    In majority of modern browsers, including recent versions of Firefox and Internet Explorer, this method does nothing.</dd>
  <dt>
    {{domxref("Node.cloneNode")}}</dt>
  <dd>
    Makes a copy of a node or document</dd>
  <dt>
    {{domxref("document.close")}}*</dt>
  <dd>
    Closes a document stream for writing.</dd>
  <dt>
    {{domxref("Node.compareDocumentPosition")}}</dt>
  <dd>
    Compares the position of the current node against another node in any other document.</dd>
  <dt>
    {{domxref("document.createAttribute")}}</dt>
  <dd>
    Creates a new attribute node and returns it.</dd>
  <dt>
    {{domxref("document.createAttributeNS")}}</dt>
  <dd>
    Creates a new attribute node in a given namespace and returns it.</dd>
  <dt>
    {{domxref("document.createCDATASection")}}</dt>
  <dd>
    Creates a new CDATA node and returns it.</dd>
  <dt>
    {{domxref("document.createComment")}}</dt>
  <dd>
    Creates a new comment node and returns it.</dd>
  <dt>
    {{domxref("document.createDocumentFragment")}}</dt>
  <dd>
    Creates a new document fragment.</dd>
  <dt>
    {{domxref("document.createElement")}}</dt>
  <dd>
    Creates a new element with the given tag name.</dd>
  <dt>
    {{domxref("document.createElementNS")}}</dt>
  <dd>
    Creates a new element with the given tag name and namespace URI.</dd>
  <dt>
    {{domxref("document.createEntityReference")}} {{obsolete_inline("7.0")}}</dt>
  <dd>
    Creates a new entity reference object and returns it.</dd>
  <dt>
    {{domxref("document.createEvent")}}</dt>
  <dd>
    Creates an event.</dd>
  <dt>
    {{domxref("document.createExpression")}}</dt>
  <dd>
    Compiles an <code><a href="/en-US/docs/XPathExpression" title="XPathExpression">XPathExpression</a></code> which can then be used for (repeated) evaluations.</dd>
  <dt>
    {{domxref("document.createNodeIterator")}}</dt>
  <dd>
    Creates a {{domxref("NodeIterator")}} object.</dd>
  <dt>
    {{domxref("document.createNSResolver")}}</dt>
  <dd>
    Creates an XPathNSResolver.</dd>
  <dt>
    {{domxref("document.createProcessingInstruction")}}</dt>
  <dd>
    Creates a new processing instruction element and returns it.</dd>
  <dt>
    {{domxref("document.createRange")}}</dt>
  <dd>
    Creates a {{domxref("range","Range")}} object.</dd>
  <dt>
    {{domxref("document.createTextNode")}}</dt>
  <dd>
    Creates a text node.</dd>
  <dt>
    {{domxref("document.createTreeWalker")}}</dt>
  <dd>
    Creates a {{domxref("treeWalker")}} object.</dd>
  <dt>
    {{domxref("document.elementFromPoint")}} {{Fx_minversion_inline("3")}}</dt>
  <dd>
    Returns the element visible at the specified coordinates.</dd>
  <dt>
    {{domxref("document.enableStyleSheetsForSet()")}} {{gecko_minversion_inline("1.9")}}</dt>
  <dd>
    Enables the style sheets for the specified style sheet set.</dd>
  <dt>
    {{domxref("document.evaluate")}}</dt>
  <dd>
    Evaluates an XPath expression.</dd>
  <dt>
    <a href="/en-US/docs/Rich-Text_Editing_in_Mozilla#Executing_Commands" title="Rich-Text_Editing_in_Mozilla#Executing_Commands">document.execCommand</a>*</dt>
  <dd>
    Executes a <a href="/en-US/docs/Midas" title="Midas">Midas</a> command.</dd>
  <dt>
    {{domxref("document.execCommandShowHelp")}} {{obsolete_inline("14.0")}}</dt>
  <dd>
    This method never did anything and always threw an exception, so it was removed in Gecko 14.0 {{geckoRelease("14.0")}}</dd>
  <dt>
    {{domxref("document.getBoxObjectFor")}}</dt>
  <dd>
    {{todo("Description")}}</dd>
  <dt>
    {{domxref("document.getElementById")}}</dt>
  <dd>
    Returns an object reference to the identified element.</dd>
  <dt>
    {{domxref("document.getElementsByClassName")}} {{Fx_minversion_inline("3")}}</dt>
  <dd>
    Returns a list of elements with the given class name.</dd>
  <dt>
    {{domxref("document.getElementsByName")}}*</dt>
  <dd>
    Returns a list of elements with the given name.</dd>
  <dt>
    {{domxref("document.getElementsByTagName")}}</dt>
  <dd>
    Returns a list of elements with the given tag name.</dd>
  <dt>
    {{domxref("document.getElementsByTagNameNS")}}</dt>
  <dd>
    Returns a list of elements with the given tag name and namespace.</dd>
  <dt>
    {{domxref("Node.getFeature")}}</dt>
  <dd>
    {{todo("Description")}}</dd>
  <dt>
    {{domxref("document.getSelection")}}</dt>
  <dd>
    Returns a {{domxref("Selection")}} object related to text selected in the document.</dd>
  <dt>
    {{domxref("Node.getUserData")}}</dt>
  <dd>
    Returns any data previously set on the node via setUserData() by key</dd>
  <dt>
    {{domxref("Node.hasAttributes")}}</dt>
  <dd>
    Indicates whether the node possesses attributes</dd>
  <dt>
    {{domxref("Node.hasChildNodes")}}</dt>
  <dd>
    Returns a Boolean value indicating whether the current element has child nodes or not.</dd>
  <dt>
    {{domxref("document.hasFocus")}}</dt>
  <dd>
    Returns <code>true</code> if the focus is currently located anywhere inside the specified document.</dd>
  <dt>
    {{domxref("document.importNode")}}</dt>
  <dd>
    Returns a clone of a node from an external document</dd>
  <dt>
    {{domxref("Node.insertBefore")}}</dt>
  <dd>
    Inserts the specified node before a reference node as a child of the current node.</dd>
  <dt>
    {{domxref("Node.isDefaultNamespace")}}</dt>
  <dd>
    Returns true if the namespace is the default namespace on the given node</dd>
  <dt>
    {{domxref("Node.isEqualNode")}}</dt>
  <dd>
    Indicates whether the node is equal to the given node</dd>
  <dt>
    {{domxref("Node.isSameNode")}}</dt>
  <dd>
    Indicates whether the node is the same as the given node</dd>
  <dt>
    {{domxref("Node.isSupported")}}</dt>
  <dd>
    Tests whether the DOM implementation implements a specific feature and that feature is supported by this node or document</dd>
  <dt>
    {{domxref("document.load")}}</dt>
  <dd>
    Load an XML document</dd>
  <dt>
    {{domxref("document.loadOverlay")}}* {{Fx_minversion_inline("1.5")}}</dt>
  <dd>
    Loads a <a href="/en-US/docs/XUL_Overlays" title="XUL_Overlays">XUL overlay</a> dynamically. This only works in XUL documents.</dd>
  <dt>
    {{domxref("Node.lookupNamespaceURI")}}</dt>
  <dd>
    Returns the namespaceURI associated with a given prefix on the given node object</dd>
  <dt>
    {{domxref("Node.lookupPrefix")}}</dt>
  <dd>
    Returns the prefix for a given namespaceURI on the given node if present</dd>
  <dt>
    {{domxref("Node.normalize")}}</dt>
  <dd>
    Normalizes the node or document</dd>
  <dt>
    {{domxref("document.normalizeDocument")}} {{obsolete_inline("7.0")}}</dt>
  <dd>
    Replaces entities, normalizes text nodes, etc.</dd>
  <dt>
    {{domxref("document.open")}}*</dt>
  <dd>
    Opens a document stream for writing.</dd>
  <dt>
    {{domxref("document.queryCommandEnabled")}}*</dt>
  <dd>
    Returns true if the <a href="/en-US/docs/Midas" title="Midas">Midas</a> command can be executed on the current range.</dd>
  <dt>
    {{domxref("document.queryCommandIndeterm")}}*</dt>
  <dd>
    Returns true if the <a href="/en-US/docs/Midas" title="Midas">Midas</a> command is in a indeterminate state on the current range.</dd>
  <dt>
    {{domxref("document.queryCommandState")}}*</dt>
  <dd>
    Returns true if the <a href="/en-US/docs/Midas" title="Midas">Midas</a> command has been executed on the current range.</dd>
  <dt>
    {{domxref("document.queryCommandSupported")}}</dt>
  <dd>
    {{todo("Description")}}</dd>
  <dt>
    {{domxref("document.queryCommandText")}} {{obsolete_inline("14.0")}}</dt>
  <dd>
    This method never did anything but throw an exception, and was removed in Gecko 14.0 {{geckoRelease("14.0")}}.</dd>
  <dt>
    {{domxref("document.queryCommandValue")}}*</dt>
  <dd>
    Returns the current value of the current range for <a href="/en-US/docs/Midas" title="Midas">Midas</a> command. As of Firefox 2.0.0.2, queryCommandValue will return an empty string when a command value has not been explicitly set.</dd>
  <dt>
    {{domxref("document.querySelector")}} {{gecko_minversion_inline("1.9.1")}}</dt>
  <dd>
    Returns the first Element node within the document, in document order, that matches the specified selectors.</dd>
  <dt>
    {{domxref("document.querySelectorAll")}} {{gecko_minversion_inline("1.9.1")}}</dt>
  <dd>
    Returns a list of all the Element nodes within the document that match the specified selectors.</dd>
  <dt>
    {{domxref("document.releaseCapture()")}} {{gecko_minversion_inline("2.0")}}</dt>
  <dd>
    Releases the current mouse capture if it's on an element in this document.</dd>
  <dt>
    {{domxref("document.releaseEvents")}}</dt>
  <dd>
    {{todo("Description")}}</dd>
  <dt>
    {{domxref("Node.removeChild")}}</dt>
  <dd>
    Removes a child node from the DOM</dd>
  <dt>
    {{domxref("document.removeEventListener")}}</dt>
  <dd>
    Removes an event listener from the document</dd>
  <dt>
    {{domxref("Node.replaceChild")}}</dt>
  <dd>
    Replaces one child node of the specified node with another</dd>
  <dt>
    {{domxref("document.routeEvent")}}</dt>
  <dd>
    {{todo("Description")}}</dd>
  <dt>
    {{domxref("document.mozSetImageElement")}} {{gecko_minversion_inline("2.0")}}</dt>
  <dd>
    Allows you to change the element being used as the background image for a specified element ID.</dd>
  <dt>
    {{domxref("Node.setUserData")}}</dt>
  <dd>
    Attaches arbitrary data to a node, along with a user-defined key and an optional handler to be triggered upon events such as cloning of the node upon which the data was attached</dd>
  <dt>
    {{domxref("document.write")}}*</dt>
  <dd>
    Writes text to a document.</dd>
  <dt>
    {{domxref("document.writeln")}}*</dt>
  <dd>
    Write a line of text to a document.</dd>
</dl>
<h2 id="Event_handlers" name="Event_handlers">Event handlers</h2>
<p>Firefox 3 introduces two new events: "online" and "offline". These two events are fired on the {{HTMLElement("body")}} of each page when the browser switches between online and offline mode. Additionally, the events bubble up from {{domxref("document.body")}}, to {{domxref("Document")}}, ending at {{domxref("Window")}}. Both events are non-cancelable (you can't prevent the user from coming online, or going offline). For more details see <a href="/en-US/docs/Online_and_offline_events" title="Online_and_offline_events">Online and offline events</a>.</p>
<p>Also, see the {{domxref("DOM_event_reference","DOM event reference")}} for a list of available events.</p>
<dl>
  <dt>
    {{domxref("document.ononline")}} {{Fx_minversion_inline("3")}}</dt>
  <dd>
    Returns the event handling code for the <code>online</code> event.</dd>
  <dt>
    {{domxref("document.onoffline")}} {{Fx_minversion_inline("3")}}</dt>
  <dd>
    Returns the event handling code for the <code>offline</code> event.</dd>
  <dt>
    {{domxref("document.onreadystatechange")}} {{gecko_minversion_inline("1.9.2")}}</dt>
  <dd>
    Returns the event handling code for the <code>readystatechange</code> event.</dd>
</dl>
<div class="geckoVersionNote" style="undefined">
  <p>{{gecko_callout_heading("9.0")}}</p>
  <p>Starting in Gecko 9.0 {{geckoRelease("9.0")}}, you can now use the syntax <code>if ("onabort" in document)</code> to determine whether or not a given event handler property exists. This is because event handler interfaces have been updated to be proper web IDL interfaces. See {{domxref("DOM_event_handlers","DOM event handlers")}} for details.</p>
</div>
<h2 id="Security_notes" name="Security_notes">Security notes</h2>
<p>{{Fx_minversion_note(3, "This section covers security improvements made in Firefox 3/Gecko 1.9.")}}</p>
<p>When a new document is created, it initially gets "about:blank" loaded into it. In versions of Firefox prior to Firefox 3, "about:blank" documents didn't get the parent principal. This means that access to their contents was not restricted. While this doesn't seem like a significant issue, it can be if code proceeds to add content to the document using DOM methods and properties such as {{domxref("Node.appendChild")}} and so forth, because that content would not be protected from unauthorized access.</p>
<p>Firefox 3 updates Gecko so that new documents inherit the parent principal. This improves security both for <code>iframe</code>s and documents that are in the process of being loaded, as well as for documents constructed programmatically.</p>
<h2 id="Specification" name="Specification">Specification</h2>
<ul>
  <li><a href="http://www.w3.org/TR/DOM-Level-3-Core/core.html#i-Document" rel="freelink">http://www.w3.org/TR/DOM-Level-3-Cor...tml#i-Document</a></li>
</ul>
현재 리비전 복원