0
votes

Tried using both frames and iframes.

On local host: frameset.html:

<iframe src=a.html name="a" width="200" height="200" align="right"></iframe>
<iframe src=b.html name="b" width="200" height="200" align="left"></iframe>

b.html has a link that opens up the Google Web App, https://script.google.com/macros/s/a-web-app-id/dev, in a pop-up (I'd use an iframe, however apps-script web apps are only capable of running in their own tab/window).

The web app, running as an htmlservice in IFRAME mode has this link:

<a target='a' 
href="https://script.google.com/d/some-script-id/edit?usp=drive_web">
where does this same origin link open?</a>

Rather than the link being opened in the frame a of frameset.html, it opens in a new tab each time it is clicked (so N clicks, N tabs open). When I set b.html to open a local pop-up (c.html) with the same link above, it works fine however.

Console log in the apps script popup:

https://script.google.com/macros/s/a-web-app-id/dev 
Failed to load resource: net::ERR_CACHE_MISS

https://some_string-script.googleusercontent.com/userCodeAppPanel
Failed to load resource: net::ERR_CACHE_MISS
1

1 Answers

0
votes

GAS will complain when running in IFRAME Sandbox mode as all GAS webapps run under https. It has occasion to freak out about calling an unsecure http scope within the same window scope.

Check the console if you see something along the lines of this:

Mixed Content: The page at https://www.example.com/secure/checkout.aspx was loaded over HTTPS, but requested an insecure stylesheet http://www.example.com/CSS/all.min.css?v=2. This request has been blocked; the content must be served over HTTPS.