dart-lang/route — pull request #28 by nikgraf (2013-04-29 23:43:38+00:00)
Title: Routing on page load

A proposal to fix the issue of Browsers behave differently on page load. If you start listening with a router in Chrome this will fire a handler on page load. In Firefox it doesn't.

`Browsers tend to handle the popstate event differently on page load. Chrome and Safari always emit a popstate event on page load, but Firefox doesn't.` see https://developer.mozilla.org/en-US/docs/DOM/window.onpopstate

To create a consistent behavior I copied the concept of Backbone's routing. Backbone routes by default when you starting the history. see https://github.com/documentcloud/backbone/blob/master/backbone.js#L1417
We also could iplement a silent option to prevent routing on app start.

Further Changes:
* Added a couple more tests.
* Listen returns a bool which indicates if an UrlPattern matched on page load.