You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Download the repo and checkout the branch ironLocalStorageIssue
Run bower install
Run polymer serve
Open a browser tab in Chrome and open dev tools
Go to Application tab in dev tools and clear the local storage
Go to dev console and refresh the browser.
the expected console message ******received iron-localstorage-load event***** is not printed
Go to the source code, element-parent.html and comment out line 21 and 23 (i.e. remove the async call)
Repeat steps 4 - 6.
the console message ******received iron-localstorage-load event***** is printed in the console.
Please note that the async call in ready function is just to duplicate the issue encountered and not an actual use case. In my actual use case, I have an ajax call, that when successful, triggers a callback that sets the local storage.
Browsers Affected
[* ] Chrome
[ *] Firefox
[ *] Safari 10
The text was updated successfully, but these errors were encountered:
Description
iron-localstorage-load event is not fired when local storage is set in an async callback.
Expected outcome
iron-localstorage-load should be fired whenever local storage is set
Actual outcome
iron-localstorage-load event is never fired if localstorage is initially empty
Live Demo
https://github.com/johnlim/polymer-starter-kit/tree/ironLocalStorageIssue
Steps to reproduce
******received iron-localstorage-load event*****
is not printed******received iron-localstorage-load event*****
is printed in the console.Please note that the async call in ready function is just to duplicate the issue encountered and not an actual use case. In my actual use case, I have an ajax call, that when successful, triggers a callback that sets the local storage.
Browsers Affected
The text was updated successfully, but these errors were encountered: