Skip to main content

Bug Tracker

Side navigation

#12902 closed bug (duplicate)

Opened November 15, 2012 05:07PM UTC

Closed November 15, 2012 05:20PM UTC

isWindow returns true when it should be false

Reported by: robinemarr@gmail.com Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.7.2
Keywords: Cc:
Blocked by: Blocking:
Description
var x = {};
x.window = x;

$.isWindow(x); // returns true

why not use:

isWindow = function (obj) {
    return obj && obj !== null && obj === window;
}

instead of:

isWindow = function (obj) {
    return obj && obj !== null && obj === obj.window;
  }
Attachments (0)
Change History (1)

Changed November 15, 2012 05:20PM UTC by dmethvin comment:1

resolution: → duplicate
status: newclosed

Duplicate of #12901.