Skip to main content

Bug Tracker

Side navigation

#3618 closed bug (fixed)

Opened November 17, 2008 03:04PM UTC

Closed November 17, 2008 04:32PM UTC

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.2.diff (14.2 KB) - added by john November 17, 2008 04:19PM UTC.

    All primitives are checked with typeof, undefined is checked with === undefined, objects are checked with isFunction or isArray, object checks use Object.prototype.toString.

  • 3618.diff (10.2 KB) - added by john November 17, 2008 04:11PM UTC.

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

Change History (2)

Changed November 17, 2008 04:30PM UTC by john comment:1

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

Changed November 17, 2008 04:32PM UTC by john comment:2

resolution: → fixed
status: newclosed

Fixed in SVN rev [5947].