On 3/21/14, 5:42 PM, Jim Blandy wrote:
> On 03/21/2014 03:34 PM, Jim Blandy wrote:
>> What if these DOM nodes could use a special class of observers /
>> listeners that automatically set themselves aside when the node is
>> deleted from the document, and re-instate themselves if the node is
>> re-inserted in the document? Similarly for when the window goes away.
>
> Instead of addObserver or addMessageListener, you'd have
> observeWhileInserted or listenWhileInserted. Implemented in some
> clever and efficient way to avoid thrashing during heavy DOM manipulation.

+1e9

More of this sort of thing please. Deterministic, declarative, does what
it says on the label, easy to use correctly. The opposite of weak
references on every axis.

Stop me if you've heard this one. Some people, when confronted with a
problem, think, "I know, I'll use weak references." —Oh you've heard it?
Sorry.

-j

_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to