MicrosoftEdge / MicrosoftEdge/WebView2Samples

Unity Feature Request: expose AddScriptToExecuteOnDocumentCreatedAsync

Open
#197 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Hololens
Dominant language
C++
Stars
1k
Forks
521
Avg merge
13m
Merged PRs (30d)
1

Description

I would like the ability to inject new globals into webpages I load into the WebView. It appears that CoreWebView2 has such an API at the C++ level: AddScriptToExecuteOnDocumentCreatedAsync. It would be nice if this method were somehow exposed at the C# level in Unity.

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 by tracing the Unity WebView2 integration and comparing its C# surface with the referenced CoreWebView2 AddScriptToExecuteOnDocumentCreatedAsync API. No files or tests are named in the issue, so first locate the Unity wrapper and its native bridge. Done means Unity callers can use an equivalent API to inject scripts before document creation.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, csharp, unity
Domain
api, desktop, game-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.