Let op: Tweakers stopt per 2023 met Tweakblogs. In dit artikel leggen we uit waarom we hiervoor hebben gekozen.

Having fun with IE part 5 - what item?

By crisp on dinsdag 17 november 2009 01:13 - Comments (3)
Categories: Browsers, Javascript, Views: 6.378

Some more IE-weirdness.

alert(window.item == window);

Why is 'item' special in IE's global scope?

Volgende: Spam @ tweakblogs 11-'09 Spam @ tweakblogs
Volgende: IPv6 validation - more caveats 11-'09 IPv6 validation - more caveats


By Tweakers user Jejking, dinsdag 17 november 2009 02:36

Because it's Microsoft? :?

What are you trying to say here.

By Tweakers user sunflame, dinsdag 17 november 2009 07:06

Since IE puts every object with a name or ID in the global scope, I wouldn't be surprised if it reserves item as a property of window


being equivalent to the first element with a name or ID.
Ergens gevonden binnen een discussie uit 2003.

By Tweakers user crisp, dinsdag 17 november 2009 08:34

Yes, it's a result of MS having built DOM on top of their document.all object model. This is just something I recently found in a case where it was the cause of strange behaviour in IE.

Comments are closed