Side navigation
#6917 closed enhancement (worksforme)
Opened August 19, 2010 12:24AM UTC
Closed August 19, 2010 12:54AM UTC
Last modified August 19, 2010 12:29PM UTC
Replacing uses of arguments.callee with the function name.
Reported by: | mikevsamuel | Owned by: | |
---|---|---|---|
Priority: | Milestone: | 1.4.3 | |
Component: | core | Version: | 1.4.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
The attached patch replaces uses of arguments.callee with the shorter, and semantically equivalent use of the function's name.
Please consider this patch as it will make future compatibility with EcmaScript 5 strict mode and harmony easier.
The patch is from http://github.com/jquery/jquery.git as of 18 August 2010.
From the EcmaScript 5 spec:
Annex C (informative) The Strict Mode of ECMAScript
...
- Arguments objects for strict mode functions define non-configurable accessor properties named "caller" and "callee" which throw a TypeError exception on access (10.6).
...
Attachments (1)
Change History (3)
Changed August 19, 2010 12:54AM UTC by comment:1
resolution: | → worksforme |
---|---|
status: | new → closed |
Changed August 19, 2010 01:49AM UTC by comment:2
Is jquery=basis built from files under src?
I see arguments.callee at http://github.com/jquery/jquery/blob/master/speed/jquery-basis.js#L2468
What should I be checking out to generate useful patches?
Changed August 19, 2010 12:29PM UTC by comment:3
jquery-basis.js is an old copy of jQuery that we use for performance comparisions - not the current version of jQuery.
Agreed about ES5 compat, but I think all instances of
have already been exorcised in the current 1.4.3 release. The patch seems to be against event.js but that code is closer to 1.3.2; the code doesn't look that way currently:http://github.com/jquery/jquery/blob/master/src/event.js#L44