Visit Mozilla.org

User:George3/DOMdocument

From MDC

[edit] Draft proposal for "Properties" section of DOM:document

Based on a table layout similar to DOM:element

Not sure what the "Availability" column should represent. One of the following?:

  • HTML vs XUL (as in the DOM:element page)
  • Match to standards - with the note that DOM 0 properties aren't covered by any W3C recommendation and in most cases, should be avoided in order to reduce cross-browser inconsistencies?
  • A replacement for the purpose of the asterisks in the previous version of this page?

Gecko seems to support six of the seven new properties in DOM3. They've been added below, except for the currently unsupported document.domConfig (bug 226193#c4).

A non-W3C property, document.readyState, is not currently supported by Gecko but if bug 347174 gets fixed, it will have to be added to this list of properties.

(Regarding the XUL Planet links on the object types, I'm assuming that content can be migrated to devmo/MDC?) Since the "objref" content of XULPlanet is autogenerated from IDL files, it was not going to be migrated. Too bad a devmo page can't be separated into an autogen portion and a regular wikiportion (MFinkle possibly looked into this/had ideas on this?) --George3 09:03, 11 September 2007 (PDT)

[edit] Properties

Name Description Return Type Availability
document.alinkColor*DeprecatedReturns or sets the color of active links in the document body.StringDOM 0
document.anchors*Returns a list of all of the anchors in the document.HTMLCollection Object [1]HTML
document.applets*Returns an ordered list of the applets within a document.HTMLCollection ObjectHTML
document.bgColor*DeprecatedGets/sets the background color of the current document.StringDOM 0
document.body*Returns the BODY node of the current document.HTMLBodyElement Object [2]HTML
document.characterSetReturns the character set being used by the document.StringDOM 0
document.compatMode*Indicates whether the document is rendered in Quirks or Strict mode.StringHTML, XHTML
document.contentTypeReturns the Content-Type from the MIME Header of the current document.String
document.cookie*Returns a semicolon-separated list of the cookies for that document or sets a single cookie.StringHTML
document.defaultViewReturns a reference to the window object.Window ObjectDOM 2 View
document.designMode*Gets/sets WYSYWIG editing capability of Midas. It can only be used for HTML documents.StringHTML
document.doctypeReturns the Document Type Definition (DTD) of the current document.DocumentType Object [3]DOM 2 Core
Name Description Return Type Availability
document.documentElementReturns the Element that is a direct child of document. For HTML documents, this is normally the HTML element.Element ObjectAll?
document.documentURI* StringDOM 3
document.documentURIObject (see current DOM:document, new in FF3)
document.domain*Returns the domain of the current document.StringHTML
document.embeds*Returns a list of the embedded OBJECTS within the current document.HTMLCollection ObjectDOM 0
document.fgColor*DeprecatedGets/sets the foreground color, or text color, of the current document.StringDOM 0
document.firstChildReturns the first node in the list of direct children of the document. (See also firstChild for the general element property.)DocumentType ObjectDOM 2 Core
document.forms*Returns a list of the FORM elements within the current document.HTMLCollection ObjectHTML
document.height*Gets/sets the height of the current document.NumberDOM 0
document.images*Returns a list of the images in the current document.HTMLCollection ObjectHTML
document.implementation*Returns the DOM implementation associated with the current document.DOMImplementation Object [4]DOM 2 Core
document.inputEncodingReturns the encoding used when the document was parsed.StringDOM 3
document.lastModified*Returns the date on which the document was last modified.StringDOM 0
document.linkColor*DeprecatedGets/sets the color of hyperlinks in the document.StringDOM 0
Name Description Return Type Availability
document.links*Returns a list of all the hyperlinks in the document.HTMLCollection ObjectHTML
document.location*Returns the URI of the current document.Location Object [5]DOM 0
document.namespaceURIReturns the XML namespace of the current document.? Object
document.plugins*Returns a list of the available plugins.HTMLCollection ObjectDOM 0
document.popupNodeReturns the node upon which a popup was invoked (XUL documents only).Node Object [6]XUL
document.referrer*Returns the URI of the page that linked to this page.StringHTML
document.strictErrorChecking*TBDBooleanDOM 3
document.styleSheets*Returns a list of the stylesheet objects on the current document.StyleSheetList Object [7]DOM 2 Style
document.title*Returns the title of the current document.StringHTML
document.tooltipNodeReturns the node which is the target of the current tooltip.Node ObjectXUL
document.URLReturns a string containing the URL of the current document.StringHTML
document.vlinkColor* DeprecatedGets/sets the color of visited hyperlinks.StringDOM 0
document.width*Returns the width of the current document.NumberDOM 0
document.xmlEncoding* ? ObjectDOM 3
document.xmlStandalone* BooleanDOM 3
document.xmlVersion* ? ObjectDOM 3