IE8 querySelector null vs normal null
Właśnie znalazłem naprawdę interesujące zachowanie w ie8. Okazuje się, że wartość null nie zawsze jest null.
// 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;
Ktoś ma na to jakieś wyjaśnienie?