Re: trusted property

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 UTC