parse5 icon indicating copy to clipboard operation
parse5 copied to clipboard

(NOT READY) Declarative shadow dom

Open Jamesernator opened this issue 3 months ago • 0 comments

This isn't tested yet, but this adds support for declarative shadow roots (closing #1469).

A couple questions for this approach:

  • Is making tree adapters shadow root support optional the preferred approach here?
  • The implementation follows the spec rather literally, which means that we set a shadow root as the .content property of the template being parsed, this entails adding the .setTemplateContentForDeclarativeShadowRootParsing method as unlike .setTemplateContent we don't want implementations to change the shadow root's host to the parsing template (like JSDOM does). Is there some easy way in the parser we could avoid this trick and just put the shadow root on the parsing stack somehow?

Jamesernator avatar Nov 26 '25 02:11 Jamesernator