MicrosoftEdge / MicrosoftEdge/WebView2Feedback

localStorage JavaScript API missing

Open
#2,289 3 comments 0 reactions 1 assignee View on GitHub

@champnic is already working on this.

Since Mar 23, 2022.

bug
Dominant language
PowerShell
Stars
526
Forks
67
PR merge metrics
No merged PRs in 30d

Description

Description

The localStorage JavaScript API seems to be completely missing. Using either DevTools console or CoreWebView2.ExecuteScriptAsync always results in the error saying localStorage is undefined.

Version

SDK: 1.0.1150.38
Runtime: Stable 99.0.1150.39
Framework: WPF
OS: Windows 11 Insider Build 22572

Repro Steps

  1. Open DevTools, go to Console tab, and try to execute localStorage.
    Expected result: DevTools shows the JSON implementation of localStorage.
    Actual result: DevTools throws Uncaught ReferenceError: localStorage is not defined.
  2. Execute CoreWebView2.ExecuteScriptAsync("javaScript:localStorage");
    Expected result: The function returns the JSON implementation of localStorage.
    Actual result: The function returns null.

Screenshots

image image image

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.