How to correctly listen on post-stream update

Sorry for adding a question to this old topic.

We were using the above mentioned code (decorateCookedElement) to call a short script function when additional posts in a topic are rendered.

With the glimmer post stream this coding is not working correctly. We get the following message in the developer console:

Accessing helper.widget is not supported when using api.decorateCookedElement with the Glimmer Post Stream and can yield unexpected results.

As a result the script function is not executed.

Is there a corresponding functionality we can use for the Glimmer post stream?

Thank you in advance for any information to adjust our coding.