3 ms·
I'm surprised how short the source code for this is. I guess it doesn't have to do that much.
by extraduder_ire 3y ago
I'm surprised how short the source code for this is. I guess it doesn't have to do that much.
- danielvaughn 3y agoI haven’t read the source code but I assume it’s just a wrapper about BroadcastChannel.
- devidw 3y agoIt's a combination of chrome.runtime messaging api to establish a connection between the calling tab and the service worker and chrome.scripting api to actually execute on the target tabs. Tho you can only send json and not functions over the port so functions have to be stringified and the eval() on the tab main world. Since eval is not possible in extensions itself for good reason the only way is to do this on the tabs, so the tab filtering will also be done in a tab world and will respond the filtered tab ids back to the service worker.
- test6554 3y agoBrowser makers: creates carefully thought out security features Junior Developers: what’s this do? Probably nothing… yeet