I am trying to design a mobile first web app using Google Apps Script.
I would try to replicate the most basic Bootstrap page (http://getbootstrap.com/examples/navbar) in a Google Apps Script.
This is the way the bootstrap page should render on my mobile device:
but instead my page loads like this:
This is my code.gs:
function doGet() { return HtmlService .createTemplateFromFile('index') .evaluate() .setSandboxMode(HtmlService.SandboxMode.NATIVE); }
My index.html is copied and pasted from http://getbootstrap.com/examples/navbar with CDNs replaced as appropriate.
I figured HtmlService.SandboxMode.NATIVE was important to get this to work but doesn't seem to work.
UPDATE 1 - (THANKS FOR YOUR RESPONSES!)
in IFRAME:
IFRAME console errors (2):
NATIVE console errors (lots):
Bottom line - clearly GAS is not liking it and doesn't seem super straight forward - I've ended up turning the GAS into an API which returns JSONP from the spreadsheet I need - much more straight forward.
Apparently Google can't load Bootstrap from their server, try copying everything to GAS and include in the page as explained in best practices. Also switch back to IFRAME when testing.