FireBreath  1.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Pages
void FB::JSObject::InvokeAsync ( const std::string &  methodName,
const std::vector< variant > &  args 

Just like Invoke, but works asynchronously. Useful for javascript callbacks and events. Can be safely called from any thread.

methodNameName of the method.
argsThe arguments.
See Also

Definition at line 90 of file JSObject.h.

91  {
92  BrowserHostPtr host(m_host.lock());
93  if (!host) {
94  throw std::runtime_error("Cannot invoke asynchronously");
95  }
96  host->ScheduleOnMainThread(shared_from_this(), boost::bind(&JSObject::_invokeAsync, this, args, methodName));
97  }
boost::shared_ptr< FB::BrowserHost > BrowserHostPtr
Defines an alias representing a BrowserHost shared_ptr (you should never use a BrowserHost* directly)...
Definition: APITypes.h:117