7 ms·
Why reach for iFrames over other technology like WebWorkers?
by xori 2y ago
Why reach for iFrames over other technology like WebWorkers?
- ashubham 2y agoWebWorkers do not have access to DOM.
- xori 2y agoI understand, but things like https://github.com/GoogleChromeLabs/comlink https://github.com/GoogleChromeLabs/comlink enable it. Similar to how iFrames don't have access to their parent page you need a facilitator. My question is why not use a js facilitator that could work in all browsers, rather than just Chrome. I find it an interesting choice that the author decided to invest in new iFrame technology rather than existing multi-thread technology in the browser.
- ashubham 2y agoI don't think Comlink supports DOM as well. It's just syntax sugar over Web workers making them easier to use rather than providing new functionality over them.
- SahAssar 2y agoThat's part of the FAQ?
- xori 2y agoI see it now, I don't know how I missed it.