erikringsmuth / app-router

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

undefined function when using csp version #107

Closed fredtma closed 8 years ago

fredtma commented 9 years ago

I have used app-router with polymer on a web app. Building the chrome app with the chrome dev tool, I need to use the csp version but this fails with the below error. screenshot 2015-03-28 at 03 07 32

fredtma commented 9 years ago

It seems like window.history.pushState && window.history.replaceState are not defined in Chrome Apps and that is what causing the issue. Has any ever encounter this and solved it? screenshot 2015-03-28 at 10 47 53

erikringsmuth commented 9 years ago

Interesting... it looks like Chrome disable window.history altogether. https://developer.chrome.com/apps/app_deprecated

It looks like Backbone.js has the same issue. https://github.com/jashkenas/backbone/issues/3112

Maybe there's a polyfill that'll work around it but I'm not sure.

jmalonzo commented 8 years ago

@fredtma Hi! Were you able to find a workaround for this? I'm not sure how we can replace window.history but if you found a workaround please let us know. Closing this for now.