void JSXMLHttpRequestUpload::setOnabort(ExecState* exec, JSValue* value) { XMLHttpRequest* xmlHttpRequest = impl()->associatedXMLHttpRequest(); if (!xmlHttpRequest) return; Document* document = xmlHttpRequest->document(); if (!document) return; Frame* frame = document->frame(); if (!frame) return; impl()->setOnAbortListener(toJSDOMWindow(frame)->findOrCreateJSUnprotectedEventListener(exec, value, true)); }
JSValue* JSXMLHttpRequestUpload::removeEventListener(ExecState* exec, const ArgList& args) { XMLHttpRequest* xmlHttpRequest = impl()->associatedXMLHttpRequest(); if (!xmlHttpRequest) return jsUndefined(); Document* document = xmlHttpRequest->document(); if (!document) return jsUndefined(); Frame* frame = document->frame(); if (!frame) return jsUndefined(); JSUnprotectedEventListener* listener = toJSDOMWindow(frame)->findJSUnprotectedEventListener(exec, args.at(exec, 1), true); if (!listener) return jsUndefined(); impl()->removeEventListener(args.at(exec, 0)->toString(exec), listener, args.at(exec, 2)->toBoolean(exec)); return jsUndefined(); }