erikringsmuth / app-router

Router for Web Components
https://erikringsmuth.github.io/app-router/
MIT License
610 stars 83 forks source link

Lifecycle events are effectively fired twice #149

Open FLamparski opened 8 years ago

FLamparski commented 8 years ago

Events like activate-route-end are effectively fired twice. app-router dispatches them first on the route, then on itself; the events then propagate up all the way to window. Unless there is a substantial difference between the two events, dispatching the event just on the route should suffice.

jmalonzo commented 8 years ago

Do you have a simple test we can look into where these are triggered twice?

FLamparski commented 8 years ago

I'll try to come up with something, but so far I've noticed that this might be browser-specific (happens in Chrome, in Firefox the events don't seem to propagate up from the elements they've been dispatched on).