Exemplo n.º 1
0
JSValue jsHTMLScriptElementType(ExecState* exec, const Identifier&, const PropertySlot& slot)
{
    JSHTMLScriptElement* castedThis = static_cast<JSHTMLScriptElement*>(asObject(slot.slotBase()));
    UNUSED_PARAM(exec);
    HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(castedThis->impl());
    return jsString(exec, imp->type());
}
Exemplo n.º 2
0
void JSHTMLScriptElement::putValueProperty(ExecState* exec, int token, JSValue* value)
{
    switch (token) {
    case TextAttrNum: {
        HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(impl());
        imp->setText(valueToStringWithNullCheck(exec, value));
        break;
    }
    case HtmlForAttrNum: {
        HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(impl());
        imp->setHtmlFor(valueToStringWithNullCheck(exec, value));
        break;
    }
    case EventAttrNum: {
        HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(impl());
        imp->setEvent(valueToStringWithNullCheck(exec, value));
        break;
    }
    case CharsetAttrNum: {
        HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(impl());
        imp->setCharset(valueToStringWithNullCheck(exec, value));
        break;
    }
    case DeferAttrNum: {
        HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(impl());
        imp->setDefer(value->toBoolean(exec));
        break;
    }
    case SrcAttrNum: {
        HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(impl());
        imp->setSrc(valueToStringWithNullCheck(exec, value));
        break;
    }
    case TypeAttrNum: {
        HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(impl());
        imp->setType(valueToStringWithNullCheck(exec, value));
        break;
    }
    }
}
Exemplo n.º 3
0
JSValue* JSHTMLScriptElement::getValueProperty(ExecState* exec, int token) const
{
    switch (token) {
    case TextAttrNum: {
        HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(impl());
        return jsString(exec, imp->text());
    }
    case HtmlForAttrNum: {
        HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(impl());
        return jsString(exec, imp->htmlFor());
    }
    case EventAttrNum: {
        HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(impl());
        return jsString(exec, imp->event());
    }
    case CharsetAttrNum: {
        HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(impl());
        return jsString(exec, imp->charset());
    }
    case DeferAttrNum: {
        HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(impl());
        return jsBoolean(imp->defer());
    }
    case SrcAttrNum: {
        HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(impl());
        return jsString(exec, imp->src());
    }
    case TypeAttrNum: {
        HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(impl());
        return jsString(exec, imp->type());
    }
    case ConstructorAttrNum:
        return getConstructor(exec);
    }
    return 0;
}
Exemplo n.º 4
0
void setJSHTMLScriptElementType(ExecState* exec, JSObject* thisObject, JSValue value)
{
    HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(static_cast<JSHTMLScriptElement*>(thisObject)->impl());
    imp->setType(valueToStringWithNullCheck(exec, value));
}
Exemplo n.º 5
0
void setJSHTMLScriptElementDefer(ExecState* exec, JSObject* thisObject, JSValue value)
{
    HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(static_cast<JSHTMLScriptElement*>(thisObject)->impl());
    imp->setDefer(value.toBoolean(exec));
}
Exemplo n.º 6
0
JSValue jsHTMLScriptElementSrc(ExecState* exec, const Identifier&, const PropertySlot& slot)
{
    UNUSED_PARAM(exec);
    HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(static_cast<JSHTMLScriptElement*>(asObject(slot.slotBase()))->impl());
    return jsString(exec, imp->src());
}
Exemplo n.º 7
0
JSValue jsHTMLScriptElementDefer(ExecState* exec, const Identifier&, const PropertySlot& slot)
{
    UNUSED_PARAM(exec);
    HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(static_cast<JSHTMLScriptElement*>(asObject(slot.slotBase()))->impl());
    return jsBoolean(imp->defer());
}