IE8 querySelector nulo vs normal nulo
Acabei de encontrar um comportamento realmente interessante no ie8. Acontece que nulo nem sempre é nulo.
// just normal, casual null hanging out in the sun
var nullA = null;
// query for non existing element, should get null, same behaviour also for getElementById
var nullB = document.querySelector('asdfasfdf');
// they are equal
console.log(nullA === nullB);
// false
nullA instanceof Object;
// will throw 'Object expected' error in ie8. Black magic
nullB instanceof Object;
Alguém tem uma explicação para isso?