FireBreath  1.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Pages
std::string FB::ActiveX::AXDOM::Element::getInnerHTML ( ) const
virtual

Gets the inner html for the element.

Returns
The inner html.

Reimplemented from FB::DOM::Element.

Definition at line 73 of file ActiveXCore/AXDOM/Element.cpp.

References FB::ptr_cast().

74 {
75  CComBSTR htmlStr;
76  CComQIPtr<IHTMLElement> elem(m_axDisp);
77  HRESULT hr = elem->get_innerHTML(&htmlStr);
78  if (SUCCEEDED(hr)) {
79  CComVariant var(htmlStr);
80  return FB::ptr_cast<ActiveXBrowserHost>(getJSObject()->getHost())->getVariant(&var).convert_cast<std::string>();
81  } else {
82  throw FB::script_error("Could not get innerhtml");
83  }
84 }
boost::shared_ptr< T > ptr_cast(boost::shared_ptr< U > const &r)
Convenience function for doing a dynamic cast of one boost::shared_ptr to another.
Definition: APITypes.h:339
Exception type; when thrown in a JSAPI method, a javascript exception will be thrown.
Definition: JSExceptions.h:28
virtual FB::JSObjectPtr getJSObject() const
Returns the FB::JSObjectPtr that this object is wrapping.

Here is the call graph for this function: