Adobe 38040334 - Dreamweaver CS3 User Manual page 242

Api reference
Hide thumbs Also See for 38040334 - Dreamweaver CS3:
Table of Contents

Advertisement

• The
argument must be
sourceDoc
"parent.frames['frameName']"
a value. These argument values have the following meanings:
• The
value specifies the document that has focus and contains the current selection.
document
• The
value specifies the parent frameset (if the currently selected document is in a frame).
parent
• The
parent.frames[number]
particular frame within the frameset that contains the current document.
• If the argument is a relative URL, it is relative to the extension file.
Note: If the argument is
"document"
function, or any function in a command or Property inspector file that can perform edits to the document.
objectTag()
Returns
The JavaScript document object at the root of the tree.
Examples
The following example uses the
var theDOM = dreamweaver.getDocumentDOM("document");
In the following example, the current document DOM identifies a selection and pastes it at the end of another
document:
var currentDOM = dreamweaver.getDocumentDOM('document');
currentDOM.setSelection(100,200);
currentDOM.clipCopy();
var otherDOM = dreamweaver.openDocument(dreamweaver.¬
getSiteRoot() + "html/foo.htm");
otherDOM.endOfDocument();
otherDOM.clipPaste();
Note: The
openDocument()
Running a function on a document that isn't open causes a Dreamweaver error. The
on the active document or on closed documents indicate this fact in their descriptions.
dreamweaver.getNewDocumentDOM()
Availability
Dreamweaver MX; added
documentType
Description
Provides access to the editable tree for a new, empty document. This function works in the same way as the
function, except that it points to a new document, not an existing one, and does not open the document.
umetDOM()
Arguments
{documentType}
• The
argument is a string. Its value must be a document type specified in the DocumentTypes.xml
documentType
file.
Returns
A pointer to a new, empty document.
,
"document"
"parent"
, or a URL. The
sourceDoc
and
parent.frames['frameName']
, the calling function must be the
dreamweaver.getDocumentDOM()
argument is used because
DOM
argument in Dreamweaver 8.
,
"parent.frames[number]"
value defaults to
"document"
values specify a document that is in a
applyBehavior()
function to access the current document:
methods normally operate only on open documents.
DOM
DREAMWEAVER CS3
API Reference
,
if you do not supply
,
,
deleteBehavior()
methods that can operate only
getDoc-
237

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents