Bug Tracker

Opened 11 years ago

Closed 11 years ago

#12902 closed bug (duplicate)

isWindow returns true when it should be false

Reported by: robinemarr@… 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;
  }

Change History (1)

comment:1 Changed 11 years ago by dmethvin

Resolution: duplicate
Status: newclosed

Duplicate of #12901.

Note: See TracTickets for help on using tickets.