Groups
Sign in
Groups
wx-users
Conversations
About
Send feedback
Help
Webview RunScript: how to pass a variable to RunScript?
29 views
Skip to first unread message
Raphael Stonehorse
unread,
Feb 2, 2024, 4:58:37 AM
Feb 2
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to wx-u...@googlegroups.com
I would like to pass a variable to RunScript method
With:
wxString txt = "wxWidgets";
RunScript("let txtS = `${txt}`");
I get: Error running JavaScript: ReferenceError: Can't find variable: txt
How to do that?
Raphael Stonehorse
unread,
Feb 2, 2024, 5:23:52 AM
Feb 2
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to wx-u...@googlegroups.com
For whoever would like to know the solution, which has been given by DoubleMax in wxWidgets Forum:
wxString txt = "wxWidgets"; wxString script = "let txtS = '" + txt + "';"; RunScript( script );
Reply all
Reply to author
Forward
0 new messages