Gregor said:
[...] why
[..]
if (isHostMethod(elem, "setSelectionRange")) {
elem.setSelectionRange(s, s+len);
}
[..]
works in FF, WebKit based browsers and Opera, with "elem"
referencing an input element.
Probably the same reason why `window' works there: trying for compatibility
with existing implementations.
<
http://www.faqts.com/knowledge_base/view.phtml/aid/13562>
Another reason could be <
http://www.w3.org/TR/html5/editing.html>.
Apropos, it is official now -- XHTML 2 is dead in favor of HTML 5:
,-[from: <
http://www.w3.org/>]
|
| XHTML 2 Working Group Expected to Stop Work End of 2009, W3C to
| Increase Resources on HTML 5
|
| 2009-07-02: Today the Director announces that when the <XHTML 2 Working
| Group> charter expires as scheduled at the end of 2009, the charter will
| not be renewed. By doing so, and by increasing resources in the <HTML
| Working Group>, W3C hopes to accelerate the progress of HTML 5 and
| clarify W3C's position regarding the future of HTML. A <FAQ> answers
| questions about the future of deliverables of the XHTML 2 Working Group,
| and the status of various discussions related to HTML. [...]
Whether that is a step in the right direction remains to be seen. However,
ISTM that, again (like with HTML 4.01), quasi-standards have managed to
influence the evolution of HTML more than the W3C process could. Which
makes me question again whether the W3C Process Document and the working
groups' work should undergo a thorough review in order to keep up with the
speed of implementors' innovations and user's demands. For another example,
one really has to wonder why the heck it takes 5 to 7 years for CSS 2.1
(work started in August 2002), and a decade(!) for CSS 3 Selectors (work
started in August 1999!), to mature enough from first Working Draft to even
Candidate Recommendation. CSS 3 Selectors isn't even there yet although for
most features there are two or more interoperable implementations. But I'm
digressing.
PointedEars