That will work for html-elements, but not for script-tags, I’m afraid. They are already executed when the message comes in and you cannot actively change script tags using onmessage().
But there is a solution: write an _use http-function, create all the html/head/script/body tags you need and return them. In html-component, use no code, just the url, which you set to domainname/http-functionname.
1 Like