コード例 #1
0
static v8::Handle<v8::Value> namedItemCallback(const v8::Arguments& args)
{
    INC_STATS("DOM.DOMPlugin.namedItem");
    DOMPlugin* imp = V8DOMPlugin::toNative(args.Holder());
    STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, name, MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined));
    return toV8(imp->namedItem(name));
}
コード例 #2
0
static v8::Handle<v8::Value> itemCallback(const v8::Arguments& args)
{
    INC_STATS("DOM.DOMPlugin.item");
    DOMPlugin* imp = V8DOMPlugin::toNative(args.Holder());
    EXCEPTION_BLOCK(unsigned, index, toUInt32(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined)));
    return toV8(imp->item(index));
}
コード例 #3
0
static v8::Handle<v8::Value> lengthAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
    INC_STATS("DOM.DOMPlugin.length._get");
    DOMPlugin* imp = V8DOMPlugin::toNative(info.Holder());
    return v8::Integer::NewFromUnsigned(imp->length());
}
コード例 #4
0
static v8::Handle<v8::Value> descriptionAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
    INC_STATS("DOM.DOMPlugin.description._get");
    DOMPlugin* imp = V8DOMPlugin::toNative(info.Holder());
    return v8String(imp->description());
}
コード例 #5
0
static v8::Handle<v8::Value> namedItemCallback(const v8::Arguments& args)
{
    DOMPlugin* imp = V8DOMPlugin::toNative(args.Holder());
    V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, name, MAYBE_MISSING_PARAMETER(args, 0, DefaultIsUndefined));
    return toV8(imp->namedItem(name), args.Holder(), args.GetIsolate());
}
コード例 #6
0
static v8::Handle<v8::Value> itemCallback(const v8::Arguments& args)
{
    DOMPlugin* imp = V8DOMPlugin::toNative(args.Holder());
    V8TRYCATCH(unsigned, index, toUInt32(MAYBE_MISSING_PARAMETER(args, 0, DefaultIsUndefined)));
    return toV8(imp->item(index), args.Holder(), args.GetIsolate());
}
コード例 #7
0
static v8::Handle<v8::Value> lengthAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
    DOMPlugin* imp = V8DOMPlugin::toNative(info.Holder());
    return v8UnsignedInteger(imp->length(), info.GetIsolate());
}
コード例 #8
0
static v8::Handle<v8::Value> descriptionAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
    DOMPlugin* imp = V8DOMPlugin::toNative(info.Holder());
    return v8String(imp->description(), info.GetIsolate());
}