Side navigation
#11183 closed bug (wontfix)
Opened January 17, 2012 09:25PM UTC
Closed February 08, 2012 09:58AM UTC
Last modified March 14, 2012 10:11AM UTC
jQuery is not working in Chrome 18 (dev) extensions
Reported by: | ewolf | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | None |
Component: | core | Version: | 1.7.1 |
Keywords: | Cc: | timmywil | |
Blocked by: | Blocking: |
Description
Browser: Google Chrome 18.0.1003.1 dev
Operating System: Mac OS X 10.7.2
When being loaded as a content script as part of a browser extension, jQuery triggers an error in Chrome 18, the current developer version of Chrome, and prevents code depending on jQuery from being executed.
The issue has been reported before by somebody else in the Chrome bug tracker: http://code.google.com/p/minimalist/issues/detail?id=171
To reproduce the issue, you can download this extension I created to demonstrate the problem: http://cl.ly/DPhc
The exact error varies across different versions, but leads to a failure of code dependent on jQuery in most cases (except 1.5).
1.7.1:
'''Uncaught TypeError: Cannot read property 'compareDocumentPosition' of null at line 4807''''
1.7:
Uncaught TypeError: Cannot read property 'firstChild' of null at line 1520
1.6.4:
Uncaught TypeError: Cannot read property 'firstChild' of null at line 1320
1.6.3:
Uncaught TypeError: Cannot read property 'firstChild' of null at line 1320
1.6.2:
Uncaught TypeError: Cannot read property 'firstChild' of null at line 1310
1.6.1:
Uncaught TypeError: Cannot read property 'firstChild' of null at line 1288
1.6:
Uncaught TypeError: Cannot call method 'appendChild' of null at line 1287
NOT WORKING
1.5:
Uncaught TypeError: Cannot read property 'compareDocumentPosition' of null at line 4148
(Simple code depending on jQuery can, however, still be executed with v1.5)
I am aware that this version of Chrome is a developer version that may contain bugs and does not have to necessarily be supported by jQuery. However, I would like to ask you to keep an eye on this in order to ensure full functionality of jQuery once Chrome 18 becomes beta or stable.
Attachments (0)
Change History (4)
Changed January 17, 2012 10:50PM UTC by comment:1
Changed January 17, 2012 11:02PM UTC by comment:2
cc: | → timmywil |
---|
4807 compareDocumentPosition is actually in Sizzle
Changed January 17, 2012 11:08PM UTC by comment:3
component: | unfiled → core |
---|---|
priority: | undecided → low |
Sounds like a browser bug. compareDocumentPosition is only used if it is present on the current document element. My guess is that document.documentElement
is null in the environment somehow.
Changed February 08, 2012 09:58AM UTC by comment:4
resolution: | → wontfix |
---|---|
status: | new → closed |
Looks like it was fixed: http://code.google.com/p/chromium/issues/detail?id=109272
This may be related to #9449, as other offset-related methods seem to just fall right down in Chrome extensions as well. The isolated environment's 'window' object seems to have some significant differences from a "normal" window object.