[webkit-help] help: Standalone javascript having XHR execution with out HTML

guru prasad guru_webkit at in.com
Thu Jul 9 03:19:07 PDT 2009


Hi All,We are using webkit and developing web based application which uses OPENAPI provided by various service provider.We have a javascript as given belowtest.jsfunction createEvent(){xmlhttp = new XMLHttpRequest();xmlhttp.open("GET", url, true);xmlhttp.send(null);alert("xmlhttp end");}function eventCreated(){alert("xmlhttp callback");}As i went through the webkit code and i could execute simple javascript which dosn't have XHR, If XHR is there then result i am getting is "undefined".code.cppJSValueRef CTestScriptAppUi::JSEvaluateScripttestscipt(JSContextRef ctx, JSStringRef script, JSObjectRef thisObject, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception){JSLock lock;ExecState* exec = toJS(ctx);JSObject* jsThisObject = toJS(thisObject);UString::Rep* scriptRep = toJS(script);UString::Rep* sourceURLRep = sourceURL ? toJS(sourceURL) : NULL;// Interpreter::evaluate sets "this" to the global object if it is NULL//evaluate(const UString& sourceURL, int starting
 LineNumber, const UString& code, JSValue* thisV)//JSValue *jsval = new JSValue;Completion completion = exec>dynamicInterpreter()>evaluate(UString(sourceURLRep), startingLineNumber, UString(scriptRep), (JSValue *)jsThisObject);if (completion.complType() == Throw) {if (exception)*exception = toRef(completion.value());return 0;}if (completion.value())return toRef(completion.value());// happens, for example, when the only statement is an empty (';') statementreturn toRef(jsUndefined());}To establish a XHR from javascript we need a document.can any one help us for creating document and handling the above script.Any reference url or classes which i need to use.Thanks in Advance,GuruDear webkithelp! Get Yourself a cool, short @in.com Email ID now!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-help/attachments/20090709/e55eddfb/attachment.html>


More information about the webkit-help mailing list