简体   繁体   English

从 C# DLL 调用 chrome 选项卡中的 javascript 函数

[英]Invoke javascript function in chrome tab from C# DLL

As a part of migration from IE to Chrome of our website, I have currently a C# dll which finding my IE instance and invoking javascript function in found web page using IHTMLDocument2 and IHTMLWindow2 objects.作为从 IE 到我们网站的 Chrome 迁移的一部分,我目前有一个 C# dll,它可以找到我的 IE 实例并使用 IHTMLDocument2 和 IHTMLWindow2 对象在找到的网页中调用 javascript 函数。

Now as my web page is opened in Chrome this option is not supported.现在,当我的网页在 Chrome 中打开时,此选项不受支持。

I found some examples of code how to find the tab in which my web page is opened but can't find any way how to invoke a function in there.我找到了一些代码示例,说明如何找到打开我的网页的选项卡,但找不到如何在其中调用函数的任何方法。

In my searches i found some suggestions but i can't find an adequate example of usage.在我的搜索中,我找到了一些建议,但找不到足够的用法示例。

I understand that i will probably need to develop some kind of chrome extension but i don't understand how the communication will work between my dll and my web page.我知道我可能需要开发某种 chrome 扩展,但我不明白我的 dll 和我的网页之间的通信将如何工作。

Is there anyone who can direct me to a proper explanations and documentation about the process ?有没有人可以指导我获得有关该过程的正确解释和文档?

我的 dll 加载到呼叫中心程序中,当该程序有接收呼叫的事件时,dll 会捕获该事件并需要传递客户信息以加载到我的网页中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM