Hacker News new | ask | show | jobs
by ameshkov 2308 days ago
Actually, Web Components and Shadow DOM bother me more than Web Assembly. You cannot "pierce" into a shadow DOM from the outside and this creates an impenetrable barrier for content blockers. We've already seen examples of whole web pages transformed into a shadow-dom web component.
3 comments

The more of pages introducing the solution you describe the more chance ad blockers / browsers will pick up the new challenge ;)
Firefox has openOrClosedShadowRoot available to extensions that allows them to bypass closed shadow dom.
> You cannot "pierce" into a shadow DOM from the outside

Why not? You can inject any script into a meta header on document start from an extension or do the same in an intercepting proxy.

Shadow DOM is created dynamically using "attachShadow". You can try overriding Element.prototype.attachShadow, but this is easy to detect.
Well, currently adblocking is already full of such easy to detect overrides, and extension APIs already have plenty of limitations on what they can touch and replace allowing websites to easily bypass most of the overrides, but they do work at the moment and websites don't bother.