Closed bruce closed 4 years ago
Resolves #96.
This PR adds support for pulling in app-route elements via the content tag, collecting them from the ancestor shadow root's host (if any). This supports composition of routers using Polymer, notably.
app-route
A working functional test is provided.
Note that the method of determining the shadow root ancestor (toString) is taken from http://stackoverflow.com/questions/27453617/how-can-i-tell-if-an-element-is-in-a-shadow-dom (due to issues with iframes). It's possible this could also be done with nodeType or checking instanceof if that is not a concern.
toString
nodeType
instanceof
Somewhat related to this: https://github.com/erikringsmuth/app-router/pull/143
Closing as stale.
Resolves #96.
This PR adds support for pulling in
app-route
elements via the content tag, collecting them from the ancestor shadow root's host (if any). This supports composition of routers using Polymer, notably.A working functional test is provided.
Note that the method of determining the shadow root ancestor (
toString
) is taken from http://stackoverflow.com/questions/27453617/how-can-i-tell-if-an-element-is-in-a-shadow-dom (due to issues with iframes). It's possible this could also be done withnodeType
or checkinginstanceof
if that is not a concern.