Can I call js after stream rendered?

After a stream content is appended, I want a javascript function to be called to do something to the content. Is there any way to do that?