예제 #1
0
 static void mediaAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) {
   INC_STATS("DOM.HTMLSourceElement.media._set");
   HTMLSourceElement* imp = V8HTMLSourceElement::toNative(info.Holder());
   V8Parameter<> v = value;
   imp->setMedia(v);
   return;
 }
static void mediaAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
    HTMLSourceElement* imp = V8HTMLSourceElement::toNative(info.Holder());
    V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value);
    imp->setMedia(v);
    return;
}
예제 #3
0
void JSHTMLSourceElement::putValueProperty(ExecState* exec, int token, JSValue* value)
{
    switch (token) {
    case SrcAttrNum: {
        HTMLSourceElement* imp = static_cast<HTMLSourceElement*>(impl());
        imp->setSrc(value->toString(exec));
        break;
    }
    case TypeAttrNum: {
        HTMLSourceElement* imp = static_cast<HTMLSourceElement*>(impl());
        imp->setType(value->toString(exec));
        break;
    }
    case MediaAttrNum: {
        HTMLSourceElement* imp = static_cast<HTMLSourceElement*>(impl());
        imp->setMedia(value->toString(exec));
        break;
    }
    }
}
void setJSHTMLSourceElementMedia(ExecState* exec, JSObject* thisObject, JSValue value)
{
    JSHTMLSourceElement* castedThisObj = static_cast<JSHTMLSourceElement*>(thisObject);
    HTMLSourceElement* imp = static_cast<HTMLSourceElement*>(castedThisObj->impl());
    imp->setMedia(value.toString(exec));
}