Closed TimvdLippe closed 6 years ago
Friendly ping. The Travis failure is due to Selenium failing on Firefox.
This LGTM. @bicknellr to do final review.
This needs some tests, otherwise LGTM.
Added a test and documentation :tada:. I first wanted the feedback on this approach before fully implementing the feature.
I have updated the tests with the new assertions. Instead of asserting on items[0]
, it asserts on undefined
. If an item is not found and there is no fallback selection, the expected behavior is like the old behavior: do not select an item.
@bicknellr Because these events are triggered a lot more, which means that almost all of the time the check is redundant. This is simply a performance win + a more clearer event name to explain the intent.
This PR is very old and I am no longer pursuing this change. Therefore I am closing this PR.
This event can be used in an application element to create a monolithic 404 fallback as a routing method.
An example usage of this event can be found in this diff: https://github.com/TimvdLippe/polymer-lazy-application/compare/monolithic-router?expand=1#diff-8177f8e50fd6fc8e66434f5c76f38d98R45 Here you can listen for the event and based on that handle just one 404 page. This usecase is also described in https://github.com/PolymerElements/app-route/issues/126
cc @rictic