Richard Trahan wrote:
[changing title of the document]
In the interest of higher education, what was wrong with my node method?
According to the DOM/HTML specification the HTMLTitleElement inherits
from HTMLElement, which itself inherits from the core Element interface,
which gives it appropriate DOM methods. Since HTML defines the content
of TITLE as PCDATA, the title should be able to have text nodes and
change their node values.
However, AFAICS, the specification does not state that the [normalized]
text nodes inside the title should be considered as the title's value
While IE has therefore decided to not create a text node, Mozilla and
Opera have however made the decision to have a text node for the title
value; in this regard, since changing the node's value does nothing, it
could probably be considered as a "bug" in those browsers, but certainly
not in regards of the reference.
Apart from altering document.title, there's another standard way to
change the title, though probably less supported: change the text
property of the TITLE element.