W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2010

Re: trusted property

From: Olli Pettay <Olli.Pettay@helsinki.fi>
Date: Wed, 03 Mar 2010 17:54:01 +0200
Message-ID: <4B8E8619.2000000@helsinki.fi>
To: "Hallvord R. M. Steen" <hallvord@opera.com>
CC: www-dom@w3.org

trusted is defined in XBL2, and IMO
it would make sense to expose that to all events, also
in platforms which don't support XBL2.

On 3/3/10 5:30 PM, Hallvord R. M. Steen wrote:
> I'm not sure what the use case is for exposing a "trusted" property to
> normal scripts. It also seems rather draconian to say that "All other
> untrusted events must behave as if the Event.preventDefault() method had
> been called on that event". This comes right after a sentence saying
> "should not trigger default actions". So is this a "should" or a "must"
> requirement for an implementor?
This is actually a bit tricky, because IIRC, because of backward 
compatibility dispatching key events should trigger default action at
least in some cases, i.e. when dispatching events to <input> elements or so.

> Also, it may need to say that setting properties directly on the event
> object should change event.trusted to false? E.g. some browsers let me
> set event.keyCode for a key event. Having done that the event is
> presumably no longer "trusted"?
keyCode should be readonly property.

And setting properties to a trusted event shouldn't change its status.
I assume platforms would internally still check whether it is trusted
or not and use the original values.

Received on Wednesday, 3 March 2010 15:54:50 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:36:56 UTC