Opened 10 years ago
Closed 10 years ago
#13291 closed feature (notabug)
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:
`
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.
Change History (7)
comment:1 Changed 10 years ago by
Component: | unfiled → core |
---|---|
Milestone: | None → 2.0 |
Priority: | undecided → low |
Status: | new → open |
comment:3 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | open → closed |
comment:4 Changed 10 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:5 Changed 10 years ago by
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
comment:6 Changed 10 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:7 Changed 10 years ago by
Milestone: | 2.0 → None |
---|---|
Resolution: | → notabug |
Status: | reopened → closed |
Note: See
TracTickets for help on using
tickets.
Might be worth going through to see where we could use
typeof
directly now.