Exemplo n.º 1
0
void JSHTMLLegendElement::putValueProperty(ExecState* exec, int token, JSValue* value)
{
    switch (token) {
    case AccessKeyAttrNum: {
        HTMLLegendElement* imp = static_cast<HTMLLegendElement*>(impl());
        imp->setAccessKey(valueToStringWithNullCheck(exec, value));
        break;
    }
    case AlignAttrNum: {
        HTMLLegendElement* imp = static_cast<HTMLLegendElement*>(impl());
        imp->setAlign(valueToStringWithNullCheck(exec, value));
        break;
    }
    }
}
JSValue* JSHTMLLegendElementPrototypeFunction::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args)
{
    if (!thisObj->inherits(&JSHTMLLegendElement::info))
      return throwError(exec, TypeError);

    HTMLLegendElement* imp = static_cast<HTMLLegendElement*>(static_cast<JSHTMLLegendElement*>(thisObj)->impl());

    switch (id) {
    case JSHTMLLegendElement::FocusFuncNum: {

        imp->focus();
        return jsUndefined();
    }
    }
    return 0;
}
Exemplo n.º 3
0
JSValue* JSHTMLLegendElement::getValueProperty(ExecState* exec, int token) const
{
    switch (token) {
    case FormAttrNum: {
        HTMLLegendElement* imp = static_cast<HTMLLegendElement*>(impl());
        return toJS(exec, WTF::getPtr(imp->form()));
    }
    case AccessKeyAttrNum: {
        HTMLLegendElement* imp = static_cast<HTMLLegendElement*>(impl());
        return jsString(exec, imp->accessKey());
    }
    case AlignAttrNum: {
        HTMLLegendElement* imp = static_cast<HTMLLegendElement*>(impl());
        return jsString(exec, imp->align());
    }
    case ConstructorAttrNum:
        return getConstructor(exec);
    }
    return 0;
}
Exemplo n.º 4
0
void setJSHTMLLegendElementAlign(ExecState* exec, JSObject* thisObject, JSValue value)
{
    HTMLLegendElement* imp = static_cast<HTMLLegendElement*>(static_cast<JSHTMLLegendElement*>(thisObject)->impl());
    imp->setAlign(valueToStringWithNullCheck(exec, value));
}