[whatwg] Introducing new elements is expensive

Matthew Raymond wrote:

 > Dean Edwards wrote:
 >
 >> Anne van Kesteren wrote:
 >>
 >>>  <output value="bar">foo</output>
 >>>
 >>> Legacy UAs show "foo" where WF2 UAs show "bar".
 >>
 >>
 >>
 >> This is not consistent with <textarea>. I think they should behave 
the same. <output> is effectively a read-only <textarea>.
 >
 >
 >
 >    Actually, this is not the case. For <textarea>, if you put in HTML 
content inside the element, it treats the contents as PCDATA, so the 
user will see HTML markup inside a multiline textbox. That is not the 
case with <output> in a legacy user agent. Any HTML contents will 
display as HTML in a legacy UA. Yet if we assume the <textarea> model 
for <output>, WF2 UAs will display the underlying markup as text instead 
of rendering it. So, right off the bat, we have a difference in how the 
contents of <output> are rendered between legacy and WF2 user agents.
 >

point taken.

 >    Since we can't avoid a difference in rendering unless we 
artificially enforce a no-markup-inside-<output> rule, what does it hurt 
to simply have a |value| attribute to set the .defaultvalue directly?
 >
 >

I'm sure it doesn't hurt anything really. I just saw an inconsistency 
with <textarea>:

<textarea value="bar">foo</textarea> displays "foo", submits "foo"
<output value="bar">foo</output>     displays "bar", submits "bar?"

I guess some inconsistencies are unavoidable though :-)

-dean

Received on Saturday, 12 March 2005 08:26:42 UTC