Bug Tracker


Ticket #8509 (closed bug: fixed)

Opened 3 years ago

Last modified 2 years ago

jQuery-1.5.1 doesn't work in WebBrowser control

Reported by: fl.lllj@… Owned by: jaubourg
Priority: low Milestone: 1.next
Component: ajax Version: 1.5.1
Keywords: Cc:
Blocking: Blocked by:


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

comment:1 Changed 3 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 3 years ago by rwaldron

  • Owner set to jaubourg
  • Priority changed from undecided to low
  • Status changed from new to assigned
  • Component changed from unfiled to ajax

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 3 years ago by jaubourg

  • Status changed from assigned to closed
  • Resolution set to fixed

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 3 years ago by ian@…

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

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.


Add a comment

Modify Ticket

as closed

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.