Adobe 38040334 API Reference - Page 309
dom.copyAssets
UPC - 883919090467
View all Adobe 38040334 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 309 highlights
DREAMWEAVER CS3 304 API Reference Arguments code, insideHead • code is a string containing the JavaScript code to be inserted into the page • insideHead is a Boolean value that indicates whether to insert the JavaScript block in the head or in the body. The default is true, which inserts the code in the head. If false, the code is inserted in the body immediately before the tag. This argument is optional. Returns Nothing. Example function objectTag() { . . . var dom = dw.getDocumentDOM(); var id = dwscripts.getUniqueId("accordion"); var code = "new Accordion('" + id + "',250,{duration:200,step:20})"; dom.addJavaScript(code, false); return retVal; } dom.copyAssets() Availability Dreamweaver CS3. Description An extension author can use this API to copy external dependent files to the user's site and add the necessary file references into the head of the page. Arguments assetArray An array of JavaScript objects. Each JavaScript object has "srcURL", "destURL", "referenceType", "useDefaultFolder" and "useRelativeSrc" fields. • "srcURL" is a path relative to the Dreamweaver configuration folder and refers to the asset that the extension author provides. See the "useRelativeSrc" description in this section. • "destURL" is a path relative to the default asset folder of a Dreamweaver site and refers to the location where the asset should be copied to. By default, Dreamweaver creates an Assets folder in a site and uses it as the default asset folder. Users can change the default asset folder when they define a Dreamweaver site. See the "useDefault" description in this section. • "referenceType" is necessary for the extension author to insert a file reference into the head. The valid values for "referenceType" are as follows: • "link" to insert a LINK tag for an external CSS file • "import" to insert a STYLE tag with @import