1. HUNG CK
  2. PowerBuilder
  3. Monday, 29 January 2024 09:11 AM UTC

Dear All,

I am using Powerbuilder webBrowser control (webview2), and try to send message via javascript.

according the help, call ``window.webBrowser.postMessage('my message...');``, but not work. 

Call out dev-console by [F12], and find that ``window.webBrowser.postMessage`` is not valid.

 

Please kindly hlep.

Thanks,

 

 

 

Andreas Mykonios Accepted Answer Pending Moderation
  1. Monday, 29 January 2024 13:36 PM UTC
  2. PowerBuilder
  3. # 1

Hi.

While using:

window.webBrowser.postMessage(`Hello`);

fails, using:

window.chrome.webview.postMessage('Hello');

works in my test. In documentation, there is a or... So I'm not sure if both "ways" should work or not.

Andreas.

Comment
  1. HUNG CK
  2. Tuesday, 30 January 2024 02:35 AM UTC
it works. thanks a lot.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.