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
Hi,

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.


-Olli
Received on Wednesday, 3 March 2010 15:54:50 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:14:04 GMT