SpicIE工具栏,SHDocVw.IWebBrowser2 execScript问题?

发布于 2024-12-05 14:51:00 字数 787 浏览 2 评论 0原文

我正在为 IE8+ 开发一个插件。

主要功能: - 当我单击工具栏时,它将在每个页面内显示一个框,例如:google.com、bing.com、codeproject.com...通过使用 execScript 执行 jQuery。 因此,我所做的就是在当前页面中运行 javascript。

一切都已完成,除了该页面执行弹出窗口时,它不再起作用。 我单击工具栏,没有任何反应,但是当我看到弹出窗口时,惊讶不已!有我试图显示的盒子。所以,我认为当前选项卡及其弹出窗口正在运行相同的进程。

我已将注册表项 TabProcGrowth 更改为 20,以确保每个选项卡都由自己的进程运行,但也许它不适用于弹出窗口。

SR,由于我的英语不好,欢迎任何建议。

提前致谢。

更新: 我改变了开发插件的方式,所以我也改变了我的问题。 (但是对第一个问题的任何建议对我来说仍然非常有用)。

我的新问题仍然提到“execScript”问题。

如何使用 TabProcGrowth = 0 对 IE 浏览器的每个单独选项卡执行 javascript。我需要将此值设置为 0,因为我有计时器每隔间隔 1(例如:60 秒)向服务器请求。因此,如果有多个 IE 进程,该插件将同时向服务器发送多个请求。

在我现在的情况下,我将 TabProcGrowth 设置为 0。打开 IE,打开一些选项卡。单击最新选项卡上的工具栏,当然可以了!但是当我单击旧工具栏时,没有任何反应。脚本仍然会执行,但会在最新的选项卡上生效。

这对我来说是个大问题,解决这个问题,你们就能救我的命。

I'm developing an addon for IE8+.

Main function:
- when I click the toolbar, it will display a box inside every single page, ex: google.com, bing.com, codeproject.com... by using execScript to execute jQuery.
Therefore, what Im doing is run javascript in the current page.

Everything has done except when that page perform an Pop-up, it doesnt work anymore.
I click the toolbar, nothing happen, but when I look at the pop-up, surprise! has the box which im trying to display. So, I think the current tab and the popup of its is running the same process.

I have change registry key TabProcGrowth to 20, to make sure every single tab run by its own process, but maybe it not work with popup.

sr for my bad english, any suggestion is welcome.

Thanks in advance.

update:
I have changed the way to develop my addon, so I change my question, too. (But any suggestion for the 1st question still very useful for me).

My new question still mention the "execScript" problem.

HOW to execute javascript with every individual tab of IE browser with TabProcGrowth = 0. I need this value set to 0 because I have the timer to request to the server every interval1 (ex: 60s). So if there are more than one processes of IE, the addon will send multi request to server at the sametime.

In my situation now, I set TabProcGrowth to 0. Open IE, open some tabs. Click the toolbar at the newest tab, it works, ofcourse!. But when I click toolbar at the old one, nothing happen. The script still be execute but it takes effect on the newest tab.

It's the big problem for me, resolve this problem, you guys save my life.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文