JSValue* jsHTMLMediaElementPrototypeFunctionLoad(ExecState* exec, JSObject*, JSValue* thisValue, const ArgList& args) { if (!thisValue->isObject(&JSHTMLMediaElement::s_info)) return throwError(exec, TypeError); JSHTMLMediaElement* castedThisObj = static_cast<JSHTMLMediaElement*>(thisValue); HTMLMediaElement* imp = static_cast<HTMLMediaElement*>(castedThisObj->impl()); ExceptionCode ec = 0; imp->load(ec); setDOMException(exec, ec); return jsUndefined(); }
EncodedJSValue JSC_HOST_CALL jsHTMLMediaElementPrototypeFunctionLoad(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); if (!thisValue.inherits(&JSHTMLMediaElement::s_info)) return throwVMTypeError(exec); JSHTMLMediaElement* castedThis = static_cast<JSHTMLMediaElement*>(asObject(thisValue)); HTMLMediaElement* imp = static_cast<HTMLMediaElement*>(castedThis->impl()); ExceptionCode ec = 0; imp->load(processingUserGesture(), ec); setDOMException(exec, ec); return JSValue::encode(jsUndefined()); }