Unity Feature Request: expose AddScriptToExecuteOnDocumentCreatedAsync

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

Nobody has claimed this yet.

Assessment

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

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.

Description

Hololens

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.

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

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.

More from MicrosoftEdge/WebView2Samples

All issues in MicrosoftEdge/WebView2Samples

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.