[whatwg] Fixing undo on the Web - UndoManager and Transaction

Jonas Sicking jonas at sicking.cc
Thu Oct 27 18:22:13 PDT 2011


On Thu, Oct 27, 2011 at 4:23 PM, Ryosuke Niwa <rniwa at webkit.org> wrote:
> Hi all,
> I've updated the document: http://rniwa.com/editing/undomanager.html per
> discussions.
> Summary of changes:
>
> "transaction" is renamed to "DOM transaction"
> The value of isAutomatic is read immediately before the transaction is
> applied
> Swapped the definition of clearUndo and clearRedo in the non-normative
> section to match the rest of the spec
> transact() no longer attempts to merge transactions when there are no
> transactions to merge with
> Incorporated Aryeh's feedback
> DOM state now include IDL properties and their values

Wait, the last bullet point doesn't mean that changes to IDL
properties are in general rolled back, does it? That would be
extremely hard to implement in general. It also creates all sorts of
weird behavior. Would you for example want to reset
HTMLMediaElement.currentTime? And if you set Element.innerHTML back to
the value it used to be, it will create all node Nodes.

We should just pay attention to changes to Node values, childlists,
attribute maps and possibly a few other things.

/ Jonas



More information about the whatwg mailing list