Example #1
0
JSValue* JSCSSRuleList::getValueProperty(ExecState* exec, int token) const
{
    switch (token) {
    case LengthAttrNum: {
        CSSRuleList* imp = static_cast<CSSRuleList*>(impl());
        return jsNumber(exec, imp->length());
    }
    case ConstructorAttrNum:
        return getConstructor(exec);
    }
    return 0;
}
Example #2
0
 static v8::Handle<v8::Value> lengthAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) {
   INC_STATS("DOM.CSSRuleList.length._get");
   CSSRuleList* imp = V8CSSRuleList::toNative(info.Holder());
   return v8::Integer::NewFromUnsigned(imp->length());
 }