Running js script from principle demo

hello, I was wondering if it’s possible to run a small JS script for emitting a massage to a web page that is running a principle demo.

thanks!