Page tree
Skip to end of metadata
Go to start of metadata

void FB::JSObject::SetPropertyAsync ( const std::string &  propertyName,
const variant value 

Just like SetProperty, but works asynchronously. Useful if you are running on another thread and don't need to wait to be sure it worked.

propertyNameName of the property.
valueThe value.

Definition at line 118 of file JSObject.h.

References FB::JSAPI::SetProperty().

119  {
120  BrowserHostPtr host(m_host.lock());
121  if (!host) {
122  throw std::runtime_error("Cannot invoke asynchronously");
123  }
124  host->ScheduleOnMainThread(shared_from_this(), boost::bind((FB::SetPropertyType)&JSAPI::SetProperty, this, propertyName, value));
125  }
virtual void SetProperty(const std::wstring &propertyName, const variant &value)
Definition: JSAPI.h:405
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
void(JSAPI::* SetPropertyType)(const std::string &, const variant &)
Defines an alias representing a function pointer to JSAPI::SetProperty.
Definition: APITypes.h:176

Here is the call graph for this function:

  • No labels