beautypg.com

Elem.isinlineelement(), Elem.isheaderelement() – Adobe Dreamweaver API Reference CS5 User Manual

Page 349

background image

344

DREAMWEAVER API REFERENCE

Page content

Last updated 8/27/2013

elem.isInlineElement()

Availability
Dreamweaver CS3.

Description
Checks whether the element has an inherent or specified display value of

'inline'

.

Arguments
None.

Returns
A Boolean value indicating whether the object is an inline element.

Example

[...]

var DOM = dw.getDocumentDOM();
var floats = issueUtils.getFloats(DOM.body);
var next = null;
for (var i=0; i < floats.length; i++){

next = floats[i].nextSibling;
// if nextSibling of float is a text node or an inline element
if (next && (next.nodeType == Node.TEXT_NODE ||

(next.nodeType == Node.ELEMENT_NODE && next.isInlineElement()))){

// do something
}

}
[...]

elem.isHeaderElement()

Availability
Dreamweaver CS3.

Description
Checks whether the element is one of the following tags: h1, h2, h3, h4, h5, h6.

Arguments
None.

Returns
A Boolean value indicating whether the object is a header element.