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

[java] deprecate all html5 offline storage implementations See #10397 #13373

Merged
merged 1 commit into from
Jan 1, 2024

Conversation

titusfortner
Copy link
Member

Description

Deprecates all LocalStorage and WebStorage implementations
Also deprecates AppCacheStatus enum which isn't being used anywhere and we probably could just delete

Motivation and Context

See #10397

Here is the JavaScript equivalent of the methods being deprecated:

case CLEAR_LOCAL_STORAGE:
return toScript("localStorage.clear()");
case GET_LOCAL_STORAGE_KEYS:
return toScript("return Object.keys(localStorage)");
case SET_LOCAL_STORAGE_ITEM:
return toScript(
"localStorage.setItem(arguments[0], arguments[1])",
parameters.get("key"),
parameters.get("value"));
case REMOVE_LOCAL_STORAGE_ITEM:
return toScript(
"var item = localStorage.getItem(arguments[0]); localStorage.removeItem(arguments[0]);"
+ " return item",
parameters.get("key"));
case GET_LOCAL_STORAGE_ITEM:
return toScript("return localStorage.getItem(arguments[0])", parameters.get("key"));
case GET_LOCAL_STORAGE_SIZE:
return toScript("return localStorage.length");
case CLEAR_SESSION_STORAGE:
return toScript("sessionStorage.clear()");
case GET_SESSION_STORAGE_KEYS:
return toScript("return Object.keys(sessionStorage)");
case SET_SESSION_STORAGE_ITEM:
return toScript(
"sessionStorage.setItem(arguments[0], arguments[1])",
parameters.get("key"),
parameters.get("value"));
case REMOVE_SESSION_STORAGE_ITEM:
return toScript(
"var item = sessionStorage.getItem(arguments[0]);"
+ " sessionStorage.removeItem(arguments[0]); return item",
parameters.get("key"));
case GET_SESSION_STORAGE_ITEM:
return toScript("return sessionStorage.getItem(arguments[0])", parameters.get("key"));
case GET_SESSION_STORAGE_SIZE:
return toScript("return sessionStorage.length");

Do we want to put this in our docs somewhere and point people to it, or just tell them to find what they need online?

these are currently implemented by executing JavaScript
@titusfortner titusfortner requested a review from diemol December 29, 2023 20:50
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (3f9b606) 58.05% compared to head (ddd5623) 58.05%.
Report is 1 commits behind head on trunk.

❗ Current head ddd5623 differs from pull request most recent head 8979563. Consider uploading reports for the commit 8979563 to get more accurate results

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##            trunk   #13373   +/-   ##
=======================================
  Coverage   58.05%   58.05%           
=======================================
  Files          88       88           
  Lines        5338     5338           
  Branches      224      224           
=======================================
  Hits         3099     3099           
  Misses       2015     2015           
  Partials      224      224           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@diemol diemol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @titusfortner!

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

Successfully merging this pull request may close these issues.

3 participants