Adobe Dreamweaver API Reference CS5 User Manual Page 346

  • Download
  • Add to my manuals
  • Print
  • Page
    / 533
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 345
341
DREAMWEAVER API REFERENCE
Page content
Last updated 8/27/2013
Example
[...]
var blocks = DOM.getBlockElements();
var dProps = null, children = null;
for (var i=0; i < blocks.length; i++){
// get the declared styles so we can see whether width
// or height have been specified explicitly
dProps = window.getDeclaredStyle(blocks[i]);
// if the block has children, border-left, and padding-bottom
// but no width or height
if (blocks[i].hasChildNodes() && |
issueUtils.hasBorder(blocks[i],null,"left") &&
(parseFloat(blocks[i].getComputedStyleProp("padding-bottom")) > 0) &&
typeof(dProps.width) == "undefined" && typeof(dProps.height) == "undefined"){
children = blocks[i].getBlockElements();
var hasLayout = false;
// loop through the block-level children to see if
// any have width or height defined. width or height on any
// of the children of the outer block will prevent the bug.
for (var j=0; j < children.length; j++){
dProps = window.getDeclaredStyle(children[j]);
if (typeof(dProps.width) != "undefined" || typeof(dProps.height) !=
"undefined"){
hasLayout = true;
break;
}
}
[...]
}
}
[...]
dom.getInlineElements() elem.getInlineElements()
Availability
Dreamweaver CS3.
Description
Scans the document (or element) for descendents with an inherent or specified display value of 'inline'.
Arguments
None.
Returns
An array of element nodes.
Page view 345
1 2 ... 341 342 343 344 345 346 347 348 349 350 351 ... 532 533

Comments to this Manuals

No comments