[Webkit-unassigned] [Bug 7158] WebKit needs generalized Undo mechanism for DOMNode manipulations

bugzilla-daemon at opendarwin.org bugzilla-daemon at opendarwin.org
Tue May 2 14:00:44 PDT 2006


------- Comment #3 from ttalbot at karelia.com  2006-05-02 14:00 PDT -------
No, in this case I'm specifically talking about being able to undo programmatic
changes to the DOM. I think what was hard to figure out here was who was
getting released and why, such that sending a standard
prepareWithInvocationTarget:-style message to the undo manager would not work.

For example, in Sandvox, we allow the user to attach an href= anchor element to
an arbitrary range of text. This is DOM manipulation that has to be done
programmtically. But we also want to support undoing the add/change of that
hyperlink. There's no particular mechanism for setting up an undoable DOM
change. You can see the invention I came up with to deal with this in a
previous comment. 

What I'm asking for is not having to create a new class method hack for every
DOM manipulation method and/or verification that this is the best way to do it.
Barring that, documentation on how to properly undo programmatic DOM changes.
(In this example, it was only through trial and error that I came to the
conclusion that the parentNode had to be explicitly retained by the
undoManager, hence my solution.)

Configure bugmail: http://bugzilla.opendarwin.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

More information about the webkit-unassigned mailing list