示例#1
0
JSValue jsMediaListMediaText(ExecState* exec, JSValue slotBase, const Identifier&)
{
    JSMediaList* castedThis = static_cast<JSMediaList*>(asObject(slotBase));
    UNUSED_PARAM(exec);
    MediaList* imp = static_cast<MediaList*>(castedThis->impl());
    JSValue result = jsStringOrNull(exec, imp->mediaText());
    return result;
}
示例#2
0
JSValue* JSMediaList::getValueProperty(ExecState* exec, int token) const
{
    switch (token) {
    case MediaTextAttrNum: {
        MediaList* imp = static_cast<MediaList*>(impl());
        return jsStringOrNull(exec, imp->mediaText());
    }
    case LengthAttrNum: {
        MediaList* imp = static_cast<MediaList*>(impl());
        return jsNumber(exec, imp->length());
    }
    case ConstructorAttrNum:
        return getConstructor(exec);
    }
    return 0;
}
示例#3
0
static v8::Handle<v8::Value> mediaTextAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
    INC_STATS("DOM.MediaList.mediaText._get");
    MediaList* imp = V8MediaList::toNative(info.Holder());
    return v8StringOrNull(imp->mediaText());
}