Bug Tracker

Opened 11 years ago

Closed 11 years ago

#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:
Blocked by: Blocking:

Description

Using .constructor "type" checks tends to cause problems across iframes and the link. A better solution should be used.

Attachments (2)

3618.diff (10.2 KB) - added by john 11 years ago.
3618.diff - Changes all primitive checks to use typeof, removed use of isType, converted isArray and isFunction to new style.
3618.2.diff (14.2 KB) - added by john 11 years ago.
All primitives are checked with typeof, undefined is checked with === undefined, objects are checked with isFunction or isArray, object checks use Object.prototype.toString.

Download all attachments as: .zip

Change History (4)

Changed 11 years ago by john

Attachment: 3618.diff added

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

Changed 11 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 11 years ago by john

I've outlined all of these changes in the new core style guideline: Type Checks.

comment:2 Changed 11 years ago by john

Resolution: fixed
Status: newclosed

Fixed in SVN rev [5947].

Note: See TracTickets for help on using tickets.