当前位置: 首页>>代码示例>>C++>>正文


C++ JSXMLHttpRequest类代码示例

本文整理汇总了C++中JSXMLHttpRequest的典型用法代码示例。如果您正苦于以下问题:C++ JSXMLHttpRequest类的具体用法?C++ JSXMLHttpRequest怎么用?C++ JSXMLHttpRequest使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了JSXMLHttpRequest类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: jsXMLHttpRequestPrototypeFunctionDispatchEvent

JSValue* jsXMLHttpRequestPrototypeFunctionDispatchEvent(ExecState* exec, JSObject*, JSValue* thisValue, const ArgList& args)
{
    if (!thisValue->isObject(&JSXMLHttpRequest::s_info))
        return throwError(exec, TypeError);
    JSXMLHttpRequest* castedThisObj = static_cast<JSXMLHttpRequest*>(thisValue);
    return castedThisObj->dispatchEvent(exec, args);
}
开发者ID:lentinic,项目名称:EAWebKit,代码行数:7,代码来源:JSXMLHttpRequest.cpp

示例2: jsXMLHttpRequestResponseXML

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()));
}
开发者ID:Mr-Kumar-Abhishek,项目名称:qt,代码行数:7,代码来源:JSXMLHttpRequest.cpp

示例3: visitChildren

void JSXMLHttpRequest::visitChildren(JSCell* cell, SlotVisitor& visitor)
{
    JSXMLHttpRequest* thisObject = jsCast<JSXMLHttpRequest*>(cell);
    ASSERT_GC_OBJECT_INHERITS(thisObject, info());
    COMPILE_ASSERT(StructureFlags & OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag);
    ASSERT(thisObject->structure()->typeInfo().overridesVisitChildren());
    Base::visitChildren(thisObject, visitor);

    if (XMLHttpRequestUpload* upload = thisObject->m_impl->optionalUpload())
        visitor.addOpaqueRoot(upload);

    if (Document* responseDocument = thisObject->m_impl->optionalResponseXML())
        visitor.addOpaqueRoot(responseDocument);

    if (ArrayBuffer* responseArrayBuffer = thisObject->m_impl->optionalResponseArrayBuffer())
        visitor.addOpaqueRoot(responseArrayBuffer);

    if (Blob* responseBlob = thisObject->m_impl->optionalResponseBlob())
        visitor.addOpaqueRoot(responseBlob);

    if (thisObject->m_response)
        visitor.append(&thisObject->m_response);

    thisObject->m_impl->visitJSEventListeners(visitor);
}
开发者ID:kodybrown,项目名称:webkit,代码行数:25,代码来源:JSXMLHttpRequestCustom.cpp

示例4: jsXMLHttpRequestWithCredentials

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());
}
开发者ID:Mr-Kumar-Abhishek,项目名称:qt,代码行数:7,代码来源:JSXMLHttpRequest.cpp

示例5: jsXMLHttpRequestReadyState

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());
}
开发者ID:Mr-Kumar-Abhishek,项目名称:qt,代码行数:7,代码来源:JSXMLHttpRequest.cpp

示例6: jsXMLHttpRequestPrototypeFunctionRemoveEventListener

JSValue JSC_HOST_CALL jsXMLHttpRequestPrototypeFunctionRemoveEventListener(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));
    return castedThisObj->removeEventListener(exec, args);
}
开发者ID:Mr-Kumar-Abhishek,项目名称:qt,代码行数:8,代码来源:JSXMLHttpRequest.cpp

示例7: jsXMLHttpRequestStatusText

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;
}
开发者ID:Mr-Kumar-Abhishek,项目名称:qt,代码行数:9,代码来源:JSXMLHttpRequest.cpp

示例8: jsXMLHttpRequestPrototypeFunctionAbort

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();
}
开发者ID:lentinic,项目名称:EAWebKit,代码行数:10,代码来源:JSXMLHttpRequest.cpp

示例9: jsXMLHttpRequestPrototypeFunctionAbort

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();
}
开发者ID:Mr-Kumar-Abhishek,项目名称:qt,代码行数:11,代码来源:JSXMLHttpRequest.cpp

示例10: jsXMLHttpRequestOnreadystatechange

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();
}
开发者ID:Mr-Kumar-Abhishek,项目名称:qt,代码行数:11,代码来源:JSXMLHttpRequest.cpp

示例11: jsXMLHttpRequestPrototypeFunctionGetAllResponseHeaders

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;
}
开发者ID:lentinic,项目名称:EAWebKit,代码行数:13,代码来源:JSXMLHttpRequest.cpp

示例12: jsXMLHttpRequestPrototypeFunctionGetAllResponseHeaders

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;
}
开发者ID:Mr-Kumar-Abhishek,项目名称:qt,代码行数:14,代码来源:JSXMLHttpRequest.cpp

示例13: jsXMLHttpRequestPrototypeFunctionDispatchEvent

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;
}
开发者ID:Mr-Kumar-Abhishek,项目名称:qt,代码行数:15,代码来源:JSXMLHttpRequest.cpp

示例14: jsXMLHttpRequestResponseText

JSValue jsXMLHttpRequestResponseText(ExecState* exec, const Identifier&, const PropertySlot& slot)
{
    JSXMLHttpRequest* castedThis = static_cast<JSXMLHttpRequest*>(asObject(slot.slotBase()));
    return castedThis->responseText(exec);
}
开发者ID:Mr-Kumar-Abhishek,项目名称:qt,代码行数:5,代码来源:JSXMLHttpRequest.cpp


注:本文中的JSXMLHttpRequest类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。