Esempio n. 1
0
JSValue* JSHTMLPreElement::getValueProperty(ExecState* exec, int token) const
{
    switch (token) {
    case WidthAttrNum: {
        HTMLPreElement* imp = static_cast<HTMLPreElement*>(impl());
        return jsNumber(exec, imp->width());
    }
    case WrapAttrNum: {
        HTMLPreElement* imp = static_cast<HTMLPreElement*>(impl());
        return jsBoolean(imp->wrap());
    }
    case ConstructorAttrNum:
        return getConstructor(exec);
    }
    return 0;
}
Esempio n. 2
0
 static v8::Handle<v8::Value> wrapAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) {
   INC_STATS("DOM.HTMLPreElement.wrap._get");
   HTMLPreElement* imp = V8HTMLPreElement::toNative(info.Holder());
   return v8Boolean(imp->wrap());
 }