w3c / webextensions

Charter and administrivia for the WebExtensions Community Group (WECG)
Other
576 stars 50 forks source link

Expose openOrClosedShadowRoot for userscripts #612

Open tophf opened 1 month ago

tophf commented 1 month ago

Currently userscripts can't use elem.openOrClosedShadowRoot (Firefox) and chrome.dom.openOrClosedShadowRoot (Chrome) because it's exposed only in the isolated world.

There's a number of reasons it should be exposed to userscript worlds:

The only con I remember seeing in WECG is that the exposed API for userscripts should be as simple as possible and intentionally limited, but this feature isn't something complicated or privileged, it's rather a trivial DOM feature necessary for userscripts that frequently augment web pages. If anything should be removed, it's chrome.csi and chrome.loadTimes, which seem useless in a userscript.