[whatwg] Additional onxxxx event attributes for DOM Level3 Events

2010-08-16 Thread Hajime Morita
Hi,

I noticed that some events which are defined in DOM Level3 Events [1] don't have
associated HTML attributes.
For example, keypress event has associated onkeypress attribute.
But focusin event doesn't have onfocusin attribute.

Here is a list:

* wheel event
* textInput event
* focusin event
* focusout event
* compositionstart event
* compositionupdate event
* compositionend event
* DOMXxxx events

I think these events should have associated attributes defined.
DOM mutation events might be better to skip due to its long name and rare usage.
But it's just a preference and not a strong opinion.

How do you think?

Regards.
-- 
morita


[whatwg] Selection API compatibility on exceptions

2010-04-01 Thread Hajime Morita
Hi,
I'm working on WebKit and I found that there are an inconsistency
between spec and implementations around Selection API.

Some Selection APIs including collapse(), selectAllChildren() take DOM
nodes as arguments. And the spec says Selection should throw
WRONG_DOCUMENT_ERROR
if if the given node is in a different document.
But neither Firefox, Opera, and Webkit throws such exception.
They accept foreign nodes (Firefox), or just gnore them (WebKit).
(I couldn't figure out how Opera behaves. It allows API to be called,
but nothing seems happen even with valid nodes.)
You can walk Selection behaviour with http://www.dodgson.org/t/selections.html

Although it is ideal to throwing exceptions, it may break existing
applications which depend current generous behaviour.
So it looks reasonable for me to change the spec to say not to throw
exceptions for foreign nodes, and just ignore them instead.

Any ideas?
-- 
morita


[whatwg] Typo on Selection API

2010-03-31 Thread Hajime Morita
Hi,
There is a typo on selection API name:

http://www.whatwg.org/specs/web-apps/current-work/#selection
selection . collapsed(parentNode, offset)
Replaces the selection with an empty one at the given position.
Throws a WRONG_DOCUMENT_ERR exception if the given node is in a different 
document.
collapsed - collapse.

The typo is only on the description part. It is OK for IDL.

Regards.

-- 
morita