Example #1
0
FB::JSObjectPtr FB::BrowserHost::getDelayedInvokeDelegate() {
    if (getDOMWindow()) {
        if (call_delegate.empty()) {
            initJS(this);
        }
        if (!call_delegate.empty()) {
            return getDOMWindow()->getProperty<FB::JSObjectPtr>(call_delegate);
        }
    }
    return FB::JSObjectPtr();
}
Example #2
0
FB::JSObjectPtr FB::BrowserHost::getDelayedInvokeDelegate() {
    if (call_delegate.empty()) {
        // initJS wasn't called (yet?)!
        assert(false);
    }
    FB::JSObjectPtr delegate(getDOMWindow()->getProperty<FB::JSObjectPtr>(call_delegate));
    if (!delegate) {
        initJS(this);
        delegate = getDOMWindow()->getProperty<FB::JSObjectPtr>(call_delegate);
        assert(delegate);
    }
    return delegate;
}