Neovici/cosmoz-router

Extra route appended if running in Shadow DOM mode, breaks the router.

Closed this issue · 1 comments

Using Polymer 1.1.5. I have the following snippet:

        <cosmoz-page-router id="router">
          <cosmoz-page-route path="/" import="_home.html" template-id="home"></cosmoz-page-route>
          <cosmoz-page-route path="/settings" import="_settings.html" template-id="settings"></cosmoz-page-route>
        </cosmoz-page-router>

Under "Shady DOM", the live DOM tree is this:

screenshot from 2015-10-17 22 11 01

However, if I instead tell Polymer to use the real shadow DOM, the live tree becomes:

screenshot from 2015-10-17 22 15 02

Note the third route at the bottom of the router tag. This causes the template .html to 404 and routing to break (or presumably a different route would be loaded if /.html did in fact exist and was a valid template).

Hi Filip,

Thanks for reporting this issue.

It was caused by some direct DOM manipulation we forgot to migrate to new Polymer.dom API.

This is fixed in version 0.1.8

Pascal