DesignerDocument.behaviorElement Property

SharePoint Designer Developer Reference

Returns an IHTMLElement object that represents the topmost parent element of the active selection, the element that receives the script. Corresponds to the element specified for Scripts on Tag as shown in the Behaviors task pane.

Syntax

expression.behaviorElement

expression   Required. A variable that represents a DesignerDocument object.

Remarks

If the insertion point is in the middle of a P element, the behaviorElement property returns the P element. If a selection spans more than one table row, the behaviorElement property returns the parent TABLE element, because the TABLE element is the parent element of all the elements in the selection. If a selection spans the entire document, the behaviorElement property returns the BODY element.

See Also