This appendix contains the complete OMG IDL for the Level 1 Document Object Model definitions. The definitions are divided into Core and HTML.
The IDL files are also available as: http://www.w3.org/TR/1998/PR-DOM-Level-1-19980818/idl.zip
This section contains the OMG IDL definitions for the interfaces in the Core Document Object Model specification, including the extended (XML) interfaces.
enum ExceptionCode {
INDEX_SIZE_ERR,
WSTRING_SIZE_ERR,
HIERARCHY_REQUEST_ERR,
WRONG_DOCUMENT_ERR,
INVALID_NAME_ERR,
NO_DATA_ALLOWED_ERR,
NO_MODIFICATION_ALLOWED_ERR,
NOT_FOUND_ERR,
NOT_SUPPORTED_ERR,
INUSE_ATTRIBUTE_ERR
};
exception DOMException {
ExceptionCode code;
};
interface DOMImplementation {
boolean hasFeature(in wstring feature,
in wstring version);
};
interface DocumentFragment : Node {
};
interface Document : Node {
readonly attribute DocumentType doctype;
readonly attribute DOMImplementation implementation;
readonly attribute Element documentElement;
Element createElement(in wstring tagName)
raises(DOMException);
DocumentFragment createDocumentFragment();
Text createTextNode(in wstring data);
Comment createComment(in wstring data);
CDATASection createCDATASection(in wstring data)
raises(DOMException);
ProcessingInstruction createProcessingInstruction(in wstring target,
in wstring data)
raises(DOMException);
Attribute createAttribute(in wstring name)
raises(DOMException);
EntityReference createEntityReference(in wstring name)
raises(DOMException);
NodeList getElementsByTagName(in wstring tagname);
};
interface Node {
// NodeType
const unsigned short ELEMENT_NODE = 1;
const unsigned short ATTRIBUTE_NODE = 2;
const unsigned short TEXT_NODE = 3;
const unsigned short CDATA_SECTION_NODE = 4;
const unsigned short ENTITY_REFERENCE_NODE = 5;
const unsigned short ENTITY_NODE = 6;
const unsigned short PROCESSING_INSTRUCTION_NODE = 7;
const unsigned short COMMENT_NODE = 8;
const unsigned short DOCUMENT_NODE = 9;
const unsigned short DOCUMENT_TYPE_NODE = 10;
const unsigned short DOCUMENT_FRAGMENT_NODE = 11;
const unsigned short NOTATION_NODE = 12;
readonly attribute wstring nodeName;
attribute wstring nodeValue;
readonly attribute unsigned short nodeType;
readonly attribute Node parentNode;
readonly attribute NodeList childNodes;
readonly attribute Node firstChild;
readonly attribute Node lastChild;
readonly attribute Node previousSibling;
readonly attribute Node nextSibling;
readonly attribute NamedNodeMap attributes;
readonly attribute Document ownerDocument;
Node insertBefore(in Node newChild,
in Node refChild)
raises(DOMException);
Node replaceChild(in Node newChild,
in Node oldChild)
raises(DOMException);
Node removeChild(in Node oldChild)
raises(DOMException);
Node appendChild(in Node newChild)
raises(DOMException);
boolean hasChildNodes();
Node cloneNode(in boolean deep);
};
interface NodeList {
Node item(in unsigned long index);
readonly attribute unsigned long length;
};
interface NamedNodeMap {
Node getNamedItem(in wstring name);
Node setNamedItem(in Node arg)
raises(DOMException);
Node removeNamedItem(in wstring name)
raises(DOMException);
Node item(in unsigned long index);
readonly attribute unsigned long length;
};
interface CharacterData : Node {
attribute wstring data;
readonly attribute unsigned long length;
wstring substringData(in unsigned long offset,
in unsigned long count)
raises(DOMException);
void appendData(in wstring arg)
raises(DOMException);
void insertData(in unsigned long offset,
in wstring arg)
raises(DOMException);
void deleteData(in unsigned long offset,
in unsigned long count)
raises(DOMException);
void replaceData(in unsigned long offset,
in unsigned long count,
in wstring arg)
raises(DOMException);
};
interface Attribute : Node {
readonly attribute wstring name;
readonly attribute boolean specified;
attribute wstring value;
};
interface Element : Node {
readonly attribute wstring tagName;
wstring getAttribute(in wstring name);
void setAttribute(in wstring name,
in wstring value)
raises(DOMException);
void removeAttribute(in wstring name)
raises(DOMException);
Attribute getAttributeNode(in wstring name);
Attribute setAttributeNode(in Attribute newAttr)
raises(DOMException);
Attribute removeAttributeNode(in Attribute oldAttr)
raises(DOMException);
NodeList getElementsByTagName(in wstring name);
void normalize();
};
interface Text : CharacterData {
Text splitText(in unsigned long offset)
raises(DOMException);
};
interface Comment : CharacterData {
};
interface ProcessingInstruction : Node {
readonly attribute wstring target;
attribute wstring data;
};
interface CDATASection : Text {
};
interface DocumentType : Node {
readonly attribute wstring name;
readonly attribute NamedNodeMap entities;
readonly attribute NamedNodeMap notations;
};
interface Notation : Node {
readonly attribute wstring publicId;
readonly attribute wstring systemId;
};
interface Entity : Node {
readonly attribute wstring publicId;
readonly attribute wstring systemId;
readonly attribute wstring notationName;
};
interface EntityReference : Node {
};
interface HTMLCollection {
readonly attribute unsigned long length;
Node item(in unsigned long index);
Node namedItem(in wstring name);
};
interface HTMLDocument : Document {
attribute wstring title;
readonly attribute wstring referrer;
readonly attribute wstring domain;
readonly attribute wstring URL;
attribute HTMLElement body;
readonly attribute HTMLCollection images;
readonly attribute HTMLCollection applets;
readonly attribute HTMLCollection links;
readonly attribute HTMLCollection forms;
readonly attribute HTMLCollection anchors;
attribute wstring cookie;
void open();
void close();
void write(in wstring text);
void writeln(in wstring text);
Element getElementById(in wstring elementId);
NodeList getElementsByName(in wstring elementName);
};
interface HTMLElement : Element {
attribute wstring id;
attribute wstring title;
attribute wstring lang;
attribute wstring dir;
attribute wstring className;
};
interface HTMLHtmlElement : HTMLElement {
attribute wstring version;
};
interface HTMLHeadElement : HTMLElement {
attribute wstring profile;
};
interface HTMLLinkElement : HTMLElement {
attribute boolean disabled;
attribute wstring charset;
attribute wstring href;
attribute wstring hreflang;
attribute wstring media;
attribute wstring rel;
attribute wstring rev;
attribute wstring target;
attribute wstring type;
};
interface HTMLTitleElement : HTMLElement {
attribute wstring text;
};
interface HTMLMetaElement : HTMLElement {
attribute wstring content;
attribute wstring httpEquiv;
attribute wstring name;
attribute wstring scheme;
};
interface HTMLBaseElement : HTMLElement {
attribute wstring href;
attribute wstring target;
};
interface HTMLIsIndexElement : HTMLElement {
readonly attribute HTMLFormElement form;
attribute wstring prompt;
};
interface HTMLStyleElement : HTMLElement {
attribute boolean disabled;
attribute wstring media;
attribute wstring type;
};
interface HTMLBodyElement : HTMLElement {
attribute wstring aLink;
attribute wstring background;
attribute wstring bgColor;
attribute wstring link;
attribute wstring text;
attribute wstring vLink;
};
interface HTMLFormElement : HTMLElement {
readonly attribute HTMLCollection elements;
readonly attribute long length;
attribute wstring name;
attribute wstring acceptCharset;
attribute wstring action;
attribute wstring enctype;
attribute wstring method;
attribute wstring target;
void submit();
void reset();
};
interface HTMLSelectElement : HTMLElement {
readonly attribute wstring type;
attribute long selectedIndex;
attribute wstring value;
attribute long length;
readonly attribute HTMLFormElement form;
attribute HTMLCollection options;
attribute boolean disabled;
attribute boolean multiple;
attribute wstring name;
attribute long size;
attribute long tabIndex;
void add(in HTMLElement element,
in HTMLElement before);
void remove(in long index);
void blur();
void focus();
};
interface HTMLOptGroupElement : HTMLElement {
attribute boolean disabled;
attribute wstring label;
};
interface HTMLOptionElement : HTMLElement {
readonly attribute HTMLFormElement form;
attribute boolean defaultSelected;
readonly attribute wstring text;
attribute long index;
attribute boolean disabled;
attribute wstring label;
readonly attribute boolean selected;
attribute wstring value;
};
interface HTMLInputElement : HTMLElement {
attribute wstring defaultValue;
attribute boolean defaultChecked;
readonly attribute HTMLFormElement form;
attribute wstring accept;
attribute wstring accessKey;
attribute wstring align;
attribute wstring alt;
attribute boolean checked;
attribute boolean disabled;
attribute long maxLength;
attribute wstring name;
attribute boolean readOnly;
attribute wstring size;
attribute wstring src;
attribute long tabIndex;
readonly attribute wstring type;
attribute wstring useMap;
attribute wstring value;
void blur();
void focus();
void select();
void click();
};
interface HTMLTextAreaElement : HTMLElement {
attribute wstring defaultValue;
readonly attribute HTMLFormElement form;
attribute wstring accessKey;
attribute long cols;
attribute boolean disabled;
attribute wstring name;
attribute boolean readOnly;
attribute long rows;
attribute long tabIndex;
readonly attribute wstring type;
void blur();
void focus();
void select();
};
interface HTMLButtonElement : HTMLElement {
readonly attribute HTMLFormElement form;
attribute wstring accessKey;
attribute boolean disabled;
attribute wstring name;
attribute long tabIndex;
readonly attribute wstring type;
attribute wstring value;
};
interface HTMLLabelElement : HTMLElement {
readonly attribute HTMLFormElement form;
attribute wstring accessKey;
attribute wstring htmlFor;
};
interface HTMLFieldSetElement : HTMLElement {
readonly attribute HTMLFormElement form;
};
interface HTMLLegendElement : HTMLElement {
readonly attribute HTMLFormElement form;
attribute wstring accessKey;
attribute wstring align;
};
interface HTMLUListElement : HTMLElement {
attribute boolean compact;
attribute wstring type;
};
interface HTMLOListElement : HTMLElement {
attribute boolean compact;
attribute long start;
attribute wstring type;
};
interface HTMLDListElement : HTMLElement {
attribute boolean compact;
};
interface HTMLDirectoryElement : HTMLElement {
attribute boolean compact;
};
interface HTMLMenuElement : HTMLElement {
attribute boolean compact;
};
interface HTMLLIElement : HTMLElement {
attribute wstring type;
attribute long value;
};
interface HTMLBlockquoteElement : HTMLElement {
attribute wstring cite;
};
interface HTMLDivElement : HTMLElement {
attribute wstring align;
};
interface HTMLParagraphElement : HTMLElement {
attribute wstring align;
};
interface HTMLHeadingElement : HTMLElement {
attribute wstring align;
};
interface HTMLQuoteElement : HTMLElement {
attribute wstring cite;
};
interface HTMLPreElement : HTMLElement {
attribute long width;
};
interface HTMLBRElement : HTMLElement {
attribute wstring clear;
};
interface HTMLBaseFontElement : HTMLElement {
attribute wstring color;
attribute wstring face;
attribute wstring size;
};
interface HTMLFontElement : HTMLElement {
attribute wstring color;
attribute wstring face;
attribute wstring size;
};
interface HTMLHRElement : HTMLElement {
attribute wstring align;
attribute boolean noShade;
attribute wstring size;
attribute wstring width;
};
interface HTMLModElement : HTMLElement {
attribute wstring cite;
attribute wstring dateTime;
};
interface HTMLAnchorElement : HTMLElement {
attribute wstring accessKey;
attribute wstring charset;
attribute wstring coords;
attribute wstring href;
attribute wstring hreflang;
attribute wstring name;
attribute wstring rel;
attribute wstring rev;
attribute wstring shape;
attribute long tabIndex;
attribute wstring target;
attribute wstring type;
void blur();
void focus();
};
interface HTMLImageElement : HTMLElement {
attribute wstring lowSrc;
attribute wstring name;
attribute wstring align;
attribute wstring alt;
attribute wstring border;
attribute wstring height;
attribute wstring hspace;
attribute boolean isMap;
attribute wstring longDesc;
attribute wstring src;
attribute wstring useMap;
attribute wstring vspace;
attribute wstring width;
};
interface HTMLObjectElement : HTMLElement {
readonly attribute HTMLFormElement form;
attribute wstring code;
attribute wstring align;
attribute wstring archive;
attribute wstring border;
attribute wstring codeBase;
attribute wstring codeType;
attribute wstring data;
attribute boolean declare;
attribute wstring height;
attribute wstring hspace;
attribute wstring name;
attribute wstring standby;
attribute long tabIndex;
attribute wstring type;
attribute wstring useMap;
attribute wstring vspace;
attribute wstring width;
};
interface HTMLParamElement : HTMLElement {
attribute wstring name;
attribute wstring type;
attribute wstring value;
attribute wstring valueType;
};
interface HTMLAppletElement : HTMLElement {
attribute wstring align;
attribute wstring alt;
attribute wstring archive;
attribute wstring code;
attribute wstring codeBase;
attribute wstring height;
attribute wstring hspace;
attribute wstring name;
attribute wstring object;
attribute wstring vspace;
attribute wstring width;
};
interface HTMLMapElement : HTMLElement {
readonly attribute HTMLCollection areas;
attribute wstring name;
};
interface HTMLAreaElement : HTMLElement {
attribute wstring accessKey;
attribute wstring alt;
attribute wstring coords;
attribute wstring href;
attribute boolean noHref;
attribute wstring shape;
attribute long tabIndex;
attribute wstring target;
};
interface HTMLScriptElement : HTMLElement {
attribute wstring text;
attribute wstring htmlFor;
attribute wstring event;
attribute wstring charset;
attribute boolean defer;
attribute wstring src;
attribute wstring type;
};
interface HTMLTableElement : HTMLElement {
attribute HTMLTableCaptionElement caption;
attribute HTMLTableSectionElement tHead;
attribute HTMLTableSectionElement tFoot;
readonly attribute HTMLCollection rows;
attribute HTMLCollection tBodies;
attribute wstring align;
attribute wstring bgColor;
attribute wstring border;
attribute wstring cellPadding;
attribute wstring cellSpacing;
attribute wstring frame;
attribute wstring rules;
attribute wstring summary;
attribute wstring width;
HTMLElement createTHead();
void deleteTHead();
HTMLElement createTFoot();
void deleteTFoot();
HTMLElement createCaption();
void deleteCaption();
HTMLElement insertRow(in long index);
void deleteRow(in long index);
};
interface HTMLTableCaptionElement : HTMLElement {
attribute wstring align;
};
interface HTMLTableColElement : HTMLElement {
attribute wstring align;
attribute wstring ch;
attribute wstring chOff;
attribute long span;
attribute wstring vAlign;
attribute wstring width;
};
interface HTMLTableSectionElement : HTMLElement {
attribute wstring align;
attribute wstring ch;
attribute wstring chOff;
attribute wstring vAlign;
attribute HTMLCollection rows;
HTMLElement insertRow(in long index);
void deleteRow(in long index);
};
interface HTMLTableRowElement : HTMLElement {
attribute long rowIndex;
attribute long sectionRowIndex;
attribute HTMLCollection cells;
attribute wstring align;
attribute wstring bgColor;
attribute wstring ch;
attribute wstring chOff;
attribute wstring vAlign;
HTMLElement insertCell(in long index);
void deleteCell(in long index);
};
interface HTMLTableCellElement : HTMLElement {
attribute long cellIndex;
attribute wstring abbr;
attribute wstring align;
attribute wstring axis;
attribute wstring bgColor;
attribute wstring ch;
attribute wstring chOff;
attribute long colSpan;
attribute wstring headers;
attribute wstring height;
attribute boolean noWrap;
attribute long rowSpan;
attribute wstring scope;
attribute wstring vAlign;
attribute wstring width;
};
interface HTMLFrameSetElement : HTMLElement {
attribute wstring cols;
attribute wstring rows;
};
interface HTMLFrameElement : HTMLElement {
attribute wstring frameBorder;
attribute wstring longDesc;
attribute wstring marginHeight;
attribute wstring marginWidth;
attribute wstring name;
attribute boolean noResize;
attribute wstring scrolling;
attribute wstring src;
};
interface HTMLIFrameElement : HTMLElement {
attribute wstring align;
attribute wstring frameBorder;
attribute wstring height;
attribute wstring longDesc;
attribute wstring marginHeight;
attribute wstring marginWidth;
attribute wstring name;
attribute wstring scrolling;
attribute wstring src;
attribute wstring width;
};