Ticket #4251 (closed bug: fixed)
Use new when constructing RegExps and named functions instead of arguments.callee
| Reported by: | metaweta | Owned by: | brandon |
|---|---|---|---|
| Priority: | major | Milestone: | 1.4 |
| Component: | event | Version: | 1.3.2 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
ECMAScript 3.1 strict mode will prohibit the use of arguments.callee. Recursive anonymous functions will need to be named and invoked by name. As long as this happens within a closure, as is the case with support.js, this won't pollute the global namespace on IE.
Also, in order to make jQuery work with Caja, constructors must be invoked with new, not called directly.
Attachments
Change History
Changed 4 years ago by metaweta
-
attachment
jquery.diff
added
comment:1 Changed 4 years ago by john
- Status changed from new to closed
- Resolution set to fixed
- Component changed from unfilled to core
Landed in SVN rev [6262]. Thanks for the patch!
Changed 4 years ago by metaweta
-
attachment
jquery.2.diff
added
Patch for events.js removing the use of arguments.callee
comment:2 Changed 4 years ago by metaweta
Sorry to reopen the bug. Somehow, I missed the uses of arguments.callee in event.js. Find attached a patch (jquery.2.diff) that fixes that.
comment:3 Changed 4 years ago by metaweta
- Status changed from closed to reopened
- Resolution fixed deleted
comment:4 Changed 4 years ago by brandon
- Owner set to brandon
- Status changed from reopened to new
- Component changed from core to event
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

Patch fixing the bug.