Esempio n. 1
0
JSValue jsWorkerNavigatorUserAgent(ExecState* exec, JSValue slotBase, const Identifier&)
{
    JSWorkerNavigator* castedThis = static_cast<JSWorkerNavigator*>(asObject(slotBase));
    UNUSED_PARAM(exec);
    WorkerNavigator* imp = static_cast<WorkerNavigator*>(castedThis->impl());
    JSValue result = jsString(exec, imp->userAgent());
    return result;
}
Esempio n. 2
0
static v8::Handle<v8::Value> userAgentAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
    INC_STATS("DOM.WorkerNavigator.userAgent._get");
    WorkerNavigator* imp = V8WorkerNavigator::toNative(info.Holder());
    return v8String(imp->userAgent());
}