markdown-embed
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
// excerpted from Glance Docs
For iframes to appear in Cobrowse sessions, each Iframe must also include a Glance script tag.
// TODO: excerpt relevant part of Glance script here
<script
id="glance-cobrowse"
charset="UTF-8"
type="text/javascript"
...
/></script>
There are exceptions to that rule:
- The iframe is dynamically built using JavaScript
- The hostname and protocol of the iframe match the parent. For example, the parent is at https://www.mycompany.com, and the iframe is also at https://www.mycompany.com.
<script
<!-- TODO: add code here -->
...
/></script>
In these cases, Glance is able to automatically include the iframe in the Cobrowse session.
The game on this page is in an iframe, and the src of the iframe is on another subdomain. The game appears during Cobrowse because Glance's javascript is in this page, and also in the code of that external iframe src; e.g.,
// TODO: excerpt relevant part of Glance script here
<script
id="glance-cobrowse"
charset="UTF-8"
type="text/javascript"
...
/></script>
Get started with a template: