Re: [DOMCore] fire and dispatch

On Thu, Mar 3, 2011 at 1:46 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote:

> On 3/2/11 5:52 AM, Jonas Sicking wrote:
>
>> I'm not quite sure what you mean by "via JSON" given that JSON is a
>> serialization format.
>>
>
> The idea would be to take the input object, sanitize it by doing
>
>  obj = JSON.parse(JSON.serialize(obj));
>
> (which will get rid of crud like getters), and then work with it.
>
>
>  1. Don't allow getters, i.e. if the object contains any getters, throw
>> an exception
>>
>
> This seems like the simplest solution.


Unless anyone has significant use-cases for getters, we could start with
this. I don't expect code to start depending on throwing an exception
here, so we change it down the road if we need to.

Ojan

Received on Thursday, 3 March 2011 00:22:04 UTC