Chapter 8: browser compatibility check issues api, How detection works, An issues example – Adobe Extending Dreamweaver CS4 User Manual
Page 131
125
Chapter 8: Browser compatibility check
issues API
In Adobe Dreamweaver, the browser compatibility check (BCC) feature helps you create page layouts that work well
(that is, the page layouts have the same look and function) across multiple browsers by locating combinations of
HTML and CSS that can trigger browser rendering bugs. The feature uses JavaScript to search the user’s document for
the problematic combinations of HTML and CSS. The JavaScript code is stored in HTML files called Issue detection
files; these files must be saved in the Configuration/BrowserProfiles/Issues/ folder to work properly.
How detection works
The first time a user chooses to run a browser compatibility check (and anytime the user clicks OK in the Target
Browsers dialog box), the following events occur:
1
Dreamweaver reads in the profiles for the chosen browsers from the Configuration/BrowserProfiles/ folder.
2
Dreamweaver calls the
getIssueID()
function in each Issue file in the Configuration/BrowserProfiles/Issues/
folder to get the unique ID of each Issue.
3
Dreamweaver calls the
getAffectedBrowserDisplayNames()
function, if defined, for each Issue.
4
Dreamweaver calls the
getAffectedBrowserProfiles()
function for each Issue to determine whether the Issue
affects one or more of the chosen browsers.
5
Dreamweaver calls the
getIssueName()
function for each Issue to determine the name to display in the Results
panel when the Issue is detected.
6
Dreamweaver calls the
getIssueDescription
function for each Issue to determine the text to display in the right
side of the Results panel and in the tooltip when the user mouses over an Issue squiggly in Code view, if the Issue
is detected.
The following events occur for each browser chosen in the BCC Settings dialog box after step 6 in the preceding
procedure and for each subsequent browser compatibility check.
Sequence of events
1
Dreamweaver parses the styles that apply to the current document, whether defined inline, in the head, or in an
external style sheet, as the affected browser would read them.
2
Dreamweaver calls the
findIssue()
function in each Issue file that applies to the affected browser.
An Issues example
The following examples are the files
ColAndColgroupCapturedByCaption.htm
and
ColAndColgroupCapturedByCaption.js
located in the Configuration/BrowserProfiles/Issues/ folder.