Re: JSLint and DOM constructor types.
- --- In firstname.lastname@example.org, "Douglas Crockford" <douglas@...> wrote:
>By the way, I ran some tests in IE8. Apparently IE8 *does* support Element, but not NodeList:
> I will add them when IE adds them. Currently, I think it is more helpful for JSLint to report that NodeList is not available on 80% of browsers.
var body = document.getElementsByTagName("body");
console.log("Element: " + (body instanceof Element)); // true
console.log("NodeList: " + (body instanceof NodeList)); // false
I have no clue whether IE7 or IE6 support Element, however.