HTMLDocument DOM interface

All Document objects implement this too; even non-HTML documents
interface HTMLDocument {
  // Resource metadata management
  readonly attribute DOMString URL;
           attribute DOMString domain;
  readonly attribute DOMString referrer;
           attribute DOMString cookie;

  // DOM tree accessors
           attribute DOMString title;
           attribute HTMLElement body;
  readonly attribute HTMLCollection images;
  readonly attribute HTMLCollection links;
  readonly attribute HTMLCollection forms;
  readonly attribute HTMLCollection anchors;
  NodeList getElementsByName(in DOMString elementName);
  NodeList getElementsByClassName(in DOMString[] classNames);

  // Dynamic markup insertion
           attribute DOMString innerHTML;
  void open();
  void open(in DOMString type);
  void open(in DOMString type, in DOMString replace);
  void open(in DOMString url, in DOMString name, in DOMString features);
  void open(in DOMString url, in DOMString name, in DOMString features, in bool replace);
  void close();
  void write(in DOMString text);
  void writeln(in DOMString text);

  // Interaction
  readonly attribute Element activeElement;
  readonly attribute boolean hasFocus;

  // Commands
  readonly attribute HTMLCollection commands;

  // Editing
           attribute boolean designMode;
  boolean execCommand(in DOMString commandID);
  boolean execCommand(in DOMString commandID, in boolean doShowUI);
  boolean execCommand(in DOMString commandID, in boolean doShowUI, in DOMString value);
  Selection getSelection();

  // Cross-document messaging
  void postMessage(in DOMString message);

  // lots of other stuff to come
};

Previous | Next | Top | Cafe con Leche

Copyright 2007 Elliotte Rusty Harold
elharo@metalab.unc.edu
Last Modified February 4, 2007