Having issue with running onready script in published site!

Yeah, I read the article. After doing what you recommend it the article, it stopped working even in the preview mode:

html1:

... function ready(){ window.parent.postMessage({"type":"ready"}, "*"); } ...

page code:
$w(“#dataset1”).onReady( () => {

$w(“#html1”).onMessage((event) => {
console.log(event)
$w(“#html1”).postMessage([CTypesCount.length].concat(CTypesCount).concat(CTypes).join())
});

I don’t even see the event message in the console.