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.
Searches the document for the combination of CSS and HTML that will trigger a specific browser rendering issue.
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.
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; }
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).
function getAffectedBrowsers(){ return new Array("Microsoft Internet Explorer 5.0", "Microsoft Internet Explorer 5.5", "Microsoft Internet Explorer 6.0"); }
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.
An array of browser names. This array must be parallel to the one returned by getAffectedBrowserProfiles().
function getAffectedBrowsers(){ return new Array("IE/Win 5.0", "IE/Win 5.5", "IE/Win 6.0"); }
function getIssueID() { return "EXPANDING_BOX_PROBLEM"; }
function getIssueName(){ return "The Expanding Box Problem"; }
function getIssueDescription(){ return "Fixed-dimension boxes will incorrectly expand to fit their content instead of clipping content at the specified width or height."; }