AnsweredAssumed Answered

pass window.postMessage data to widgets

Question asked by xiaoqing.ge on Jan 12, 2016
Latest reply on Jan 13, 2016 by xiaoqing.ge

Hi Everyone,

 

I have a jsp page which will send info by the postMessage function.

eg:

     window.postMessage(object, webappbuilderAppURL);

 

Then I am able to retrieved it by the following lines.

eg:

     window.addEventListener("message", onMessageReceived, false);

     function onMessageReceived(aEvent) {}

 

but it ONLY works inside the index.html page.

 

The question I have is, how can I pass the "object' to my widget?

 

is there any functions like publishData/onReceiveData/fetchDataByName in the widgets from the index.html page?

 

 

Thanks!

Outcomes