JSValue jsXMLHttpRequestResponseXML(ExecState* exec, const Identifier&, const PropertySlot& slot) { JSXMLHttpRequest* castedThis = static_cast<JSXMLHttpRequest*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); XMLHttpRequest* imp = static_cast<XMLHttpRequest*>(castedThis->impl()); return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->responseXML())); }
JSValue jsXMLHttpRequestWithCredentials(ExecState* exec, const Identifier&, const PropertySlot& slot) { JSXMLHttpRequest* castedThis = static_cast<JSXMLHttpRequest*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); XMLHttpRequest* imp = static_cast<XMLHttpRequest*>(castedThis->impl()); return jsBoolean(imp->withCredentials()); }
JSValue jsXMLHttpRequestStatusText(ExecState* exec, const Identifier&, const PropertySlot& slot) { JSXMLHttpRequest* castedThis = static_cast<JSXMLHttpRequest*>(asObject(slot.slotBase())); ExceptionCode ec = 0; XMLHttpRequest* imp = static_cast<XMLHttpRequest*>(castedThis->impl()); JSC::JSValue result = jsString(exec, imp->statusText(ec)); setDOMException(exec, ec); return result; }
JSValue* jsXMLHttpRequestPrototypeFunctionAbort(ExecState* exec, JSObject*, JSValue* thisValue, const ArgList& args) { if (!thisValue->isObject(&JSXMLHttpRequest::s_info)) return throwError(exec, TypeError); JSXMLHttpRequest* castedThisObj = static_cast<JSXMLHttpRequest*>(thisValue); XMLHttpRequest* imp = static_cast<XMLHttpRequest*>(castedThisObj->impl()); imp->abort(); return jsUndefined(); }
JSValue JSC_HOST_CALL jsXMLHttpRequestPrototypeFunctionAbort(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) { UNUSED_PARAM(args); if (!thisValue.inherits(&JSXMLHttpRequest::s_info)) return throwError(exec, TypeError); JSXMLHttpRequest* castedThisObj = static_cast<JSXMLHttpRequest*>(asObject(thisValue)); XMLHttpRequest* imp = static_cast<XMLHttpRequest*>(castedThisObj->impl()); imp->abort(); return jsUndefined(); }
JSValue jsXMLHttpRequestOnreadystatechange(ExecState* exec, const Identifier&, const PropertySlot& slot) { JSXMLHttpRequest* castedThis = static_cast<JSXMLHttpRequest*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); XMLHttpRequest* imp = static_cast<XMLHttpRequest*>(castedThis->impl()); if (EventListener* listener = imp->onreadystatechange()) { if (JSObject* jsFunction = listener->jsFunction(imp->scriptExecutionContext())) return jsFunction; } return jsNull(); }
JSValue* jsXMLHttpRequestPrototypeFunctionGetAllResponseHeaders(ExecState* exec, JSObject*, JSValue* thisValue, const ArgList& args) { if (!thisValue->isObject(&JSXMLHttpRequest::s_info)) return throwError(exec, TypeError); JSXMLHttpRequest* castedThisObj = static_cast<JSXMLHttpRequest*>(thisValue); XMLHttpRequest* imp = static_cast<XMLHttpRequest*>(castedThisObj->impl()); ExceptionCode ec = 0; KJS::JSValue* result = jsStringOrUndefined(exec, imp->getAllResponseHeaders(ec)); setDOMException(exec, ec); return result; }
JSValue JSC_HOST_CALL jsXMLHttpRequestPrototypeFunctionGetAllResponseHeaders(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) { UNUSED_PARAM(args); if (!thisValue.inherits(&JSXMLHttpRequest::s_info)) return throwError(exec, TypeError); JSXMLHttpRequest* castedThisObj = static_cast<JSXMLHttpRequest*>(asObject(thisValue)); XMLHttpRequest* imp = static_cast<XMLHttpRequest*>(castedThisObj->impl()); ExceptionCode ec = 0; JSC::JSValue result = jsStringOrUndefined(exec, imp->getAllResponseHeaders(ec)); setDOMException(exec, ec); return result; }
JSValue JSC_HOST_CALL jsXMLHttpRequestPrototypeFunctionDispatchEvent(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) { UNUSED_PARAM(args); if (!thisValue.inherits(&JSXMLHttpRequest::s_info)) return throwError(exec, TypeError); JSXMLHttpRequest* castedThisObj = static_cast<JSXMLHttpRequest*>(asObject(thisValue)); XMLHttpRequest* imp = static_cast<XMLHttpRequest*>(castedThisObj->impl()); ExceptionCode ec = 0; Event* evt = toEvent(args.at(0)); JSC::JSValue result = jsBoolean(imp->dispatchEvent(evt, ec)); setDOMException(exec, ec); return result; }
JSValue jsXMLHttpRequestReadyState(ExecState* exec, const Identifier&, const PropertySlot& slot) { JSXMLHttpRequest* castedThis = static_cast<JSXMLHttpRequest*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); XMLHttpRequest* imp = static_cast<XMLHttpRequest*>(castedThis->impl()); return jsNumber(exec, imp->readyState()); }