W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2011

Re: [DOMCore] fire and dispatch

From: Ojan Vafai <ojan@chromium.org>
Date: Thu, 3 Mar 2011 11:21:14 +1100
Message-ID: <AANLkTi=wosnxEYWzZGiNP25SNKg6VOG_1j8h-3wa6tT-@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: Jonas Sicking <jonas@sicking.cc>, Anne van Kesteren <annevk@opera.com>, Aaron Boodman <aa@chromium.org>, Garrett Smith <dhtmlkitchen@gmail.com>, WebApps WG <public-webapps@w3.org>
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.

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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:16 UTC