Anne van Kesteren

HTML5: Frames

Mark Pilgrim glosses over it, but personally I’m quite fond of the way HTML frames are handled in HTML5. In case you missed it, HTML5 now defines rendering of HTML in non-normative fashion. All gory rendering details of all HTML elements that affect rendering in contemporary Web browsers defined, including blink and marquee. Yay! For implementors this is really useful. I can recall several instances offhand where Opera QA was trying to figure out what the default styling was in other browsers for certain elements because pages did not look quite the same. (E.g. margin of form elements in quirks mode or various elements that need to have text-indent:initial applied to them for unknown reasons.)

Frames and framesets is designed as a simple grid algorithm that ignores CSS for that particular document. For an obsolete feature, it’s quite neat. I almost started writing evil test cases against it (e.g. inserting a body element before the frameset, removing the head element, etc.), but then decided that ensuring that extremely old and obsolete features work correctly is probably not the best use of my time. (Admittedly I’m still tempted.)