Getaffectedbrowserprofiles() – Adobe Extending Dreamweaver CS4 User Manual

Page 134

Advertising
background image

128

EXTENDING DREAMWEAVER CS4

Browser compatibility check issues API

Description
Searches the document for the combination of CSS and HTML that will trigger a specific browser rendering issue.

Arguments
None.

Returns
An array of element nodes that exhibit (or otherwise represent) the problem. Dreamweaver selects these nodes as the
user navigates from one browser compatibility issue to the next.

Example
The following

findIssue()

function returns an array of

<button>

tags to which

float: left

or

float: right

has

been applied:

function findIssue(){

var DOM = dw.getDocumentDOM();
var issueNodes = new Array();
var buttons = DOM.getElementsByTagName('button');
var props = null;
for (var i=0; i < buttons.length; i++){

props = window.getDeclaredStyle(buttons[i]);
if (props.cssFloat == "left" || props.cssFloat == "right"){

issueNodes.push(buttons[i]);

}

}
return issueNodes;

}

getAffectedBrowserProfiles()

Availability
Dreamweaver CS3.

Description
Provides Dreamweaver with a list of browsers for which this issue is relevant.

Arguments
None.

Returns
An array of browser names, each of which must match exactly the first line in a valid browser profile (see the TXT files
in the Configuration/BrowserProfiles folder).

Example

function getAffectedBrowsers(){

return new Array("Microsoft Internet Explorer 5.0",

"Microsoft Internet Explorer 5.5",
"Microsoft Internet Explorer 6.0");

}

Advertising
This manual is related to the following products: