IHTMLWindow2::execScript breaks after IE7 RC1
- From: "He Shiming" <mailbill(NOSPAM)@21cn.com.nospam>
- Date: Sun, 27 Aug 2006 13:20:24 +0800
Hi,
My program hosts a web browser control. It's written in ATL and it pretty
much follows the atlbrowser.exe sample. I implemented the
IInternetSecurityManager, to override security settings. In
IInternetSecurityManager::ProcessUrlAction, I set *pPolicy to
URLPOLICY_ALLOW. For all other functions, I return "INET_E_DEFAULT_ACTION".
Additionally, I used the IPersistStreamInit interface (obtained from
IHTMLDocument2) to feed the HTML content into the web browser.
To provide dynamic interaction functions, I've built several javascript
libraries, they are loaded in the HTML code through <script
src="C:\\something.js"/>. By using IHTMLWindow2::execScript, I'm able to
call these functions from the host program to accomplish interaction tasks.
This works up to Internet Explorer 7 Beta 3. I just installed the IE7 RC1
update. All calls to IHTMLWindow2::execScript breaks. All calls will bring
up an "Internet Explorer Script Error" dialog. The error message includes:
Invalid character at Line 2 Char 1
Object expected at Line 1 Char 1
....and some others
I wasn't able to debug because there's nothing wrong with the javascript
code. The very same code works on IE7 Beta3 or IE6 if that matters.
I'd reviewed the release notes for IE7 RC1 and I didn't see an obvious
reason for this to break. I also tried setting several security options in
the Internet Zone (IPersistStreamInit works in the Internet Zone, and the
URL is always about:blank), including Enabling scripting of Internet
Explorer, and the behavior is still the same.
I'm wondering if anyone can give me a hint on fixing this problem. I thought
using IHTMLWindow2::execScript is a recommended way to interact between the
hosted browser control and the host program. Has anyone experienced similar
problems? How can I fix it?
Thanks in advance,
--
He Shiming
.
- Follow-Ups:
- Re: IHTMLWindow2::execScript breaks after IE7 RC1
- From: He Shiming
- Re: IHTMLWindow2::execScript breaks after IE7 RC1
- Prev by Date: Re: IWebBrowser2, frames and DocumentComplete
- Next by Date: Re: IWebBrowser2, frames and DocumentComplete
- Previous by thread: IWebBrowser2, frames and DocumentComplete
- Next by thread: Re: IHTMLWindow2::execScript breaks after IE7 RC1
- Index(es):
Relevant Pages
|
Loading