W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2011

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

From: Jonas Sicking <jonas@sicking.cc>
Date: Thu, 27 Oct 2011 18:22:13 -0700
Message-ID: <CA+c2ei_2qqx3R9F5_hPp0g4zXdb0sjtrgoMizXYUeSWXGz4LVw@mail.gmail.com>
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
Received on Thursday, 27 October 2011 18:22:13 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:37 UTC