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

Re: [whatwg] Document.activeElement should return the root element in non-HTML documents when no element has focus

From: Anne van Kesteren <annevk@annevk.nl>
Date: Mon, 3 Feb 2014 10:29:42 +0000
Message-ID: <CADnb78jwtuKM+W3=+Cgg--J0_3XWN-9QNxO2Do-DfKNS0eAbcA@mail.gmail.com>
To: Cameron McCormack <cam@mcc.id.au>
Cc: WHATWG <whatwg@whatwg.org>
On Mon, Feb 3, 2014 at 3:34 AM, Cameron McCormack <cam@mcc.id.au> wrote:
> When the document isn't an HTML document and when there is no element with
> focus.  Browsers agree on returning null in an HTML document when there is
> no element with focus, no <body> element, but still a document element.

So how does that work for text/xml? Do you dispatch on namespace of
the root element? If the root element is html in the HTML namespace,
you have that behavior, and otherwise you return the root element
itself? At least thus far we have cared a great deal about not
introducing more differences between HTML and XHTML than necessary. I
could see us caring less about it now though.


-- 
http://annevankesteren.nl/
Received on Monday, 3 February 2014 10:30:09 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:15 UTC