Skip to main content

Bug Tracker

Side navigation

#7104 closed bug (wontfix)

Opened September 30, 2010 10:31AM UTC

Closed October 14, 2010 06:40AM UTC

Last modified March 13, 2012 08:06PM UTC

jQuery 1.4.2 not running within IE9 Web Browser control (incl. solution proposal)

Reported by: pmuessig Owned by:
Priority: low Milestone: 1.4.3
Component: core Version: 1.4.2
Keywords: Cc: dmethvin
Blocked by: Blocking:
Description

When using jQuery inside Eclipse within a dynamic web project you can run you web application within the Web Browser control.

I noticed that somehow the jQuery object was not available. I checked where the execution of the jquery-1.4.2.js file failed and find out that the Web Control throws a TypeError when it executes line 905.

By adding a try catch the jQuery works again:

900:	// Make sure that the execution of code works by injecting a script
901:	// tag with appendChild/createTextNode
902:	// (IE doesn't support this, fails, and uses .text instead)
903:	if ( window[ id ] ) {
904:		jQuery.support.scriptEval = true;
>>>>		try {
905:			delete window[ id ];
>>>>		} catch (e) {
>>>>			// somehow this line does not work in the IE9 Web Browser control
>>>>			//alert(e); // => throws a TypeError: Object doesn’t support this property or method!
>>>>		}
>>>>	}
Attachments (0)
Change History (6)

Changed October 01, 2010 06:43AM UTC by snover comment:1

jQuery works fine in IE9 beta 1. What version of IE9 are you trying to use? Can you confirm that it works / does not work outside of Eclipse? I am not sure that IE-in-Eclipse is one of the supported jQuery platforms.

Changed October 01, 2010 11:38AM UTC by pmuessig comment:2

I can confirm that jQuery works fine in IE9 beta 1.

But within the Web Browser control (embedded IE) in Eclipse jQuery fails. Maybe this is only a beta bug of IE.

For the people working in Eclipse and using the embedded IE for previewing their application this little fix allows to run jQuery.

Changed October 02, 2010 05:17AM UTC by snover comment:3

cc: → dmethvin
priority: undecidedlow

Does it work with IE8 in Eclipse? If so, this sounds like an IE beta bug, not a jQuery bug. Also, please provide the version of Eclipse.

cc dmethvin for a second opinion.

Changed October 02, 2010 07:30PM UTC by pmuessig comment:4

Yes, it works with IE8 in Eclipse (Helios SR1 64bit). I noticed this issue after installing the IE9 beta. Do you think this bug will be fixed by IE? If not this simple try catch can help.

Changed October 14, 2010 03:06AM UTC by addyosmani comment:5

In my opinion this issue is due to the IE9 beta. I'll leave this open as per snover's request as it would be useful to get dmethvin's input on whether this is something we should attempt to fix.

Changed October 14, 2010 06:40AM UTC by snover comment:6

resolution: → wontfix
status: newclosed

If this issue occurs once the final version of IE9 is released, you may reopen this ticket.