Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.removeItem creates arbitrary value from state #38364

Open
AntonioGargaro opened this issue Jul 21, 2022 · 1 comment
Open

.removeItem creates arbitrary value from state #38364

AntonioGargaro opened this issue Jul 21, 2022 · 1 comment

Comments

@AntonioGargaro
Copy link

Description

Issue reported before here.

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 the helloworld key to be removed is actually created in localstorage.

Relevant Logs

No response

Browser(s) Affected

No response

OS(s) Affected

No response

Device(s) Affected

No response

AMP Version Affected

No response

@stale
Copy link

stale bot commented Aug 12, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Stale Inactive for one year or more label Aug 12, 2023
@stale stale bot removed the Stale Inactive for one year or more label Aug 21, 2023
@erwinmombay erwinmombay added WG: components Stale Inactive for one year or more labels Aug 21, 2023
@stale stale bot removed the Stale Inactive for one year or more label Aug 21, 2023
@erwinmombay erwinmombay added Component: amp-bind Stale Inactive for one year or more labels Aug 21, 2023
@stale stale bot removed the Stale Inactive for one year or more label Aug 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants