FireBreath  1.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Pages
variant FB::JSAPISimple::callFireEvent ( const std::vector< variant > &  args)
virtual

Example function for testing fireEvent.

Parameters
argsarguments from javascript. The first should be the name of the event to fire, the rest will be passed into the event
Returns
nothing

Definition at line 34 of file JSAPISimple.cpp.

References FB::JSAPIImpl::FireEvent().

35 {
36  std::vector<FB::variant> args(args_in);
37 
38  try {
39  std::string event = args[0].convert_cast<std::string>();
40  args.erase(args.begin());
41  this->FireEvent(event, args);
42  return event;
43  } catch (...) {
44  throw invalid_arguments();
45  }
46 }
Thrown by a JSAPI object when the argument(s) provided to a SetProperty or Invoke call are found to b...
Definition: JSExceptions.h:47
virtual void FireEvent(const std::wstring &eventName, const std::vector< variant > &args)
Definition: JSAPIImpl.h:92

Here is the call graph for this function: