W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2008

[whatwg] Setting the "title" attribute

From: Jonas Sicking <jonas@sicking.cc>
Date: Thu, 07 Aug 2008 03:43:18 -0700
Message-ID: <489AD1C6.6000304@sicking.cc>
Robert O'Callahan wrote:
> http://www.w3.org/html/wg/html5/#dom-tree
>        1. If the |title| element
>           <http://www.w3.org/html/wg/html5/#the-title1> is null, then a
>           new |title <http://www.w3.org/html/wg/html5/#title1>| element
>           must be created and appended to the |head| element
>           <http://www.w3.org/html/wg/html5/#the-head0>.
>        2. The children of the |title| element
>           <http://www.w3.org/html/wg/html5/#the-title1> (if any) must
>           all be removed.
>        3. A single |Text| node whose data is the new value being
>           assigned must be appended to the |title| element
>           <http://www.w3.org/html/wg/html5/#the-title1>. 
> Steps 1 and 2 can fire mutation events and cause "the title element" to 
> become null again. I suppose if that happens, the algorithm should stop, 
> but the spec should say so.

Actually, if we make the changes discussed to the mutation events spec, 
we can consider setting the title a compound operation. This means that 
mutation events won't fire until the above algorithm is fully done, so 
any changes to the title element or attribute can simply be considered a 
separate operation.

/ Jonas
Received on Thursday, 7 August 2008 03:43:18 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:04 UTC