W3C home > Mailing lists > Public > whatwg@whatwg.org > February 2011

[whatwg] "Any content inside wbr elements must not be considered part of the surrounding text"

From: Ian Hickson <ian@hixie.ch>
Date: Mon, 14 Feb 2011 09:54:42 +0000 (UTC)
Message-ID: <Pine.LNX.4.64.1102140950530.28618@ps20323.dreamhostps.com>
On Sun, 13 Feb 2011, Alex Bishop wrote:
>
> The definition of the wbr element says:
> 
> > Any content inside wbr elements must not be considered part of the 
> > surrounding text.
> 
> How's that work? The wbr element is a void element; it can't have any 
> content.

Such content is non-conforming (because the content model of <wbr> is 
"empty"), but it can still happen, e.g.:

   <script>
    var w = document.createElement('wbr');
    w.textContent = 'invalid and ignored'; 
    document.body.appendChild(w);
   </script>

...or, in an XML file:

   ...<wbr>invalid and ignored</wbr>...

HTH,
-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Monday, 14 February 2011 01:54:42 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:04 UTC