Skip to main content

Bug Tracker

Side navigation

#3870 closed bug (fixed)

Opened January 15, 2009 01:37PM UTC

Closed January 19, 2009 11:04PM UTC

Last modified November 30, 2010 01:49AM UTC

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:
Description

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 January 22, 2009 11:38AM UTC.
Change History (6)

Changed January 15, 2009 01:49PM UTC by john comment:1

component: unfilledcore
owner: → john

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

Changed January 15, 2009 02:42PM UTC by arrix comment:2

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.

Changed January 19, 2009 11:04PM UTC by john comment:3

resolution: → fixed
status: newclosed

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

Changed January 22, 2009 11:41AM UTC by pausebuttonedit comment:4

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.

Changed January 23, 2009 07:49PM UTC by john comment:5

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

Changed November 30, 2010 01:49AM UTC by Ilya Kharlamov comment:6

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