dalekjs / dalek-internal-actions

[unmaintained] DalekJS internal module for browser actions
6 stars 0 forks source link

Execute code before DOM ready #14

Closed adrianmiu closed 4 years ago

adrianmiu commented 10 years ago

I have tried to test this Backbone TodoMVC app. While the test are fine in Chrome, on PhantomJS the localStorage is preserved and the tests fail. I have to open a page, clear the localStorage and open it again (for some reason reload() was not enough).

This is related to a larger issue. How can we set an initial state of the browser (eg: localstorage, cookies)?

asciidisco commented 10 years ago

Yeah that is actually a bigger issue in terms of cross browser compatibility; the spec isn't clear on that (except that the impl. of reload() is correct, if a user reloads your page using the reload button of its browser, the localstorage & cookies persist).

I will track this as an enhancement & a bug - it is kinda both & start writing down thoughts here in this issue.