designMode and event listeners (detailed review of Editing)

(This is part of my detailed review of the Editing section.)

The spec says about designMode:

    Enabling designMode causes scripts in general to be disabled and the
    document to become editable.

    When the Document has designMode enabled, event listeners registered on
    the document or any elements owned by the document must do nothing.

Shouldn't the first paragraph be phrased as a requirement, as in "scripts  
that are in the document must not be executed"?

The second paragraph doesn't match what Firefox does. This is how it works  
in Firefox, AFAICT:

When you set designMode="on" on a document, all event listeners that were  
registered on the document with addEventListener() with a script that was  
itself in the same document must be ignored. Additionally, all event  
listeners that were registered using onXXX="" attributes in the markup, as  
well as .onXXX DOM attributes, must be ignored, regardless of where they  
came from.

This is required because editing apps still want to be able to listen to  
events in the document for e.g. context menus.

-- 
Simon Pieters
Opera Software

Received on Thursday, 6 September 2007 11:25:50 UTC