Class widgets.Element
A proxy for an element of a DOM
Defined in: widgets.js.
Constructor Summary
Field Summary
document
The DOM document that is at the top of the map containing this Element.
controller
The Mozmill controller object associated with this Element.
window
The DOM window object associated with this Element.
elem
The Mozmill elementslib object associated with this Element.
node
The DOM node object associated with this Element.
Constructor Detail
new widgets.Element(locatorType, locator, owner)
Element is a proxy for an element of a DOM. It defines the core binding
behavior: locating the element via any of serveral lookup methods.
It also provides the owner/owned relationship that allows Elements to be
arranged in a tree-shaped Element map.
- Parameters:
- {String} locatorType
- The type of locator being supplied. Choices are:
- node
- A node, as in Mozmill's Elem()
- id
- An ID string, as in Mozmill's ID()
- xpath
- An XPath string, as in Mozmill's XPath()
- name
- A name string, as in Mozmill's Name()
- lookup
- A lookup string, as in Mozmill's Lookup()
- tag
- A JQuery-style element selector string
- {node|String} locator
- The actual locator. If locatorType is "node," a node object is expected. For all other types, a String is expected.
- {document|Element} owner
- The owner (parent) of this Element. The top of an Element map is owned by a document. Other members of the map are owned by their parent Elements.
Field Detail