MicrosoftEdge / MicrosoftEdge/WebView2Feedback

Support IDispatchEx for host objects

Open
#1,195 0 comments 0 reactions 1 assignee View on GitHub

@champnic is already working on this.

Since Apr 21, 2021.

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

Description

@champnic do you know if Webview2 will use the IDispatchEx interface if present? I'm seeing some issues with the current implementation because IDispatch doesn't allow specifying this in a call. Therefore, I have to pass the object as the first parameter. Let's say my host object is just an array of 4 string. The below code is what I have to use to properly call the Has() and Pop() methods on the array currently.

(async function() {
    const arr = window.chrome.webview.hostObjects.AHK;

    console.log(await arr.Has(arr, 1));
    console.log(await arr.Pop(arr));
})();

Originally posted by @kczx3 in https://github.com/MicrosoftEdge/WebView2Feedback/issues/513#issuecomment-821190916

AB#32539019

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.