securityos/node_modules/comlink/tests/fixtures/two-way-iframe.html

11 lines
306 B
HTML

<script type="module">
import * as Comlink from "/base/dist/esm/comlink.mjs";
const parentEndpoint = Comlink.windowEndpoint(self.parent);
const wrappedParent = Comlink.wrap(parentEndpoint);
Comlink.expose(async (a, b) => {
return a + (await wrappedParent(b));
}, parentEndpoint);
</script>