Re: Are new void elements really a good idea?

Henri Sivonen wrote on 08/31/2008 11:59:03 AM:
>
> On Aug 30, 2008, at 23:01, Lachlan Hunt wrote:
>
> > Authoring tools shouldn't be considered to be immutable.
>
> Julian does have a legitimate point, though. The question is, what do
> we value more: the language being more elegant or HTML serializer
> developers having to do a little patching and their user having to
> update to a new version.
>
> > <eventsource src="foo"/> is allowed.  Isn't that sufficient?
>
> No, since the whole point is that the serializer needs to know which
> elements are void elements. (You wouldn't want an HTML serializer to
> turn a script element with no children into <script/>.)

script and textarea are fundamentally different from hr and eventsource:
the former may (optionally) have content, the latter are (by rule) always
empty.

If a rule can be adopted to avoid one or the other types of additions, then
a generic authoring tool presented with a DOM containing an unrecognized
element could adopt policy that is future proof: either <name></name> or
<name/>, depending on the approach selected.

Looking at the existing elements and additions, the rule that Lachlan
suggested seems appropriate.

- Sam Ruby

Received on Monday, 1 September 2008 01:16:17 UTC