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: Cameron McCormack <cam@mcc.id.au>
Date: Mon, 03 Feb 2014 14:34:24 +1100
Message-ID: <52EF0E40.1080006@mcc.id.au>
To: Anne van Kesteren <annevk@annevk.nl>
Cc: WHATWG <whatwg@whatwg.org>
Cameron McCormack wrote:
>> Document.activeElement is currently defined to return the <body>
>> element if there is no element with focus, or null if there's no
>> <body> element.  I think it needs to return the root element when
>> the document isn't an HTML document (like an SVG document).

Anne van Kesteren wrote:
> You mean when there's no <body> element?

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.
Received on Monday, 3 February 2014 03:34:59 UTC

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