This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html Multipage: http://www.whatwg.org/C#the-title-element Complete: http://www.whatwg.org/c#the-title-element Referrer: Comment: When setting <title>.text, allow reusing current child text node Posted from: 83.218.67.123 User agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1736.3 Safari/537.36
Created attachment 1423 [details] Dump mutations when setting <title>.text Current spec says for setting <title>.text: "Can be set, to replace the element's children with the given value." Neither WebKit, Blink or Firefox seems to replace the child when setting a new value when the element's children consists of a single text node. In Blink/WebKit, the child text node is updated to the new value instead. Ideally, this should be aligned with document.title, but at least Firefox seems to treat them differently w.r.t to mutation observers.
The text you quote above is non-normative. The normative text already says what you want.
Created attachment 1425 [details] Compare setting .text to .textContent for <title> Yes, the normative text states: "On setting, it must act the same way as the textContent IDL attribute." which (through the DOM standard) brings us back to replace-all: "Replace all with node within the context object." Neither FF nor Blink/WebKit does this. See attached demo that compares .text to .textContent. Mainly wanted to point out the difference between the map and reality. :)
I'll try to get this fixed according to spec in Blink. Thanks.