Hello,
I have a dynamic page with an HTML widget, whose part of the code gets updated by a postMessage() approach when the dynamic dataset is ready. It works as expected, but everytime I move on to the next/previous dynamic item, I get the error:
“Error: [Platform] rejected handling messages from stale contexts”.
This error appears around 40 times everytime I change the dynamic item, and then the page finally updates the HTML widget.
Any help is greatly appreciated.
Page’s code:
$w.onReady( function () {
$w(‘#dynamicDataset’).onReady( function () {
let currItem = $w(‘#dynamicDataset’).getCurrentItem();
$w(‘#html1’).postMessage(currItem.subtitle)
});
});
HTML widget’s code:
I’ve tried waiting for the HTML to send a message to the page once it’s loaded, and only then send the HTML widget back a message to update its content, but I still get the same error.
Thanks.