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

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

From: Ryosuke Niwa <rniwa@webkit.org>
Date: Sat, 10 Sep 2011 19:01:09 -0700
Message-ID: <CABNRm60XpULXhkbc7FFafVPF=Gt0fN_nJ1M3SCjKMzBGmcb7oQ@mail.gmail.com>
On Tue, Aug 30, 2011 at 7:22 PM, Jonas Sicking <jonas at sicking.cc> wrote:
>
> I'm really failing to think of a case when you'd really want to have
> apply and reapply as separate callbacks. Even in the most trivial
> cases it seems like it would lead to code duplication which is
> something that even the most basic developers try to avoid. And
> especially in more complex scenarios like collaborative editors it
> seems like you really wouldn't want to duplicate the logic between
> apply and reapply.
>
> So once we have the boolean argument to apply, I fail to see any cases
> where the reapply approach is better. I'd love to see some examples if
> you have any?
>

One more reason not to add the boolean argument is that apply function is
supplied in both automatic and manual transactions yet reapply call never
happens in automatic transactions. This makes odd for apply function to take
the boolean argument in automatic case.

- Ryosuke
Received on Saturday, 10 September 2011 19:01:09 UTC

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