IE haslayout lulz

The IE developer toolbar has been available for a while. It allows you to make live updates to a page like its analogue plugins for other browsers but does it really clunkily with the drop-down buttons and the little text fields, Delphi-style. Whatever, though, it's not that great but it's better than nothing, and it's less buggy than the standalone Firebug bookmarklet.

Oh god.

The really useful thing about the IE dev toolbar is that it shows you whether an element has layout or not. Naturally the developers just couldn't resist the temptation to somehow screw this up, so if an element DOES have layout, the tool will show you that hasLayout is set to -1. If, on the other hand, an element DOES NOT have layout, the toolbar won't tell you anything about hasLayout at all. Genius. I can't think of a single other system where -1 means 'on'. Thank you, Microsoft, for giving us this gift with one hand while using the other hand to sneakily slide a drawing pin onto our collective chair.

I hope this post saves you at least 5 minutes of confusion.

blog comments powered by Disqus