Bug Tracker

Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#8509 closed bug (fixed)

jQuery-1.5.1 doesn't work in WebBrowser control

Reported by: [email protected] Owned by: jaubourg
Priority: low Milestone: 1.next
Component: ajax Version: 1.5.1
Keywords: Cc:
Blocked by: Blocking:


When loaded in WebBrowser control, happens an error "line nnn, symbol 1, '1' is null or not an object" and jQuery doesn't works.
IE8 - line 6313, IE7 - line 6314.

Affected jQuery version - 1.5.1,
unaffected versions - 1.5 and prior.

Web browser - WebBrowser ActiveX control (IE8, IE7),
but not IE8 or IE7 web browsers.

OS - Windows 7, WindowsXP SP3

Code to reproduce bug (C#):

using System.Windows.Forms;

class TestForm : Form
        WebBrowser _webBrowser = new WebBrowser { Dock = DockStyle.Fill };

        _webBrowser.DocumentText = @"
    <script type='text/javascript' src='http://code.jquery.com/jquery-1.5.1.js'></script>

    static void Main()
        (new TestForm()).ShowDialog();

Change History (4)

comment:1 Changed 12 years ago by dmethvin

I have a C++/Win32 exe with an embedded browser and it seems to load jQuery 1.5.1 with no problems/errors on Windows 7 and IE8. I'm not sure what the difference is versus your C#/.NET version, I do not have the ability to compile your C# example. Is it possible it is dependent on the version of .NET?

The error and line number doesn't seem to make sense, it's the jQuery.extend call that is closed on line 6815.

comment:2 Changed 12 years ago by Rick Waldron

Component: unfiledajax
Owner: set to jaubourg
Priority: undecidedlow
Status: newassigned

In an effort to try and understand this report... looking at Line 6313 & 6314, the way IE reports bugs, I started looking down inside the jQuery.extend({}) and there exists at line 6348:

isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),

I'm wondering if ajaxLocParts[ 1 ] does not actually exist to test in the WebBrowser control?

This is conjecture...

comment:3 Changed 12 years ago by jaubourg

Resolution: fixed
Status: assignedclosed

Fixes #8509. Makes URL regexp less overzealous and ensures it recognizes URL schemes which do not contain a conformant hierarchical structure ( as per section 2.1.2 of http://www.ietf.org/rfc/rfc2718.txt ). Also adds about: and adobe air's app: and app-storage: to the list of local protocols and provides a failover in case document.location is illformed. Unit test added.

Changeset: 714ae379db9dcb704c04080196a05d13a028f7a4

comment:4 Changed 12 years ago by [email protected]

This changeset (714ae379db9dcb704c04080196a05d13a028f7a4) worked for me in Adobe Air. Thanks!

Note: See TracTickets for help on using tickets.