
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.
Commenti su questo manuale