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

variant JSAPISimple::Invoke ( const std::string &  methodName,
const std::vector< variant > &  args 

Called by the browser to invoke a method on the JSAPI object.

methodNameName of the method.
argsThe arguments.
result of method call

Implements FB::JSAPI.

Definition at line 197 of file JSAPISimple.cpp.

198 {
199  if (!m_valid)
200  throw object_invalidated();
202  MethodMap::iterator fnd = m_methodMap.find(methodName);
203  if (fnd != m_methodMap.end() && fnd->second.callFunc != NULL) {
204  return (this->*fnd->second.callFunc)(args);
205  } else {
206  throw invalid_member(methodName);
207  }
208 }
Thrown by a JSAPI object when a call is made on it after the object has been invalidated.
Definition: JSExceptions.h:69
Thrown when an Invoke, SetProperty, or GetProperty call is made for a member that is invalid (does no...
Definition: JSExceptions.h:83
  • No labels