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

11 lines
306 B
HTML
Raw Normal View History

2024-09-06 15:32:35 +00:00
<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>