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
Using window.localStorage.removeItem within the amp-script worker using any value (even if it doesn’t exist) actually creates an item in local storage with that key and a value that is defined somewhere in AMP environment.
It can be reproduced by having the removeItem code within the amp-script JS that is guaranteed to be executed. The expected behaviour would be for this value to just be deleted.
Added an AMP playground link here. On line 27 I added window.localStorage.removeItem and you can see that the helloworld key to be removed is actually created in localstorage.
Relevant Logs
No response
Browser(s) Affected
Chrome, Firefox, Safari
OS(s) Affected
No response
Device(s) Affected
No response
AMP Version Affected
No response
The text was updated successfully, but these errors were encountered:
Description
Using
window.localStorage.removeItem
within the amp-script worker using any value (even if it doesn’t exist) actually creates an item in local storage with that key and a value that is defined somewhere in AMP environment.It can be reproduced by having the
removeItem
code within the amp-script JS that is guaranteed to be executed. The expected behaviour would be for this value to just be deleted.cc @samouri
Reproduction Steps
Added an AMP playground link here. On line 27 I added
window.localStorage.removeItem
and you can see that thehelloworld
key to be removed is actually created in localstorage.Relevant Logs
No response
Browser(s) Affected
Chrome, Firefox, Safari
OS(s) Affected
No response
Device(s) Affected
No response
AMP Version Affected
No response
The text was updated successfully, but these errors were encountered: