Re: MutationObserver does not observe state changes

For me if we can just get the mapped attributes that would be a win. Right
now we have the ability to set but not read internal state using
attributes. This leads to some confusion, because it makes attributes
uni-directional, and not representative of state.

http://jsfiddle.net/ZUMze/

If such assumptions are made, that attributes are uni-directional, and
attributes *do not* represent state; In what case would someone listen for
attribute changes with MutationObservers, since they are not part of state
and may in fact be used as a misdirection attack if someone knows you are
listening for changes, but have set the internal state to bad values while
the attribute looks to be valid. Subtree sandboxing would help to stop
this, but it is not currently present.


On Wed, Jul 31, 2013 at 10:35 AM, Domenic Denicola <
domenic@domenicdenicola.com> wrote:

> From: Anne van Kesteren [annevk@annevk.nl]
>
> > Given that this internal state is a per-node affair, I'm not sure we can
> provide a coherent API.
>
> Well, as long as such state is exposed via changing properties, I think
> `Object.observe` is the ideal coherent API. But that's obviously a ways
> out, and yes, until then I guess we can just keep adding events everywhere.
>
> Thanks, I think the tree-modification vs. internal state distinction was
> important, and for me at least clarifying.
>

Received on Wednesday, 31 July 2013 15:51:23 UTC