0
 var script = document.createElement("script");
 script.type = "text/javascript";
 script.defer = true;
 script.text = "alert(1)";
 document.getElementById("myContent").appendChild(script);

Above code works well separately, but does not work in App Script web app. Does caja plays some role here ?

1 Answer 1

1

Yes caja plays a role. You cannot inject or self modify the js.

Sign up to request clarification or add additional context in comments.

1 Comment

Include as external js like you would do with jquery

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.