haslayout

Why does Internet Explorer need the “hasLayout” flag?

岁酱吖の 提交于 2019-11-29 05:16:48
Like many developers working on web sites for Internet Explorer, I seem to come across a lot of bugs that are caused by the notorious hasLayout flag . I understand what this flag does and how it works (for the most part). A good explanation I read the other day (although I can't find the source) is that hasLayout in IE essentially means "Make this element a rectangle." It's obviously more complicated than that, but it's pretty well summed up with that (in my opinion). What I don't understand is why the browser uses this flag. When looking for an answer, I found one that sounded logical: