Skip to end of metadata
Go to start of metadata

void FB::JSObject::InvokeAsync ( const std::string &  methodName,
const std::vector< variant > &  args 
) [inline, virtual]

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

Parameters:
methodNameName of the method.
argsThe arguments.
See also:
Invoke

Definition at line 88 of file JSObject.h.

References getHost().

        {
            if (m_host.expired()) {
                throw std::runtime_error("Cannot invoke asynchronously");
            }
            
            getHost()->ScheduleOnMainThread(shared_from_this(), boost::bind(&JSObject::_invokeAsync, this, args, methodName));
        }

Here is the call graph for this function:

Labels: