winforms icon indicating copy to clipboard operation
winforms copied to clipboard

The return value of browser.Document.InvokeScript cannot be converted to IHtmlElement

Open zepamble opened this issue 7 years ago • 4 comments

  • .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:

zepamble avatar Apr 11 '19 09:04 zepamble

Can you please create a minimal repro for this issue, and give us what your actual and expected behaviors are?

merriemcgaw avatar Apr 12 '19 18:04 merriemcgaw

@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?

merriemcgaw avatar May 23 '19 01:05 merriemcgaw

@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.

merriemcgaw avatar May 24 '19 23:05 merriemcgaw

Closing this issue. Please reopen in the repros for you and you still have problems.

merriemcgaw avatar Jun 14 '19 00:06 merriemcgaw