I have a problem with launching Backbone.history.start after router initialization:
$(document).ready(function () {
app = new StyleRouter();
Backbone.history.start({pushState: true, root: '/'});
});
It worked at start, but then I gave HTML code to another guy to rework it (he doesn't know, what special he did) and after that it causes "Uncaught Error: SecurityError: DOM Exception 18" in Chrome, especially on line:
this.history.replaceState({}, document.title, this.root + this.fragment + loc.search);
in backbone.js.
Deep research and comparing with older code get nothing. What could it be?
Finally I found that there was a js code, that added an excess slash in location.hash. Still curious why it causes security error.