nsISupports
Last changed in Gecko 6.0 (Firefox 6.0 / Thunderbird 6.0 / SeaMonkey 2.3)void captureEvents(in long eventFlags); |
void clear(); |
boolean execCommand(in DOMString commandID, in boolean doShowUI, in DOMString value); |
boolean execCommandShowHelp(in DOMString commandID); Obsolete since Gecko 14.0 |
DOMString getSelection(); |
nsIDOMDocument open(in ACString aContentType, in boolean aReplace); |
boolean queryCommandEnabled(in DOMString commandID); |
boolean queryCommandIndeterm(in DOMString commandID); |
boolean queryCommandState(in DOMString commandID); |
boolean queryCommandSupported(in DOMString commandID); |
DOMString queryCommandText(in DOMString commandID); Obsolete since Gecko 14.0 |
DOMString queryCommandValue(in DOMString commandID); |
void releaseEvents(in long eventFlags); |
void routeEvent(in nsIDOMEvent evt); |
void write(); Obsolete since Gecko 2.0 |
void writeln(); Obsolete since Gecko 2.0 |
| Attribute | Type | Description |
alinkColor |
DOMString |
Same as body.aLink |
bgColor |
DOMString |
Same as body.bgColor |
compatMode |
DOMString |
Returns "BackCompat" if the document is in Quirks mode or "CSS1Compat" if the document is in Full Standards or Almost Standards mode. Read only. |
designMode |
DOMString |
Set to "on" or "off" to enable or disable editing for the entire document at once. Roughly equivalent to body.contentEditable |
domain |
DOMString |
Initially the host name of the document's URL, but may be changed to the parent (but not top-level) domain in order to facilitate data exchange between documents from different sites in the same domain. |
embeds |
|
Equivalent to getElementsByTagName("embed") Read only. |
fgColor |
DOMString |
Same as body.text |
head |
|
Returns the first child element of the HTML element that is a HEAD element, or null if there is no HTML or HEAD element. Read only. |
height |
long |
The height of the body element. Read only. Obsolete since Gecko 6.0 |
linkColor |
DOMString |
Same as body.link |
plugins |
|
Same as embeds for compatibility with Netscape 4.x Read only. |
vlinkColor |
DOMString |
Same as body.vLink |
width |
long |
The width of the body element. Read only. Obsolete since Gecko 6.0 |
Provided for compatibility with Netscape 4.x, but does not actually do anything.
void captureEvents( in long eventFlags );
eventFlagsUsed to reset a document to blank, but deprecated since Gecko 1.0 and provided for compatibility with Netscape 4.x; use open() and close() instead.
void clear();
None.
boolean execCommand( in DOMString commandID, in boolean doShowUI, in DOMString value );
commandIDdoShowUIvaluenull for those commands that do not need an argument.true if the command was recognized, false otherwise.
This method never did anything but throw an exception, and was removed entirely in Gecko 14.0 (Firefox 14.0 / Thunderbird 14.0 / SeaMonkey 2.11).
boolean execCommandShowHelp( in DOMString commandID );
commandIDThis method is not supported and always throws an exception.
DOMString getSelection();
None.
The text of the current selection, the same as window.getSelection.toString().
nsIDOMDocument open( in ACString aContentType, in boolean aReplace );
aContentTypeaReplaceThe new document.
boolean queryCommandEnabled( in DOMString commandID );
commandIDReturns true if the command is supported and enabled, false otherwise.
boolean queryCommandIndeterm( in DOMString commandID );
commandIDFor stateful commands, returns true if the command is in an indeterminate state, false otherwise. For instance, if there is a selection and part of the selected text is bold, then then bold command is in an indeterminate state.
boolean queryCommandState( in DOMString commandID );
commandIDFor stateful commands, returns true if the command has is active, false otherwise.
boolean queryCommandSupported( in DOMString commandID );
commandIDReturns true if the command is supported on the current range, false otherwise.
This method never did anything but throw an exception, and was removed entirely in Gecko 14.0 (Firefox 14.0 / Thunderbird 14.0 / SeaMonkey 2.11).
DOMString queryCommandText( in DOMString commandID );
commandIDThis method is not supported and always throws an exception.
DOMString queryCommandValue( in DOMString commandID );
commandIDThe value of the command. For the gethtml command, the current selection is returned as an HTML source fragment.
Provided for compatibility with Netscape 4.x, but does not actually do anything.
void releaseEvents( in long eventFlags );
eventFlagsProvided for compatibility with Netscape 4.x, but does not actually do anything.
void routeEvent( in nsIDOMEvent evt );
evtvoid write( [optional] in DOMString text );
textvoid writeln( [optional] in DOMString text );
textClasses that implement this interface:
nsHTMLDocument class: content/html/document/src/nsHTMLDocument.h