All of the functions in the issues API are required except for getAffectedBrowserDisplayNames(). As with all extension APIs, you are responsible for writing the body of each function and returning an appropriate value to Dreamweaver. For information about browser compatibility check functions, see the “Page Content” topic in the Dreamweaver API Reference.
findIssue()
Availability
Dreamweaver CS3.
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");
}
getAffectedBrowserDisplayNames()
Availability
Dreamweaver CS3.
Description
Provides Dreamweaver with a list of user-visible browser names for which this issue is relevant. This function is optional; if not supplied, the profile names supplied by getAffectedBrowserProfiles() will be used instead.
Arguments
None.
Returns
An array of browser names. This array must be parallel to the one returned by getAffectedBrowserProfiles().
Example
function getAffectedBrowsers(){
return new Array("IE/Win 5.0",
"IE/Win 5.5",
"IE/Win 6.0");
}
getIssueID()
Availability
Dreamweaver CS3.
Description
Provides Dreamweaver with a unique ID for the issue.
Arguments
None.
Returns
A string with a unique issue identifier.
Example
function getIssueID() {
return "EXPANDING_BOX_PROBLEM";
}
getIssueName()
Availability
Dreamweaver CS3.
Description
Provides Dreamweaver with the name or a short description of the issue.
Arguments
None.
Returns
A string containing the name or a short description of the issue.
Example
function getIssueName(){
return "The Expanding Box Problem";
}
getIssueDescription()
Availability
Dreamweaver CS3.
Description
Provides Dreamweaver with a detailed description of the issue.
Arguments
None.
Returns
A string containing the name or a short description of the issue.
Example
function getIssueDescription(){
return "Fixed-dimension boxes will incorrectly expand to fit their
content instead of clipping content at the specified width
or height.";
}
Build beautiful websites in Dreamweaver
Design, code, and manage dynamic websites in a powerful all-in-one tool.