Adobe Extending Dreamweaver CS4 Manual do Utilizador Página 134

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 387
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 133
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");
}
Vista de página 133
1 2 ... 129 130 131 132 133 134 135 136 137 138 139 ... 386 387

Comentários a estes Manuais

Sem comentários