Hi
when listen data-changed from app-localstorage-document, it is not changed data of the tag or event.
IE11/Edge were not set new value to storage at timing of onstorage event.
I checked IE11/Edge on Win10, set break point to this line, this.data is not changed.
I solved my environment followings:
this.listen(window, 'storage', '_dataChanged');
_dataChanged: function(event) {
if (event && event.newValue) {
// Only IE11 set newValue as String, should parse to JSON
var value = (typeof event.newValue === 'string') ? JSON.parse(event.newValue) : event.newValue;
....
}
},
Description
Hi when listen
data-changed
fromapp-localstorage-document
, it is not changed data of the tag or event.IE11/Edge were not set new value to storage at timing of
onstorage
event.I checked IE11/Edge on Win10, set break point to this line,
this.data
is not changed.I solved my environment followings:
New value is able to get from
event.newValue
. see https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onstorageExpected outcome
when
data-changed
, be able to get changed value fromapp-localstorage-document.data
orevent.detail.value
.Actual outcome
IE/Edge catch event
data-changed
, butapp-localstorage-document.data
orevent.detail.value
is not changed.Browsers Affected