How to skip Shadow DOM (and use Light DOM) instead of Polymer templates
1 answer
You can force the template of a Polymer element into the Light DOM by overriding parseDeclaration
JS / Coffeescript in your declaration Polymer()
.
Coffeescript example:
Polymer "my-element",
parseDeclaration: (elementElement) ->
@lightFromTemplate(@fetchTemplate(elementElement))
Of course, you have to be careful, because if you have something that belongs to the shadow DOM (like a stylesheet) in your template, it will now be in the Light DOM.
Edit: if there is a better way to do this, please let me know.
+3
source to share