Webview RunScript: how to pass a variable to RunScript?

Raphael Stonehorse <[email protected]>
Newsgroups gmane.comp.lib.wxwindows.general
Message-ID <CAKSMiANpdE0n4tbKZdsPowxywfYCBA3X2oRbV8gKxaCuN8FWCg@mail.gmail.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?

-- 
Please read https://www.wxwidgets.org/support/mlhowto.htm before posting.
--- 
You received this message because you are subscribed to the Google Groups "wx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/wx-users/CAKSMiANpdE0n4tbKZdsPowxywfYCBA3X2oRbV8gKxaCuN8FWCg%40mail.gmail.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.