Geoff Chappell - Software Analyst
The CDocument class is the internal implementation of what MSHTML exposes for scripting as the document object.
class: | CDocument | {3050F83B-98B5-11CF-BB82-00AA00BDCE0B} |
coclass: | HTMLDocument | {25336920-03F9-11CF-8FD0-00AA00686F13} |
dispinterface: | DispHTMLDocument | {3050F55F-98B5-11CF-BB82-00AA00BDCE0B} |
The CDocument class implements the following interfaces:
Of course, only some of those many interfaces are intended for scripting. The table below lists the interface members that the CDocument class exposes as properties (methods, collections, etc) through its string table.
Properties that Microsoft does not list in the HTML and DHTML Reference are highlighted yellow. Properties that are listed but not as applying to the document object are shaded yellow. Since there are quite a few on both counts, please be reminded that appearance in the list below does not mean that the property is usefully or even meaningfully accessible in scripts: it means only that as far as the MSHTML implementation is concerned, a name is provided and an attempt at access does get handled, but perhaps trivially.
Property | Attribute | Interface | Member |
---|---|---|---|
activeElement | IHTMLDocument2 | get_activeElement | |
alinkColor | same | IHTMLDocument2 | get_alinkColor put_alinkColor |
all | IHTMLDocument2 | get_all | |
anchors | IHTMLDocument2 | get_anchors | |
appendChild | IHTMLDOMNode | appendChild | |
applets | IHTMLDocument2 | get_applets | |
attachEvent | IHTMLDocument3 | attachEvent | |
attributes | IHTMLDOMNode | get_attributes | |
baseUrl | IHTMLDocument3 | get_baseUrl put_baseUrl |
|
bgColor | same | IHTMLDocument2 | get_bgColor put_bgColor |
body | IHTMLDocument2 | get_body | |
charset | IHTMLDocument2 | get_charset put_charset |
|
childNodes | IHTMLDOMNode | get_childNodes | |
clear | IHTMLDocument2 | clear | |
cloneNode | IHTMLDOMNode | cloneNode | |
close | IHTMLDocument2 | close | |
compatMode | IHTMLDocument5 | get_compatMode | |
cookie | IHTMLDocument2 | get_cookie put_cookie |
|
createAttribute | IHTMLDocument5 | createAttribute | |
createComment | IHTMLDocument5 | createComment | |
createDocumentFragment | IHTMLDocument3 | createDocumentFragment | |
createDocumentFromUrl | IHTMLDocument4 | createDocumentFromUrl | |
createElement | IHTMLDocument2 | createElement | |
createEventObject | IHTMLDocument4 | createEventObject | |
createRenderStyle | IHTMLDocument4 | createRenderStyle | |
createStyleSheet | IHTMLDocument2 | createStyleSheet | |
createTextNode | IHTMLDocument3 | createTextNode | |
defaultCharset | IHTMLDocument2 | get_defaultCharset put_defaultCharset |
|
designMode | same | IHTMLDocument2 | get_designMode put_designMode |
detachEvent | IHTMLDocument3 | detachEvent | |
dir | same | IHTMLDocument3 | get_dir put_dir |
doctype | IHTMLDocument5 | get_doctype | |
documentElement | IHTMLDocument3 | get_documentElement | |
domain | IHTMLDocument2 | get_domain put_domain |
|
elementFromPoint | IHTMLDocument2 | elementFromPoint | |
embeds | IHTMLDocument2 | get_embeds | |
enableDownload | IHTMLDocument3 | get_enableDownload put_enableDownload |
|
execCommand | IHTMLDocument2 | execCommand | |
execCommandShowHelp | IHTMLDocument2 | execCommandShowHelp | |
expando | IHTMLDocument2 | get_expando put_expando |
|
fgColor | same | IHTMLDocument2 | get_fgColor put_fgColor |
fileCreatedDate | IHTMLDocument2 | get_fileCreatedDate | |
fileModifiedDate | IHTMLDocument2 | get_fileModifiedDate | |
fileSize | IHTMLDocument2 | get_fileSize | |
fileUpdatedDate | IHTMLDocument2 | get_fileUpdatedDate | |
fireEvent | IHTMLDocument4 | fireEvent | |
firstChild | IHTMLDOMNode | get_firstChild | |
focus | IHTMLDocument4 | focus | |
forms | IHTMLDocument2 | get_forms | |
frames | IHTMLDocument2 | get_frames | |
getElementById | IHTMLDocument3 | getElementById | |
getElementsByName | IHTMLDocument3 | getElementsByName | |
getElementsByTagName | IHTMLDocument3 | getElementsByTagName | |
hasChildNodes | IHTMLDOMNode | hasChildNodes | |
hasFocus | IHTMLDocument4 | hasFocus | |
images | IHTMLDocument2 | get_images | |
implementation | IHTMLDocument5 | get_implementation | |
inheritStyleSheets | IHTMLDocument3 | get_inheritStyleSheets put_inheritStyleSheets |
|
insertBefore | IHTMLDOMNode | insertBefore | |
lastChild | IHTMLDOMNode | get_lastChild | |
lastModified | IHTMLDocument2 | get_lastModified | |
linkColor | same | IHTMLDocument2 | get_linkColor put_linkColor |
links | IHTMLDocument2 | get_links | |
location | IHTMLDocument2 | get_location | |
media | IHTMLDocument4 | get_media put_media |
|
mimeType | IHTMLDocument2 | get_mimeType | |
nameProp | IHTMLDocument2 | get_nameProp | |
namespaces | IHTMLDocument4 | get_namespaces | |
nextSibling | IHTMLDOMNode | get_nextSibling | |
nodeName | IHTMLDOMNode | get_nodeName | |
nodeType | IHTMLDOMNode | get_nodeType | |
nodeValue | IHTMLDOMNode | get_nodeValue put_nodeValue |
|
onactivate | same | IHTMLDocument5 | get_onactivate put_onactivate |
onafterupdate | same | IHTMLDocument2 | get_onafterupdate put_onafterupdate |
onbeforeactivate | same | IHTMLDocument5 | get_onbeforeactivate put_onbeforeactivate |
onbeforedeactivate | same | IHTMLDocument5 | get_onbeforedeactivate put_onbeforedeactivate |
onbeforeeditfocus | same | IHTMLDocument3 | get_onbeforeeditfocus put_onbeforeeditfocus |
onbeforeupdate | same | IHTMLDocument2 | get_onbeforeupdate put_onbeforeupdate |
oncellchange | same | IHTMLDocument3 | get_oncellchange put_oncellchange |
onclick | same | IHTMLDocument2 | get_onclick put_onclick |
oncontextmenu | same | IHTMLDocument3 | get_oncontextmenu put_oncontextmenu |
oncontrolselect | same | IHTMLDocument4 | get_oncontrolselect put_oncontrolselect |
ondataavailable | same | IHTMLDocument3 | get_ondataavailable put_ondataavailable |
ondatasetchanged | same | IHTMLDocument3 | get_ondatasetchanged put_ondatasetchanged |
ondatasetcomplete | same | IHTMLDocument3 | get_ondatasetcomplete put_ondatasetcomplete |
ondblclick | same | IHTMLDocument2 | get_ondblclick put_ondblclick |
ondeactivate | same | IHTMLDocument5 | get_ondeactivate put_ondeactivate |
ondragstart | same | IHTMLDocument2 | get_ondragstart put_ondragstart |
onerrorupdate | same | IHTMLDocument2 | get_onerrorupdate put_onerrorupdate |
onfocusin | same | IHTMLDocument5 | get_onfocusin put_onfocusin |
onfocusout | same | IHTMLDocument5 | get_onfocusout put_onfocusout |
onhelp | same | IHTMLDocument2 | get_onhelp put_onhelp |
onkeydown | same | IHTMLDocument2 | get_onkeydown put_onkeydown |
onkeypress | same | IHTMLDocument2 | get_onkeypress put_onkeypress |
onkeyup | same | IHTMLDocument2 | get_onkeyup put_onkeyup |
onmousedown | same | IHTMLDocument2 | get_onmousedown put_onmousedown |
onmousemove | same | IHTMLDocument2 | get_onmousemove put_onmousemove |
onmouseout | same | IHTMLDocument2 | get_onmouseout put_onmouseout |
onmouseover | same | IHTMLDocument2 | get_onmouseover put_onmouseover |
onmouseup | same | IHTMLDocument2 | get_onmouseup put_onmouseup |
onmousewheel | same | IHTMLDocument5 | get_onmousewheel put_onmousewheel |
onpropertychange | same | IHTMLDocument3 | get_onpropertychange put_onpropertychange |
onreadystatechange | same | IHTMLDocument2 | get_onreadystatechange put_onreadystatechange |
onrowenter | same | IHTMLDocument2 | get_onrowenter put_onrowenter |
onrowexit | same | IHTMLDocument2 | get_onrowexit put_onrowexit |
onrowsdelete | same | IHTMLDocument3 | get_onrowsdelete put_onrowsdelete |
onrowsinserted | same | IHTMLDocument3 | get_onrowsinserted put_onrowsinserted |
onselectionchange | same | IHTMLDocument4 | get_onselectionchange put_onselectionchange |
onselectstart | same | IHTMLDocument2 | get_onselectstart put_onselectstart |
onstop | same | IHTMLDocument3 | get_onstop put_onstop |
open | IHTMLDocument2 | open | |
ownerDocument | IHTMLDOMNode2 | get_ownerDocument | |
parentDocument | IHTMLDocument3 | get_parentDocument | |
parentNode | IHTMLDOMNode | get_parentNode | |
parentWindow | IHTMLDocument2 | get_parentWindow | |
plugins | IHTMLDocument2 | get_plugins | |
previousSibling | IHTMLDOMNode | get_previousSibling | |
protocol | IHTMLDocument2 | get_protocol | |
queryCommandEnabled | IHTMLDocument2 | queryCommandEnabled | |
queryCommandIndeterm | IHTMLDocument2 | queryCommandIndeterm | |
queryCommandState | IHTMLDocument2 | queryCommandState | |
queryCommandSupported | IHTMLDocument2 | queryCommandSupported | |
queryCommandText | IHTMLDocument2 | queryCommandText | |
queryCommandValue | IHTMLDocument2 | queryCommandValue | |
readyState | IHTMLDocument2 | get_readyState | |
recalc | IHTMLDocument3 | recalc | |
referrer | IHTMLDocument2 | get_referrer | |
releaseCapture | IHTMLDocument3 | releaseCapture | |
removeChild | IHTMLDOMNode | removeChild | |
removeNode | IHTMLDOMNode | removeNode | |
replaceChild | IHTMLDOMNode | replaceChild | |
replaceNode | IHTMLDOMNode | replaceNode | |
Script | IHTMLDocument | get_Script | |
scripts | IHTMLDocument2 | get_scripts | |
security | IHTMLDocument2 | get_security | |
selection | IHTMLDocument2 | get_selection | |
styleSheets | IHTMLDocument2 | get_styleSheets | |
swapNode | IHTMLDOMNode | swapNode | |
title | IHTMLDocument2 | get_title put_title |
|
toString | IHTMLDocument2 | toString | |
uniqueID | IHTMLDocument3 | get_uniqueID | |
URL | IHTMLDocument2 | get_URL put_URL |
|
URLUnencoded | IHTMLDocument4 | get_URLUnencoded | |
vlinkColor | same | IHTMLDocument2 | get_vlinkColor put_vlinkColor |
write | IHTMLDocument2 | write | |
writeln | IHTMLDocument2 | writeln |