8

Is there anyway to add meta tags to html header when creating a web app using the ui service on Google app scripts?

1
  • wait, add a meta tag in the google script page itself? Commented Jul 23, 2014 at 9:04

1 Answer 1

5
+50

Quoting from Caja Issue 1632, Meta tag defining viewport not rendered:

Caja is designed to provide guest content a portion of a page, somewhat like an iframe. Therefore, as a general rule, it cannot make declarations which affect the display of the entire page. In order to have this feature you would have to have the host page explicitly permit it in some way.

Since Google uses Caja sanitization for UI and HTML service pages, and wraps the sanitized output as a <div> within its own host page, Google Apps Script would need to explicitly permit setting of the meta tags.

Unfortunately, that isn't supported in the Google Apps Script APIs.

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

2 Comments

This is supported now, as of Dec 2015. ref: plus.google.com/+MarcoColomboMow/posts/GXgRCh98HTu
Thanks, @electronicsguy - I'll update this post... unless you beat me to it with your own answer!

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.