The return value of browser.Document.InvokeScript cannot be converted to IHtmlElement
- .NET Core Version: (e.g. 3.0 Preview1, or daily build number, use
dotnet --info) - Have you experienced this same bug with .NET Framework?: Yes/No
Problem description: I encountered a problem with the webbrowser control in the .net core 3 project. The local code is as follows: var result=browser.Document.InvokeScript("myjsfunc", new object[] { myjsfuncParam});, I get the result is a " The System.__ComObject" object, I copied the UnsafeNativeMethods.IHTMLElement class and other dependencies from the UnsafeNativeMethods.* class into my project. I tried to convert the result to an IHTMLElement, but I got a "System.__ComObject" object. The above operation can convert result to IHTMLElement in the .net framework project. Why? Actual behavior:
Expected behavior:
Minimal repro:
Can you please create a minimal repro for this issue, and give us what your actual and expected behaviors are?
@okman523 we need you to provide us with a minimal repro to make it easier for us to debug the situation. Are you still having issues?
@okman523 it would also be helpful if you can provide us with the scenario you're trying to enable. We're going to need more information soon or we'll have to close the issue.
Closing this issue. Please reopen in the repros for you and you still have problems.