const iframe = document.createElement('iframe'); iframe.allow = 'camera;microphone'; iframe.frameBorder = '0'; iframe.style = "flex: 1"; // TODO(mattSoulanille): Send a url instead of data // Reencode the JSON to remove whitespace const response = await fetch('visualblocks_graph.json'); const json = await response.json(); const jsonString = JSON.stringify(json); const encodedJson = encodeURI(jsonString); iframe.src = `https://visualblocks.withgoogle.com/#/edit/_?project=${encodedJson}`; document.getElementById("visualblocksContainer").appendChild(iframe);