Side navigation
#13291 closed feature (notabug)
Opened January 21, 2013 09:44PM UTC
Closed January 29, 2013 07:45PM UTC
Optimize jQuery.type() for 2.0
Reported by: | jdalton | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | None |
Component: | core | Version: | git |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
I noticed in jQuery 2.0 jQuery.type has:
```
return typeof obj === "object" || typeof obj === "function" ?
class2type[ core_toString.call(obj) ] ....
```
Modern browsers no longer have the old browser issue of reporting regexes as typeof function
, sothe `typeof obj === "function" guard can be removed.
Attachments (0)
Change History (7)
Changed January 21, 2013 10:03PM UTC by comment:1
component: | unfiled → core |
---|---|
milestone: | None → 2.0 |
priority: | undecided → low |
status: | new → open |
Changed January 22, 2013 12:52AM UTC by comment:2
We have a pull request for this...
Changed January 27, 2013 02:14AM UTC by comment:3
resolution: | → fixed |
---|---|
status: | open → closed |
Changed January 29, 2013 07:41PM UTC by comment:4
resolution: | fixed |
---|---|
status: | closed → reopened |
Changed January 29, 2013 07:42PM UTC by comment:5
resolution: | → fixed |
---|---|
status: | reopened → closed |
Revert "Fix #13291, no longer need the functionish-regex guard."
Turns out this is still needed by Safari 5.1, which we're still supporting.
This reverts commit c4b1da40075532e4f14821b1519ae0ef6665bf1e.
Changeset: aa3c92979a723cd972bf37c766c3b4a63cc23fdb
Changed January 29, 2013 07:44PM UTC by comment:6
resolution: | fixed |
---|---|
status: | closed → reopened |
Changed January 29, 2013 07:45PM UTC by comment:7
milestone: | 2.0 → None |
---|---|
resolution: | → notabug |
status: | reopened → closed |
Might be worth going through to see where we could use
typeof
directly now.