Closed
Bug 400366
Opened 16 years ago
Closed 16 years ago
[FIX] typeof Prototype == object since 2007/05/10
Categories
(Core :: DOM: Core & HTML, defect, P2)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
People
(Reporter: Mardak, Assigned: jst)
References
()
Details
(Keywords: regression)
Attachments
(1 file)
2.48 KB,
patch
|
peterv
:
review+
peterv
:
superreview+
|
Details | Diff | Splinter Review |
Loading the following url results in an XPC_NOT_ENOUGH_ARGS exception for calling nsIDOMWindowInternal.scroll. http://wii.com/jp/articles/mario-galaxy/crv/vol3/index.html#id=cv_mg-3-01-orchestra The offending line is.. $(window).scroll(TB_position) .. where the script is probably trying to use jQuery's scroll function, but is getting window.scroll. If I change the script to $("window").scroll(..), the exception isn't thrown. This started happening with 20070510 nightly builds; the page works fine in Firefox 2.0.0.8 and still fails with the latest trunk 20071018. http://bonsai.mozilla.org/cvsquery.cgi?date=explicit&mindate=2007-05-09+04&maxdate=2007-05-10+04 After doing some debugging of the jQuery $ function, it turns out it's going into the if condition on trunk because "typeof Prototype != "undefined"" and actually turns out to be object.
Reporter | ||
Comment 1•16 years ago
|
||
Oh, should have updated some steps now that I realize it's typeof Prototype causing the problem. javascript:alert(typeof Prototype) it should probably be "undefined" but is turning up as "object".
Comment 2•16 years ago
|
||
Regression from bug 370098. We should probably change Prototype to DOMPrototype at http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/dom/src/base/nsDOMClassInfo.cpp&rev=1.481&mark=577#570 and maybe Constructor to DOMConstructor?
Blocks: 370098
Flags: blocking1.9?
Assignee | ||
Updated•16 years ago
|
Assignee: nobody → jst
Flags: blocking1.9? → blocking1.9+
Reporter | ||
Comment 3•16 years ago
|
||
jresig: How much of an issue is this with 2-yr old versions (0.30) of jQuery's $ function checking "typeof Prototype"? Should it only affect $(window) and a particular set of jQuery functions, so only a small number of websites should be affected?
Comment 4•16 years ago
|
||
Well, with this copy of jQuery, I would say that it's "not a very big deal" - HOWEVER - I would consider the introduction of a Prototype or Constructor variable to be a VERY BIG DEAL (and a very bad thing). I'm sure if the Prototype guys found out they'd have a coronary. But yeah, if these variables are DOM-specific, then they should probably have the DOM prefix.
Assignee | ||
Comment 5•16 years ago
|
||
Attachment #287476 -
Flags: superreview?(peterv)
Attachment #287476 -
Flags: review?(peterv)
Assignee | ||
Updated•16 years ago
|
Summary: typeof Prototype == object since 2007/05/10 → [FIX] typeof Prototype == object since 2007/05/10
Comment 6•16 years ago
|
||
should probably add a test for this before you check it in.
Updated•16 years ago
|
Flags: in-testsuite?
Comment 7•16 years ago
|
||
Comment on attachment 287476 [details] [diff] [review] Fix. Do we need to rename nsIDOMConstructor to nsIDOMDOMConstructor too?
Attachment #287476 -
Flags: superreview?(peterv)
Attachment #287476 -
Flags: superreview+
Attachment #287476 -
Flags: review?(peterv)
Attachment #287476 -
Flags: review+
Priority: -- → P2
Assignee | ||
Comment 8•16 years ago
|
||
Yeah, I just checked this in and did the rename (interface only, not the file). Marking FIXED.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•