Re: Mutation events replacement

On 7/2/2011 8:50 PM, Boris Zbarsky wrote:
> On 7/2/11 1:46 PM, John J. Barton wrote:
>> 2) element transformation. The replacement fires "after" a mutation.
>> Library or tools that want to transform the application dynamically want
>> to get notification "before" the mutation. A common solution then is
>> to bracket changes:
>> "beforeChange" or "onModelChanging"
>> "afterChange" or "onModelChanged"
>
> This really only works if you trust the listeners.  The browser core 
> can't trust scripted listeners using Web APIs.....
I don't understand what 'trust' means here.  I am not proposing any 
change to the privileges of listeners. How can the browser core "trust" 
an 'onModelChanged' listener but not an 'onModelChanging' listener?
>
>>  So, for example, I can't see how to implement
>> JS pre-processing using only the after event. (This may not be
>> possible with the current mutation events either, but it is something
>> I want to to).
>
> It's not clear that you need a web-facing API for your use case, 
> though....
If you consider the Web a read-only service, with 'write' restricted to 
non-Web technologies, then lots of things are easier I agree. But if you 
believe as I do that the Web should be fully functional then we should 
push to make improvements.  Recompilation of JS, CSS, and HTML is 
already happening and I expect it to continue to grow. If this use case 
is excluded from Web API, then non-Web apis will be used.

jjb


>
> -Bori
>

Received on Sunday, 3 July 2011 15:42:15 UTC