[Bug 23226] Need for Virtual MutationRecords

https://www.w3.org/Bugs/Public/show_bug.cgi?id=23226

--- Comment #2 from Bradley Meck <bradley.meck@gmail.com> ---
(In reply to Olli Pettay from comment #1)
> > Therefore, I propose something like smaug mentioned in the #whatwg IRC:
> > 
> > * node.notifyMutationObservers({property: "value"});
> I assume you don't mean here that there is automatic
> notification when value property has changed, since observing properties
> would be really hard and slow.
> 

Correct, the process would be manual, not automatic. This is opt-in and default
notification would only occur for things that currently have state that is not
observable with only the DOM attributes, such as <input>, <select>, and
<textarea>.

There was talk of using something like Object.observe for automatic
notification, but as you said, this would most likely be slow. And may cause
confusion when storing symbol keyed values or private data on Nodes.

> 
> > 
> > Which would create something like:
> > 
> > {property:"value", target: node, type: "virtual"}
> 
> So MutationRecord would have to be extended to have also attribute
> 'property'?

I think that would be the best course of action. We could overload
attributeName, but I would be hesitant of having the same name for very
different concepts (name of HTML attribute vs scripting property name).

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Thursday, 12 September 2013 19:10:58 UTC