Apply suggestions from code review
Co-authored-by: VZ <vz-github@zeitlins.org>
This commit is contained in:
@@ -156,7 +156,7 @@ public:
|
||||
bool m_creating;
|
||||
|
||||
#if wxUSE_WEBVIEW_WEBKIT2
|
||||
// This methods needs to be public to make it callable from a callback
|
||||
// This method needs to be public to make it callable from a callback
|
||||
void ProcessJavaScriptResult(GAsyncResult *res, wxWebKitRunScriptParams* params) const;
|
||||
#endif
|
||||
|
||||
|
@@ -24,7 +24,8 @@
|
||||
class wxJSScriptWrapper
|
||||
{
|
||||
public:
|
||||
enum OutputType {
|
||||
enum OutputType
|
||||
{
|
||||
JS_OUTPUT_STRING, // All return types are converted to a string
|
||||
JS_OUTPUT_WEBKIT, // Some return types will be processed
|
||||
JS_OUTPUT_IE, // Most return types will be processed
|
||||
|
@@ -228,7 +228,7 @@ wxString wxWebView::GetUserAgent() const
|
||||
bool wxWebView::RunScript(const wxString& javascript, wxString* output) const
|
||||
{
|
||||
m_syncScriptResult = -1;
|
||||
m_syncScriptOutput.Clear();
|
||||
m_syncScriptOutput.clear();
|
||||
RunScriptAsync(javascript, (void*)this);
|
||||
|
||||
// Wait for script exection
|
||||
@@ -249,7 +249,7 @@ void wxWebView::RunScriptAsync(const wxString& WXUNUSED(javascript),
|
||||
void wxWebView::SendScriptResult(void* clientData, bool success,
|
||||
const wxString& output) const
|
||||
{
|
||||
// If currently running sync RunScript() don't send an event, but use
|
||||
// If currently running sync RunScript(), don't send an event, but use
|
||||
// the scripts result directly
|
||||
if (m_syncScriptResult == -1)
|
||||
{
|
||||
|
Reference in New Issue
Block a user