Modify ↓
Ticket #3618 (closed bug: fixed)
Remove Uses of .constructor
| Reported by: | john | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | 1.3 |
| Component: | core | Version: | 1.2.6 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
Using .constructor "type" checks tends to cause problems across iframes and the link. A better solution should be used.
Attachments
Change History
Changed 5 years ago by john
-
attachment
3618.2.diff
added
All primitives are checked with typeof, undefined is checked with === undefined, objects are checked with isFunction or isArray, object checks use Object.prototype.toString.
comment:1 Changed 5 years ago by john
I've outlined all of these changes in the new core style guideline: Type Checks.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

3618.diff - Changes all primitive checks to use typeof, removed use of isType, converted isArray and isFunction to new style.