blob: 8a3873bfde88dd9bd0cc979f3db6a7d88b776d22 [file] [log] [blame]
<!DOCTYPE html>
<script src="sxg-util.js"></script>
<script>
window.addEventListener('message', async (event) => {
try {
const scope = './scope/' + location.href;
await registerServiceWorkerAndWaitUntilActivated(
'./service-worker.js', scope)
const iframe = await withIframe(scope, 'inner_iframe');
event.data.port.postMessage({
location: document.location.href,
is_fallback: false,
err: undefined,
iframe_body: iframe.contentWindow.document.body.innerHTML});
} catch (err) {
event.data.port.postMessage({
location: document.location.href,
is_fallback: false,
err: err.toString()
});
}
}, false);
</script>