achellies at 163.com
Mon Jun 20 06:36:20 PDT 2011
you can call as the following:
bool returnFlag = false;
WebCore::Frame* pMainFrame = GetFrame();//Note 10/19/10 - abaldeva - We need to investigate if we should get the focus Or MainFrame here.
WebCore::ScriptController* pProxy = pMainFrame->script();
const WebCore::String sFileName;
const int baseLine = 1;
const WebCore::String sScriptSource(pScriptSource, length);
KJS::JSValue* pValue = pProxy->evaluate(sFileName, baseLine, sScriptSource);
// we need the exec only because JSArray::get requires the exec state. This could potentially be removed.
ExecState* exec = pProxy->windowShell()->window()->globalExec();
// 7/27/10 CSidhall So this is a small API change, we now return true if a non zero pValue was found versus previously where
// we only returned true if pValue was non zero and a pReturnValue was set by the user. This was suggested by Chin Yee Cheng.
// So any return with a non NULL pValue is a success. (It is unclear if there could be some special
// exceptions to this in case of with "Break" or "Continue" internal JS completion codes but we consider those as fails for now).
returnFlag = true;
// No valid return so leave the returnValue to undefined
// We could consider only updating the layout in case only of a pValue return
WebCore::FrameView* const pMainFrameView = GetFrameView();
At 2011-06-20，"Vicky Tux" <ssseintr2 at gmail.com> wrote:
Thanks & Regards,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the webkit-help