AbstractThe Document Object Model (DOM) level one provides a mechanism for software developers and web script authors to access and manipulate parsed HTML and XML content. This document defines a set of objects that extends the Document Object Model (Core) such that the combination can represent all parts of a parsed HTML document. This document is meant to be concurrent with the HTML version 4.0 specification. |
This document is part of the Document Object Model Specification; check the W3C web site for its current status. It is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to use W3C Working Drafts as reference material or to cite them as other than "work in progress". Note: Since working drafts are subject to frequent change, you are advised to check the list of current W3C working drafts.
This specification is part of the W3C Document Object Model, which defines a programming interface for manipulating HTML and XML documents. Objects and methods which are used for both HTML and XML documents are defined in the W3C DOM Level One Core specification, which forms the basis for the W3C DOM Level One HTML specification that you are now reading. This document extends the Level One Core specification to describe objects and methods specific to HTML documents. In general, the functionality needed to manipulate hierarchical document structures, elements, and attributes will be found in the core specification; functionality that depends on the specific elements defined in HTML will be found in this document. Another document, the W3C DOM Level One XML specification, contains methods and objects specific to XML documents.
The goals of the HTML-specific DOM specification are:
The key differences between the core DOM and the HTML application of DOM is that the HTML Document Object Model exposes a number of convenience methods and properties that are consistent with the existing models and are more appropriate to script writers. In many cases, these enhancements are not applicable to a general DOM because they rely on the presence of a predefined DTD. For DOM Level 1, the DTD for HTML 4.0 is assumed.
The W3C DOM Working Group attempts, wherever possible, to maintain compatibility with the DOM Level 0, which is defined as being the functionality exposed in Netscape Navigator 3.0 and Microsoft Internet Explorer 3.0.
More specifically, this document includes the following specializations for HTML:
The Level 1 document does not include mechanisms to access and modify style specified through CSS-1. Furthermore, it will not define an event model for HTML documents. This functionality will be specified in a future Level of this specification. The events that are supported in Level 0 are given in the DOM Level 1 HTML ECMAScript binding for completeness; the method of defining and handling events is expected to change.
The following issues are still being discussed. Some are already in Level 0, and the general solution to some of these issues might be in a future version of the Core specification rather than this document.
The HTML DOM follows a naming convention for properties, methods, events, collections, and data types. All names are defined as one or more English words concatenated together to form a single string.
The property or method name starts with the initial keyword in lowercase, and each subsequent word starts with a capital letter. For example, a property that returns document meta information such as the date the file was created might be named "fileDateCreated". In the ECMAScript binding, properties are exposed as properties of a given object. In Java, properties as exposed with get and set methods.
All attributes for supporting events are spelled entirely in lowercase letters. All events are prefixed with "on". Events that are exposed as properties also follow this naming convention. For example, a click event is named "onclick" and is exposed as a property named "onclick" in the object model.
The HTMLDocument is the root of the HTML hierarchy and contains the entire content as its descendants.
We are considering adding convenience accessors and ways to query all elements, in order to locate elements in the document easily.
The location object parses the URL for the current page into a number of properties providing easy access. The Location object is included in the HTML-specific interface because this is the way access to these properties was defined in Level 0. In a subsequent level of the DOM, the DocumentContext object will be defined as part of the core API and the Location object and these methods will probably be deprecated
Element | +--- HTMLElement | +--- Specific HTML Elements HTMLElement Object Hierarchy
All HTML attributes are exposed as properties on the element object. The name of the exposed property always uses the naming conventions, and is independent of the case of the attribute in the source document. The data type of the property is determined by the type of the attribute as determined by the HTML 4.0 DTD. The attributes have the semantics given in the HTML 4.0 specification.
The attributes are exposed as properties for compatibility with Level 0. This usage is deprecated because it can not be generalised to all possible attribute names, as is required both for XML and potentially for future versions of HTML. We are considering how best to add, get, and remove attributes in a simple and direct way.
DTD Data Type | Object Model Data Type |
---|---|
CDATA | String |
Value list (e.g.. (left | right | center)) | String |
one-value Value list (e.g. (border)) | Boolean |
Number | Long Integer |
The return value of an attribute that has data type that is a value list is always capitalized, independent of the case of the value in the source document. For example, if the value of the align attribute on a P element is "left" then it is returned as "Left". For attributes with the CDATA data type, the value is returned with the capitalization as in the source document.
To avoid name-space conflicts, an attribute with the same name as a keyword in one of our chosen binding languages will be prefixed. For HTML, the prefix used is "html" and for CSS, the prefix used is "css". For example, the "for" attribute collides with loop construct naming conventions and is named "htmlFor", while the CSS float attribute collides with the float data type and is named "cssFloat".
The property that exposes the element type name will return this in uppercase. For example, the body element type name is exposed through the "tagName" property as "BODY".
All HTML elements derive from this class. Elements that only expose the core attributes are represented by the base HTMLElement class. These elements are as follows:
The LINK specifies a media-independent link.
The document title
This contains generic meta-information about the document.
Document base URL
This element is used to show that the document is indexed. A single line prompt is possible.
Style information - this will be the subject of a future Level.
The HTML document body. This element is always present in the DOM API, even if the tags are not present in the source document.
The form element encompasses behavior similar to a collection and an element. It provides direct access to the contained input elements as well as the attributes of the form element. The WG is considering a method to retrieve an entry by name or index
If the element defined in the following list is not contained within a form, the form property returns null.
The select element allows the selection of an option. The contained options can be directly accessed through the select element as a collection.
The WG is also considering adding methods that return specific items by element type name and/or ordinal index.
A selectable choice
Fieldset legend
Form control
Security Notes: Depending upon the environment the page is being viewed, the value property may be read-only for the file upload input type. For the password input type, the actual value returned may be masked to prevent unauthorized use.
Multi-line text field
Push button
Form field label text
Anchor
Base font
Forced line break
Embedded image
Local change to font
Inserted or deleted text
Generic embedded object
Note: In principle, all properties on the object element are read-write but in some environments some properties may be read-only once the underlying object is instantiated.
Quoted text
Script statements
Unordered list and ordered list.
List item
Definition list, directory list, menu list
Generic container
Horizontal rule
Paragraph
Headings
Client side image map
Client side image map area
Table Caption
The create* and delete* methods on the table provide easy access to construct and modify tables. HTML 4.0 defines that only 1 CAPTION, THEAD and TFOOT can exist in a table. If one exists, and the createTHead() or createTFoot() method is called, the method returns the THead or TFoot element that already exists.
The rowIndex returns the index relative to the entire table, and sectionRowIndex returns the index relative to the section the element is scoped within (THead, TFoot, or TBody)
Ways of defining the frames in an HTML document.
Subwindow
Inline subwindows
This contains the complete IDL definitions for the HTML support provided by the Document Object Model.
//hb////-*-Mode: C++-*-//////////////////////////////////////////////////////// // // // NAME : // // DESCRIPTION : // // HISTORY : // // // //he/////////////////////////////////////////////////////////////////////////// interface HTMLStyle { // Hook for later level }; interface NamedNodeList : NodeList { // Same interface, different semantics }; interface HTMLDocument : Document { // These are all methods, because they do some processing // of the document NamedNodeList getImages(); NamedNodeList getApplets(); NamedNodeList getLinks(); NamedNodeList getForms(); NamedNodeList getAnchors(); NamedNodeList getScripts(); // These are methods because we have not defined a list // of cookies anywhere in the model wstring getCookie(); wstring setCookie(in wstring cookie); readonly attribute wstring referrer; readonly attribute wstring fileSize; readonly attribute wstring fileCreatedDate; readonly attribute wstring fileModifiedDate; readonly attribute wstring fileUpdatedDate; readonly attribute HTMLLocation location; attribute HTMLElement body; }; interface HTMLLocation { attribute wstring href; attribute wstring protocol; attribute wstring host; attribute wstring hostname; attribute wstring port; attribute wstring pathname; attribute wstring query; attribute wstring fragment; void reload(in boolean flag); void replace(in wstring url); }; interface HTMLElement : Element { attribute wstring tagName; attribute wstring className; attribute wstring id; attribute HTMLStyle style; attribute HTMLElement parentElement; attribute wstring title; attribute wstring lang; attribute wstring dir; attribute wstring onClick; attribute wstring onDblClick; attribute wstring onKeyDown; attribute wstring onKeyUp; attribute wstring onKeypress; attribute wstring onMouseOut; attribute wstring onMouseOver; attribute wstring onMouseMove; attribute wstring onMouseUp; attribute wstring onMouseDown; attribute NamedNodeList all; readonly attribute HTMLDocument document; boolean contains(in HTMLElement pChild); void addAttribute(in wstring name, in Object value, in long lFlags); Object getAttribute(in wstring name,in long lFlags); boolean removeAttribute(in wstring name, in long lFlags); }; interface HTMLLinkElement : HTMLElement { attribute wstring href; attribute wstring rel; attribute wstring rev; attribute wstring type; attribute wstring media; wstring getReadyState(); }; interface HTMLTitleElement : HTMLElement { attribute wstring text; }; interface HTMLMetaElement : HTMLElement { // Can't you have a number of these? attribute wstring httpEquiv; attribute wstring content; attribute wstring name; attribute wstring text; attribute wstring url; attribute wstring charset; }; interface HTMLBaseElement : HTMLElement { attribute wstring href; attribute wstring target; }; interface HTMLIsIndexElement : HTMLElement { attribute wstring prompt; attribute wstring action; }; interface HTMLStyleElement : HTMLElement { attribute wstring type; attribute boolean disabled; attribute wstring media; }; interface HTMLBodyElement : HTMLElement { attribute wstring background; attribute wstring bgColor; attribute wstring text; attribute wstring link; attribute wstring vlink; attribute wstring alink; }; interface HTMLFormElement : HTMLElement { attribute wstring action; attribute wstring method; attribute wstring target; attribute wstring name; attribute long length; attribute HTMLFormElement elements; // Note the use of Object here!!!! HTMLElement getItem(in Object name, in Object index); NamedNodeList getTags(in wstring name); }; interface HTMLSelectElement : HTMLElement { attribute long selectedIndex; attribute long size; attribute boolean multiple; attribute wstring name; attribute wstring type; attribute wstring value; attribute boolean disabled; attribute long length; readonly attribute HTMLFormElement form; attribute NamedNodeList options; void add(in HTMLElement element, in HTMLElement before); void remove(in long index); HTMLElement getItem(in wstring name); NamedNodeList getTags(in wstring tagname); }; interface HTMLOptionElement : HTMLElement { attribute wstring text; attribute long index; attribute boolean selected; attribute wstring value; attribute boolean defaultSelected; readonly attribute HTMLFormElement form; }; interface HTMLFieldSetElement : HTMLElement { attribute wstring align; }; interface HTMLLegendElement : HTMLElement { attribute wstring align; }; interface HTMLInputTextElement : HTMLElement { attribute wstring value; attribute wstring name; attribute boolean disabled; attribute wstring defaultValue; attribute long size; attribute long maxLength; attribute boolean readOnly; attribute boolean checked; attribute boolean defaultChecked; readonly attribute HTMLFormElement form; }; interface HTMLTextAreaElement : HTMLElement { attribute wstring type; attribute wstring value; attribute wstring name; attribute boolean disabled; attribute wstring defaultValue; attribute boolean readOnly; attribute long rows; attribute long cols; attribute wstring wrap; readonly attribute HTMLFormElement form; }; interface HTMLButtonElement : HTMLElement { attribute wstring type; attribute wstring value; attribute wstring name; attribute boolean disabled; readonly attribute HTMLFormElement form; }; interface HTMLLabelElement : HTMLElement { attribute wstring htmlFor; attribute wstring accessKey; }; interface HTMLAnchorElement : HTMLElement { attribute wstring target; attribute wstring href; attribute wstring rel; attribute wstring rev; attribute wstring name; attribute wstring accessKey; attribute long tabIndex; attribute wstring charset; }; interface HTMLBaseFontElement : HTMLElement { attribute wstring color; attribute wstring face; attribute long size; }; interface HTMLBRElement : HTMLElement { attribute wstring clear; }; interface HTMLImgElement : HTMLElement { attribute boolean isMap; attribute wstring useMap; attribute wstring border; attribute long vspace; attribute long hspace; attribute wstring alt; attribute wstring src; attribute wstring lowSrc; attribute wstring align; attribute long width; attribute long height; }; interface HTMLFontElement : HTMLElement { attribute wstring color; attribute wstring face; attribute long size; }; interface HTMLModElement : HTMLElement { attribute wstring cite; attribute wstring dateTime; }; interface HTMLObjectElement : HTMLElement { // Note the use of Object here!!!! attribute Object object; attribute wstring classId; attribute wstring data; attribute wstring align; attribute wstring name; attribute wstring codeBase; attribute wstring codeType; attribute wstring code; // This is almost certainly wrong attribute wstring type; attribute long width; attribute long height; attribute wstring altHtml; attribute long vspace; attribute long hspace; attribute long tabIndex; readonly attribute HTMLFormElement form; }; interface HTMLQuoteElement : HTMLElement { attribute wstring cite; }; interface HTMLScriptElement : HTMLElement { attribute wstring src; attribute wstring text; attribute wstring type; attribute wstring language; }; interface HTMLUListElement : HTMLElement { attribute boolean compact; attribute wstring type; }; interface HTMLOListElement : HTMLElement { attribute boolean compact; attribute wstring type; attribute long start; }; interface HTMLLIElement : HTMLElement { attribute wstring type; attribute long value; }; interface HTMLDListElement : HTMLElement { attribute boolean compact; }; interface HTMLDivElement : HTMLElement { attribute wstring align; }; interface HTMLHRElement : HTMLElement { attribute wstring align; attribute boolean noShade; attribute long width; attribute long size; }; interface HTMLParaElement : HTMLElement { attribute wstring align; }; interface HTMLHeaderElement : HTMLElement { attribute wstring align; }; interface HTMLMapElement : HTMLElement { NamedNodeList getAreas(); attribute wstring name; }; interface HTMLAreaElement : HTMLElement { attribute wstring shape; attribute wstring coords; attribute wstring href; attribute wstring target; attribute wstring alt; attribute boolean noHref; attribute long tabIndex; }; interface HTMLTableCaption : HTMLElement { attribute wstring align; }; interface HTMLTable : HTMLElement { attribute long cols; attribute wstring border; attribute wstring frame; attribute wstring rules; attribute long cellSpacing; attribute long cellPadding; attribute wstring bgColor; attribute wstring align; attribute long width; attribute HTMLTableCaption caption; attribute HTMLTableSection head; attribute HTMLTableSection tfoot; NamedNodeList getRows(); NamedNodeList getBodies(); HTMLElement createTHead(); void deleteTHead(); HTMLElement createTFoot(); void deleteTFoot(); HTMLTableCaption createCaption(); void deleteCaption(); HTMLElement insertRow(in long index); void deleteRow(in long index); }; interface HTMLTableCol : HTMLElement { attribute long span; attribute wstring align; attribute wstring valign; attribute long width; }; interface HTMLTableSection : HTMLElement { NamedNodeList getRows(); HTMLElement insertRow(in long index); void deleteRow(in long index); attribute wstring align; attribute wstring valign; }; interface HTMLTableRow : HTMLElement { attribute long rowIndex; attribute long sectionRowIndex; attribute wstring align; attribute wstring valign; attribute wstring bgColor; NamedNodeList getCells(); HTMLElement insertCell(in long index); void deleteCell(in long index); }; interface HTMLTableCell : HTMLElement { attribute long cellIndex; attribute long rowSpan; attribute long colSpan; attribute wstring align; attribute wstring valign; attribute wstring bgColor; attribute boolean noWrap; attribute long width; attribute long height; }; interface HTMLCommentElement : HTMLElement { attribute wstring text; }; interface HTMLFrameSetElement : HTMLElement { attribute wstring rows; attribute wstring cols; }; interface HTMLFrameElement : HTMLElement { attribute wstring src; attribute wstring name; attribute boolean noResize; attribute wstring scrolling; attribute wstring frameBorder; attribute long marginWidth; attribute long marginHeight; }; interface HTMLIFrameElement : HTMLElement { attribute wstring src; attribute wstring name; attribute wstring scrolling; attribute wstring align; attribute long marginWidth; attribute long marginHeight; attribute long width; attribute long height; };
public interface HTMLStyle { // Hook for level two }; public interface NamedNodeList extends NodeList { Node namedItem(String name); }; public interface HTMLDocument extends Document { NamedNodeList getImages(); NamedNodeList getApplets(); NamedNodeList getLinks(); NamedNodeList getForms(); NamedNodeList getAnchors(); NamedNodeList getScripts(); String getCookie(); String setCookie(String cookie); String getReferrer(); String getFileSize(); String getFileCreatedDate(); String getFileModifiedDate(); String getFileUpdatedDate(); HTMLLocation getLocation(); void setBody(HTMLElement body); HTMLElement getBody(); }; public interface HTMLLocation { void setHref(String href); String getHref(); void setProtocol(String protocol); String getProtocol(); void setHost(String host); String getHost(); void setHostname(String hostname); String getHostname(); void setPort(String port); String getPort(); void setPathname(String pathname); String getPathname(); void setQuery(String query); String getQuery(); void setFragment(String fragment); String getFragment(); void reload(boolean flag); void replace(String url); }; public interface HTMLElement extends Element { void setTagName(String tagName); String getTagName(); void setClassName(String className); String getClassName(); void setId(String id); String getId(); void setStyle(HTMLStyle style); HTMLStyle getStyle(); void setParentElement(HTMLElement parentElement); HTMLElement getParentElement(); void setTitle(String title); String getTitle(); void setLang(String lang); String getLang(); void setDir(String dir); String getDir(); void setAll(NamedNodeList all); NamedNodeList getAll(); HTMLDocument getDocument(); boolean contains(HTMLElement pChild); void addAttribute(String name, Object value, long lFlags); Object getAttribute(String name, long lFlags); boolean removeAttribute(String name, long lFlags); }; public interface HTMLLinkElement extends HTMLElement { void setHref(String href); String getHref(); void setRel(String rel); String getRel(); void setRev(String rev); String getRev(); void setType(String type); String getType(); void setMedia(String media); String getMedia(); String getReadyState(); }; public interface HTMLTitleElement extends HTMLElement { void setText(String text); String getText(); }; public interface HTMLMetaElement extends HTMLElement { void setHttpEquiv(String httpEquiv); String getHttpEquiv(); void setContent(String content); String getContent(); void setName(String name); String getName(); void setText(String text); String getText(); void setUrl(String url); String getUrl(); void setCharset(String charset); String getCharset(); }; public interface HTMLBaseElement extends HTMLElement { void setHref(String href); String getHref(); void setTarget(String target); String getTarget(); }; public interface HTMLIsIndexElement extends HTMLElement { void setPrompt(String prompt); String getPrompt(); void setAction(String action); String getAction(); }; public interface HTMLStyleElement extends HTMLElement { void setType(String type); String getType(); void setDisabled(boolean disabled); boolean getDisabled(); void setMedia(String media); String getMedia(); }; public interface HTMLBodyElement extends HTMLElement { void setBackground(String background); String getBackground(); void setBgColor(String bgColor); String getBgColor(); void setText(String text); String getText(); void setLink(String link); String getLink(); void setVlink(String vlink); String getVlink(); void setAlink(String alink); String getAlink(); }; public interface HTMLFormElement extends HTMLElement { void setAction(String action); String getAction(); void setMethod(String method); String getMethod(); void setTarget(String target); String getTarget(); void setName(String name); String getName(); void setLength(long length); long getLength(); void setElements(HTMLFormElement elements); HTMLFormElement getElements(); HTMLElement getItem(Object name,Object index); NamedNodeList getTags(String name); }; public interface HTMLSelectElement extends HTMLElement { void setSelectedIndex(long selectedIndex); long getSelectedIndex(); void setSize(long size); long getSize(); void setMultiple(boolean multiple); boolean getMultiple(); void setName(String name); String getName(); void setType(String type); String getType(); void setValue(String value); String getValue(); void setDisabled(boolean disabled); boolean getDisabled(); void setLength(long length); long getLength(); HTMLFormElement getForm(); void setOptions(NamedNodeList options); NamedNodeList getOptions(); void add(HTMLElement element,HTMLElement before); void remove(long index); HTMLElement getItem(String name); NamedNodeList getTags(String tagname); }; public interface HTMLOptionElement extends HTMLElement { void setText(String text); String getText(); void setIndex(long index); long getIndex(); void setSelected(boolean selected); boolean getSelected(); void setValue(String value); String getValue(); void setDefaultSelected(boolean defaultSelected); boolean getDefaultSelected(); HTMLFormElement getForm(); }; public interface HTMLFieldSetElement extends HTMLElement { void setAlign(String align); String getAlign(); }; public interface HTMLLegendElement extends HTMLElement { void setAlign(String align); String getAlign(); }; public interface HTMLInputTextElement extends HTMLElement { void setValue(String value); String getValue(); void setName(String name); String getName(); void setDisabled(boolean disabled); boolean getDisabled(); void setDefaultValue(String defaultValue); String getDefaultValue(); void setSize(long size); long getSize(); void setMaxLength(long maxLength); long getMaxLength(); void setReadOnly(boolean readOnly); boolean getReadOnly(); void setChecked(boolean checked); boolean getChecked(); void setDefaultChecked(boolean defaultChecked); boolean getDefaultChecked(); HTMLFormElement getForm(); }; public interface HTMLTextAreaElement extends HTMLElement { void setType(String type); String getType(); void setValue(String value); String getValue(); void setName(String name); String getName(); void setDisabled(boolean disabled); boolean getDisabled(); void setDefaultValue(String defaultValue); String getDefaultValue(); void setReadOnly(boolean readOnly); boolean getReadOnly(); void setRows(long rows); long getRows(); void setCols(long cols); long getCols(); void setWrap(String wrap); String getWrap(); HTMLFormElement getForm(); }; public interface HTMLButtonElement extends HTMLElement { void setType(String type); String getType(); void setValue(String value); String getValue(); void setName(String name); String getName(); void setDisabled(boolean disabled); boolean getDisabled(); HTMLFormElement getForm(); }; public interface HTMLLabelElement extends HTMLElement { void setHtmlFor(String htmlFor); String getHtmlFor(); void setAccessKey(String accessKey); String getAccessKey(); }; public interface HTMLAnchorElement extends HTMLElement { void setTarget(String target); String getTarget(); void setHref(String href); String getHref(); void setRel(String rel); String getRel(); void setRev(String rev); String getRev(); void setName(String name); String getName(); void setAccessKey(String accessKey); String getAccessKey(); void setTabIndex(long tabIndex); long getTabIndex(); void setCharset(String charset); String getCharset(); }; public interface HTMLBaseFontElement extends HTMLElement { void setColor(String color); String getColor(); void setFace(String face); String getFace(); void setSize(long size); long getSize(); }; public interface HTMLBRElement extends HTMLElement { void setClear(String clear); String getClear(); }; public interface HTMLImgElement extends HTMLElement { void setIsMap(boolean isMap); boolean getIsMap(); void setUseMap(String useMap); String getUseMap(); void setBorder(String border); String getBorder(); void setVspace(long vspace); long getVspace(); void setHspace(long hspace); long getHspace(); void setAlt(String alt); String getAlt(); void setSrc(String src); String getSrc(); void setLowSrc(String lowSrc); String getLowSrc(); void setAlign(String align); String getAlign(); void setWidth(long width); long getWidth(); void setHeight(long height); long getHeight(); }; public interface HTMLFontElement extends HTMLElement { void setColor(String color); String getColor(); void setFace(String face); String getFace(); void setSize(long size); long getSize(); }; public interface HTMLModElement extends HTMLElement { void setCite(String cite); String getCite(); void setDateTime(String dateTime); String getDateTime(); }; public interface HTMLObjectElement extends HTMLElement { void setObject(Object object); Object getObject(); void setClassId(String classId); String getClassId(); void setData(String data); String getData(); void setAlign(String align); String getAlign(); void setName(String name); String getName(); void setCodeBase(String codeBase); String getCodeBase(); void setCodeType(String codeType); String getCodeType(); void setCode(String code); String getCode(); void setType(String type); String getType(); void setWidth(long width); long getWidth(); void setHeight(long height); long getHeight(); void setAltHtml(String altHtml); String getAltHtml(); void setVspace(long vspace); long getVspace(); void setHspace(long hspace); long getHspace(); void setTabIndex(long tabIndex); long getTabIndex(); HTMLFormElement getForm(); }; public interface HTMLQuoteElement extends HTMLElement { void setCite(String cite); String getCite(); }; public interface HTMLScriptElement extends HTMLElement { void setSrc(String src); String getSrc(); void setText(String text); String getText(); void setType(String type); String getType(); void setLanguage(String language); String getLanguage(); }; public interface HTMLUListElement extends HTMLElement { void setCompact(boolean compact); boolean getCompact(); void setType(String type); String getType(); }; public interface HTMLOListElement extends HTMLElement { void setCompact(boolean compact); boolean getCompact(); void setType(String type); String getType(); void setStart(long start); long getStart(); }; public interface HTMLLIElement extends HTMLElement { void setType(String type); String getType(); void setValue(long value); long getValue(); }; public interface HTMLDListElement extends HTMLElement { void setCompact(boolean compact); boolean getCompact(); }; public interface HTMLDivElement extends HTMLElement { void setAlign(String align); String getAlign(); }; public interface HTMLHRElement extends HTMLElement { void setAlign(String align); String getAlign(); void setNoShade(boolean noShade); boolean getNoShade(); void setWidth(long width); long getWidth(); void setSize(long size); long getSize(); }; public interface HTMLParaElement extends HTMLElement { void setAlign(String align); String getAlign(); }; public interface HTMLHeaderElement extends HTMLElement { void setAlign(String align); String getAlign(); }; public interface HTMLMapElement extends HTMLElement { NamedNodeList getAreas(); void setName(String name); String getName(); }; public interface HTMLAreaElement extends HTMLElement { void setShape(String shape); String getShape(); void setCoords(String coords); String getCoords(); void setHref(String href); String getHref(); void setTarget(String target); String getTarget(); void setAlt(String alt); String getAlt(); void setNoHref(boolean noHref); boolean getNoHref(); void setTabIndex(long tabIndex); long getTabIndex(); }; public interface HTMLTableCaption extends HTMLElement { void setAlign(String align); String getAlign(); }; public interface HTMLTable extends HTMLElement { void setCols(long cols); long getCols(); void setBorder(String border); String getBorder(); void setFrame(String frame); String getFrame(); void setRules(String rules); String getRules(); void setCellSpacing(long cellSpacing); long getCellSpacing(); void setCellPadding(long cellPadding); long getCellPadding(); void setBgColor(String bgColor); String getBgColor(); void setAlign(String align); String getAlign(); void setWidth(long width); long getWidth(); void setCaption(HTMLTableCaption caption); HTMLTableCaption getCaption(); void setHead(HTMLTableSection head); HTMLTableSection getHead(); void setTfoot(HTMLTableSection tfoot); HTMLTableSection getTfoot(); NamedNodeList getRows(); NamedNodeList getBodies(); HTMLElement createTHead(); void deleteTHead(); HTMLElement createTFoot(); void deleteTFoot(); HTMLTableCaption createCaption(); void deleteCaption(); HTMLElement insertRow(long index); void deleteRow(long index); }; public interface HTMLTableCol extends HTMLElement { void setSpan(long span); long getSpan(); void setAlign(String align); String getAlign(); void setValign(String valign); String getValign(); void setWidth(long width); long getWidth(); }; public interface HTMLTableSection extends HTMLElement { NamedNodeList getRows(); HTMLElement insertRow(long index); void deleteRow(long index); void setAlign(String align); String getAlign(); void setValign(String valign); String getValign(); }; public interface HTMLTableRow extends HTMLElement { void setRowIndex(long rowIndex); long getRowIndex(); void setSectionRowIndex(long sectionRowIndex); long getSectionRowIndex(); void setAlign(String align); String getAlign(); void setValign(String valign); String getValign(); void setBgColor(String bgColor); String getBgColor(); NamedNodeList getCells(); HTMLElement insertCell(long index); void deleteCell(long index); }; public interface HTMLTableCell extends HTMLElement { void setCellIndex(long cellIndex); long getCellIndex(); void setRowSpan(long rowSpan); long getRowSpan(); void setColSpan(long colSpan); long getColSpan(); void setAlign(String align); String getAlign(); void setValign(String valign); String getValign(); void setBgColor(String bgColor); String getBgColor(); void setNoWrap(boolean noWrap); boolean getNoWrap(); void setWidth(long width); long getWidth(); void setHeight(long height); long getHeight(); }; public interface HTMLCommentElement extends HTMLElement { void setText(String text); String getText(); }; public interface HTMLFrameSetElement extends HTMLElement { void setRows(String rows); String getRows(); void setCols(String cols); String getCols(); }; public interface HTMLFrameElement extends HTMLElement { void setSrc(String src); String getSrc(); void setName(String name); String getName(); void setNoResize(boolean noResize); boolean getNoResize(); void setScrolling(String scrolling); String getScrolling(); void setFrameBorder(String frameBorder); String getFrameBorder(); void setMarginWidth(long marginWidth); long getMarginWidth(); void setMarginHeight(long marginHeight); long getMarginHeight(); }; public interface HTMLIFrameElement extends HTMLElement { void setSrc(String src); String getSrc(); void setName(String name); String getName(); void setScrolling(String scrolling); String getScrolling(); void setAlign(String align); String getAlign(); void setMarginWidth(long marginWidth); long getMarginWidth(); void setMarginHeight(long marginHeight); long getMarginHeight(); void setWidth(long width); long getWidth(); void setHeight(long height); long getHeight(); };
This will contain the ECMAScript bindings for the HTML DOM.
There are a large number of terms that the DOM uses which may not be familiar to many of the readers. We suggest that you review the glossary if you encounter terms that aren't familiar.