JSValue jsProgressEventLoaded(ExecState* exec, JSValue slotBase, const Identifier&) { JSProgressEvent* castedThis = static_cast<JSProgressEvent*>(asObject(slotBase)); UNUSED_PARAM(exec); ProgressEvent* imp = static_cast<ProgressEvent*>(castedThis->impl()); JSValue result = jsNumber(imp->loaded()); return result; }
JSValue* JSProgressEvent::getValueProperty(ExecState* exec, int token) const { switch (token) { case LengthComputableAttrNum: { ProgressEvent* imp = static_cast<ProgressEvent*>(impl()); return jsBoolean(imp->lengthComputable()); } case LoadedAttrNum: { ProgressEvent* imp = static_cast<ProgressEvent*>(impl()); return jsNumber(exec, imp->loaded()); } case TotalAttrNum: { ProgressEvent* imp = static_cast<ProgressEvent*>(impl()); return jsNumber(exec, imp->total()); } case ConstructorAttrNum: return getConstructor(exec); } return 0; }