[whatwg] void elements vs. content model = "empty"

Ian Hickson ian at hixie.ch
Wed Jun 20 22:26:45 PDT 2007


On Wed, 20 Jun 2007, Jonas Sicking wrote:
> Simon Pieters wrote:
> > On Wed, 20 Jun 2007 00:28:37 +0200, Ian Hickson <ian at hixie.ch> wrote:
> > 
> > > > Also, if there's a difference between content=empty and 'void elements'
> > > > it deserves an explanation.
> > > 
> > > One is just about the content model, the other is just about the syntax.
> > > They're not really related, though it happens to be the case that all
> > > elements that have an empty content model are void elements in HTML.
> > 
> > FWIW, <script src> has empty content model but still requires the end tag.
> 
> That is not true. The contents of a <script src> is interpreted as script and
> executed if loading the resource pointed to by the src-attribute fails. In
> other words
> 
> <script src="http://nonexistant.example.com/">
> alert('hi');
> </script>
> 
> should bring up an alert.

This doesn't seem to be the case as far as I can tell.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'



More information about the whatwg mailing list