Bug Tracker

Opened 14 years ago

Closed 14 years ago

Last modified 12 years ago

#3870 closed bug (fixed)

Cannot use jQuery 1.3 in XUL pages

Reported by: glazou Owned by: john
Priority: undecided Milestone: 1.3.1
Component: core Version: 1.3
Keywords: Cc:
Blocked by: Blocking:


This is a regression from 1.2.6 to 1.3. I am using 1.2.6 in BlueGriffon (XUL- and Gecko-based wysiwyg editor) and it works absolutely fine. But attaching jQuery 1.3 to a XUL page results in the following error, horking completely the page's behaviour :

Error: div.firstChild.getAttribute is not a function Line: 2123

This line number is of course in the "development" version, not the minified one.

Attachments (1)

selector.js (21.5 KB) - added by pausebuttonedit 14 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 14 years ago by john

Component: unfilledcore
Owner: set to john

After doing some digging it looks like this is a very similar issue to #3864.

comment:2 Changed 14 years ago by arrix

There is html specific code in jQuery, especially in jQuery.support. I think jQuery is mainly intended for html developers though it's been working quite well with XUL and XML until 1.3. I think XUL developers may need a jquery-xul fork which will definitely become Firefox extension developer's power tool.

comment:3 Changed 14 years ago by john

Resolution: fixed
Status: newclosed

This should be fixed now in jQuery rev [6135].

Changed 14 years ago by pausebuttonedit

Attachment: selector.js added

comment:4 Changed 14 years ago by pausebuttonedit

Still not working for me. Firebug says the element created by selectors.js line 702 is of type 'Comment' (nodename '#comment', nodetype 8). It seems that this type of element doesn't support getAttribute(), so the script fails with 'div.firstChild.getAttribute is not a function'. I've attached an amended selectors.js; to wit, I've added '&& div.firstChild.getAttribute' to line 703.

First time I've used Trac, so let me know if I'm Doing It Wrong.

comment:5 Changed 14 years ago by john

Landed a fix for this in SVN rev [6161]. I just pushed a new nightly as well: http://code.jquery.com/nightlies/jquery-2009-01-23.js

comment:6 Changed 12 years ago by Ilya Kharlamov

There is a special branch of jQuery for use in xul: http://www.imaitech.com/jquery-xul/jquery-xul-1.4.5pre-1/jquery-xul.js

Note: See TracTickets for help on using tickets.