Add javascript to rendered html streamfields

I am using streamfields in my wagtail project and I want to add js to rendered templates

I tried like this:

enter image description here

But it does not append to the end of the body like in page templates, any ideia how can i

enter image description here

I have tried this and also StructBlockAdapter but none of that works, StructBlockAdapter only adds JS to backoffice

Back to Top