Hacker News new | ask | show | jobs
by xori 703 days ago
Why reach for iFrames over other technology like WebWorkers?
2 comments

WebWorkers do not have access to DOM.
I understand, but things like 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.

I 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.
That's part of the FAQ?
I see it now, I don't know how I missed it.