[SOLVED] Javascript events (i.e. Neos.PageLoaded) for the react UI

The old UI supports a JavaScript event Neos.PageLoaded, which could be used like this:

document.addEventListener('Neos.PageLoaded', function(event) {
    // Do stuff
}, false);

Is there something similar for the new react UI?

Hey @leif,

I asked (nearly) the same question in Reload document when adding content childnodes. Possible?
and got some nice Feedback there.
There is also a ticket related to this topic https://github.com/neos/neos-ui/issues/754 .

Hi Peter,

thanks for your feedback.
I will keep an eye on the github issue.

Hi @leif!
'Neos.PageLoaded' should be obsolete now in the new UI, you can just listen for DOMContentLoaded within the iframe:

document.addEventListener("DOMContentLoaded", function(event) {
    console.log("DOM fully loaded and parsed");
  });

We may still implement a few other events, but not yet 100% sure if it’s needed, since we have a very powerful UI extensibillity layer now.

Hi Dmitri,

as for PageLoaded this seems fine, but my use case requires me to initialize a Javascript based slider, after changing a property on the slide node.

Is there another event for this use case?

If there is no event available, you could add reloadIfChanged: TRUE to your property for now. Had the same problem for the slick slider.

Hi Rene,

thanks, that will do.

I did not know about reloadPageIfChanged, only about reloadIfChanged, which works in my case.