[whatwg] Introducing new elements is expensive
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.
> 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
<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 :-)
More information about the whatwg