WebView2Announcements icon indicating copy to clipboard operation
WebView2Announcements copied to clipboard

API Review: PostWebMessageAsJson and PostWebMessageAsString APIs for workers

Open dhveerap opened this issue 9 months ago • 0 comments

API Review

Title: PostWebMessageAsJson and PostWebMessageAsString APIs for workers

Currently, if developers want to post a message to or from a worker, they must first post a message to the main thread and then post a message to the worker from the main thread. This leads to increased load on the main thread.

The WebView2 team is introducing APIs that allow messages to be posted directly from the Host app to dedicated and service workers, and vice versa. This eliminates the need for the main thread to act as an intermediary, thereby improving app performance and responsiveness.

API Spec: MicrosoftEdge/WebView2Feedback#5170

Please review the pull request and add any feedback you have about the APIs. We appreciate your input and support!

dhveerap avatar Mar 19 '25 04:03 dhveerap