Incorrect assert in typeof.js
description
In typeof.js, there are two asserts that look like this:
var opts = Object.prototype.toString;
assert('[object Global]',opts.call(undefined));
assert('[object Global]',opts());
The first assert has the comment "call on the undefined should pass global, this is used by some ajax libraries", but is this still valid? Which ajax libraries use this, and do they still use it?
When you run it in Firefox, Chrome and IE9, it outputs "[object Undefined]" and not "[object Window]", even when you're not in strict mode.
The second call to opts() gives you "[object Undefined]" in Firefox and Chrome, but "[object Window]" in IE, so that seems a bit more vague.