Browser Compatibility Check Functions - Adobe 38040334 - Dreamweaver CS3 User Manual

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

Advertisement

.
var defaultAssetFolder = dom.getDefaultAssetFolder();
.
.
.
return retVal;
}

Browser compatibility check functions

The following functions facilitate locating combinations of HTML and CSS that can trigger browser rendering bugs
(for more information, refer to "The Browser Compatibility Check Issues API" chapter in Extending Dreamweaver),
but they can also be used in other types of extensions (such as Commands).
Note: The values that these functions return represent the styles currently in effect in Design View. When the functions
are used in Issue files as part of a browser compatibility check, Dreamweaver automatically filters the styles based on
how the target browsers would read them (for example, styles defined using Star HTML are be taken into account if the
target browser is Internet Explorer 6 or earlier), but this filtering is not done when you use the functions outside the scope
of a browser compatibility check.
elem.getComputedStyleProp()
Availability
Dreamweaver CS3.
Description
Gets the value of the specified CSS property that is used to render the specified element, regardless of where the
property is specified in the cascade. Lengths are reported in pixels (although unlike the browsers, "px" is not
specified with the value).
Arguments
propName, pseudoElt
- the name of a CSS property (use intercaps in place of hyphens; for example,
propName
become
)
"fontSize"
- the CSS pseudoelement, or
pseudoElt
Returns
A string containing the computed value for the property.
Note: Numerical values are also returned as strings; to use these values in calculations, convert them to numbers with
or
parseInt()
parseFloat()
Example
var dom = dw.getDocumentDOM();
var myDiv = dom.getElementsByTagName('myDiv');
var float = myDiv.getComputedStyleProp("float");
if (float == "left")
alert("This div is floated left.");
if there is none
null
.
DREAMWEAVER CS3
API Reference
would
"font-size"
306

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents