Skip to content
This repository has been archived by the owner on Dec 19, 2017. It is now read-only.

iron-localstorage event #112

Closed
terrywarwar opened this issue Dec 16, 2015 · 2 comments
Closed

iron-localstorage event #112

terrywarwar opened this issue Dec 16, 2015 · 2 comments

Comments

@terrywarwar
Copy link

I have the following listener which fires when I modify localstorage manually. However when the localstorage is modified using a declared <iron-localstorage></ron-localstorage> element the listener is not triggered.

ready() {
    window.onStorage.listen((e){
      print(e.key);
    });
  }
@terrywarwar
Copy link
Author

Came across this http://stackoverflow.com/questions/4679023/bug-with-chromes-localstorage-implementation answer. I tried it in another tab and the handler gets triggered in the other windows. Any suggestions, should I use the fire() to trigger in the active window, or localStorage.setItem()?

@terrywarwar
Copy link
Author

This is what I wanted to use, it looks like it maybe an enhancement PolymerElements/iron-localstorage#19.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant