FireBreath  1.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Pages
ElementPtr FB::DOM::Element::getElement ( const std::string &  name) const
inlinevirtual

Gets a child element of the specified name.

This is the rough equivilent of the following javascript command

// if name = child
var el2 = element.child;
// or
var el2 = element[name];
Parameters
nameThe name of the subelement.
Returns
The child element.

Definition at line 190 of file ScriptingCore/DOM/Element.h.

191  {
192  JSObjectPtr api = getProperty<FB::JSObjectPtr>(name);
193  ElementPtr retVal((api) ? new Element(api) : NULL);
194  return retVal;
195  }
boost::shared_ptr< FB::JSObject > JSObjectPtr
Defines an alias representing a JSObject shared_ptr (you should never use a JSObject* directly) ...
Definition: APITypes.h:109
boost::shared_ptr< Element > ElementPtr
shared_ptr for a FB::DOM::Element