I've made a web app in GAS which is 400 pixels wide. I'd like this to zoom to fill the screen of a mobile device when loaded, rather than only filling half the screen (still using a fixed pixel width though).
I've tried using the viewport code below with no luck.
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=2.0, user-scalable=yes" />
This was address by Google in recent months and functionality was added, use the .addMetaTag() method.
Example:
<meta name="google-site-verification" content="..."/>
<meta name="viewport" content="..."/>
var output = HtmlService.createHtmlOutput('<b>Hello, world!</b>');
output.addMetaTag('viewport', 'width=device-width, initial-scale=1');
Documentation on the method https://developers.google.com/apps-script/reference/html/html-output#addmetatagname-content
Related Forum https://code.google.com/p/google-apps-script-issues/issues/detail?id=4659
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With