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

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