[whatwg] Adoption Agency Algorithm

Lachlan Hunt lachlan.hunt at lachy.id.au
Fri Jan 27 15:11:32 PST 2006


Ian Hickson wrote:
>> 8. I don't think it's right to define a parsing algorithm that only 
>> works for UAs that support scripts and frames, and then do define 
>> variations for those who need the noscript and noframes content. The 
>> parsing algorithm should be uniform and produce the same DOM no matter 
>> if the UA supports scripts or frames. It should be the rendering 
>> engine's decision to show frames, the noframes content, or both 
>> (actually, it might be toggled by the user even after parsing the 
>> document).
> 
> Sadly, that's not compatible with the Web.
> 
> UAs that support frames treat <noframes> as CDATA. That mea, e.g., that 
> <script> tags inside <noframes> don't get executed, and that <input> 
> elements inside <noscript> don't get added to forms. We can't change that. 
> But UAs can't parse them that way because they wouldn't show anything if 
> we did that. So forcibly they have to have a different parsing mode.
> 
> At least, that's what it looks like to me. I'm open to better suggestions.

Why can't it just be defined that noframes and noscript content gets 
parsed exactly as regular markup and define that form controls within 
noscript don't get submitted with forms and that scripts within noframes 
or noscript elements must not be executed?  This problem currently 
exists for XHTML and it would need to be defined that way anyway because 
UAs can't cheat with a different parsing mode in XML.

For XHTML in Firefox, scripts within noframes aren't executed, even 
though they are included correctly within the DOM.  Unfortunately, in 
Opera and Safari they are executed.  But for all of those browsers, 
however, within noscript elements, scripts get executed and controls get 
submitted.

Although, since it's XHTML, there aren't that many backwards 
compatibility constraints (if any) caused by people depending on the 
behaviour.  In fact, most authors would expect the same behaviour as in 
HTML (considering that's how most use it) so changing the browser 
behaviour shouldn't be a problem at all.

-- 
Lachlan Hunt
http://lachy.id.au/




More information about the whatwg mailing list