MicrosoftEdge / MicrosoftEdge/WebView2Feedback

Javascript return values discrepancies

Open
#105 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

While I am integrating WebView2 into wxWidgets somebody came across the following discrepancies in javascript return values between Edge and Edge via WebView2 APIs ExecuteScript(). I'm pretty sure these are a problem in the WebView2 API:

A small javascript function f(){var person = new Object();}f(); returns this:

Return undefined
Edge backend: "null"
IE backend: "undefined"
Edge browser: "undefined"

This script returns function f(){var d = new Date('10/08/2017 21:30:40'); var tzoffset = d.getTimezoneOffset() * 60000; return new Date(d.getTime() - tzoffset);}f();:

Return date
Edge backend: "{}"
Edge browser: "Sun Oct 08 2017 23:30:40 GMT+0200 (Central European Summer Time)"
IE 11 browser: "Sun Oct 08 2017 23:30:40 GMT+0200 (Central Europe Daylight Time)"
Firefox: "Sun Oct 08 2017 23:30:40 GMT+0200 (Central European Summer Time)"

https://github.com/wxWidgets/wxWidgets/pull/1700#issuecomment-575794999

AB#28632017

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.

Research direction

Start with the WebView2 ExecuteScript() API behavior described in the issue and review the linked wxWidgets pull-request discussion. Reproduce the undefined and Date return-value cases using the listed scripts, then document the confirmed behavior or resolution for each discrepancy.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.