Bug 63922 - document.all & document.activeElement undefined in xhtml page
Summary: document.all & document.activeElement undefined in xhtml page
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2011-07-05 00:31 PDT by shuchen.net
Modified: 2014-06-21 13:30 PDT (History)
7 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description shuchen.net 2011-07-05 00:31:46 PDT
1. Visit the xhtml page at http://www.battlenet.com.cn/ or http://inputtools.appspot.com/main.py
2. In the address bar, type: "javascript:alert(document.activeElement);"

The alert dialog tells document.activeElement is not undefined.

The alert dialog tells "undefined".
Comment 1 Dominic Cooney 2011-07-05 03:12:17 PDT
document.activeElement and document.all are defined on HTML documents, see for example:


XHTML documents are not HTML documents (open the web inspector on one of those pages and look at document.constructor, for example, and compare it with the document.constructor of a HTML page such as this one.)

So I think it is correct for document.activeElement and document.all to be undefined in an XHTML page.
Comment 2 Alexey Proskuryakov 2011-07-05 10:50:20 PDT
This is incorrect.

All documents in an HTML5 compliant engine must implement HTMLDocument interface, see <http://www.whatwg.org/specs/web-apps/current-work/#documents-in-the-dom>.
Comment 3 Dmitry Azaraev 2011-11-17 04:28:47 PST
I agree with Alexey.
Even more - now activeElement it is part of partial Document interface.
And it is blocker for custom UI toolkits to use XHTML instead of HTML.
Comment 4 sonny.piers@gmail.com 2012-07-04 05:33:41 PDT
Any update on this?
Comment 5 William J. Edney 2012-10-04 07:08:09 PDT
XHTML5 is the XML formulation of HTML5 and is being used out there.

It'd be nice to get this fixed. Anything I can do to help? (I'm not a C programmer, but I can write tests, etc.).


- Bill
Comment 6 sonny.piers@gmail.com 2013-04-27 11:20:46 PDT
Same problem with window.hasFocus().