W3C home > Mailing lists > Public > public-html@w3.org > September 2007

designMode and event listeners (detailed review of Editing)

From: Simon Pieters <simonp@opera.com>
Date: Thu, 06 Sep 2007 13:25:43 +0200
To: public-html <public-html@w3.org>
Message-ID: <op.tx8co5aqidj3kv@hp-a0a83fcd39d2.palace.opera.no>

(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

This archive was generated by hypermail 2.4.0 : Saturday, 9 October 2021 18:44:21 UTC