FireBreath  1.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Pages
static ElementPtr FB::DOM::Element::create ( const FB::JSObjectPtr api)
inlinestatic

Creates a FB::DOM::Element object from a JSObjectPtr representing a DOM object. This will probably throw an exception and definitely not work right if the DOM object represented is not a Element.

Parameters
apiThe FB::JSObjectAPI object containing the element to wrap
Returns
FB::DOM::ElementPtr to the created Element object

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

Referenced by FB::ActiveX::AXDOM::Document::createElement(), FB::Npapi::NpapiBrowserHost::getDOMElement(), FB::ActiveX::AXDOM::Document::getElementById(), FB::ActiveX::AXDOM::Element::getElementsByTagName(), and FB::ActiveX::AXDOM::Document::getElementsByTagName().

61  {
62  if (!api) { return ElementPtr(); } // If the API is null, return a NULL Element
63  return api->getHost()->_createElement(api);
64  }
boost::shared_ptr< Element > ElementPtr
shared_ptr for a FB::DOM::Element