W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2011

Target of onkeyup/down/press events

From: Giuseppe Pascale <giuseppep@opera.com>
Date: Thu, 12 May 2011 10:38:46 +0200
To: www-dom@w3.org
Message-ID: <op.vvc0ywo16ugkrk@rabdomant-ubuntu>
Hi all,
I was looking at DOM specifications and I'm a little bit confused about  
the following.

Question: (according to the spec) can an HTMLDocument receive a
keyup/down/press event?

I say according to the spec, because this works in practice (tried in
Opera,Chrome and Firefox on Ubuntu)

Anyway, if I look at the latest stable version of DOM 3 Events

I see that "Target" for these events is "Element".

Looking at the DOM2

I see that HTMLDocument -> Document -> Node, so HTMLDocument is not an

So in short, either HTMLDocument cannot receive key events or target in
DOM3 should be Node. Or I am missing something.


P.S. keep me in CC of the reply since I'm not on this list

Giuseppe Pascale
TV & Connected Devices
Opera Software - Sweden
Received on Thursday, 12 May 2011 08:41:39 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:17 UTC