Fix javascript return values
Return values where wrapped by quotes because of wrapper code used for IE compatibility.
This commit is contained in:
@@ -150,6 +150,8 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const wxString& GetUnwrappedOutputCode() { return m_outputVarName; }
|
||||||
|
|
||||||
// Execute the code returned by this function to let the output of the code
|
// Execute the code returned by this function to let the output of the code
|
||||||
// we executed be garbage-collected.
|
// we executed be garbage-collected.
|
||||||
wxString GetCleanUpCode() const
|
wxString GetCleanUpCode() const
|
||||||
|
@@ -795,7 +795,7 @@ bool wxWebViewEdge::RunScript(const wxString& javascript, wxString* output)
|
|||||||
if (RunScriptSync(wrapJS.GetWrappedCode(), &result)
|
if (RunScriptSync(wrapJS.GetWrappedCode(), &result)
|
||||||
&& result == wxS("true"))
|
&& result == wxS("true"))
|
||||||
{
|
{
|
||||||
if (RunScriptSync(wrapJS.GetOutputCode(), &result))
|
if (RunScriptSync(wrapJS.GetUnwrappedOutputCode() + ";", &result))
|
||||||
{
|
{
|
||||||
if (output)
|
if (output)
|
||||||
*output = result;
|
*output = result;
|
||||||
|
Reference in New Issue
Block a user