[whatwg] Introducing new elements is expensive

Dean Edwards dean at edwards.name
Sat Mar 12 08:26:42 PST 2005


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






More information about the whatwg mailing list