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

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

From: Ryosuke Niwa <rniwa@webkit.org>
Date: Fri, 12 Aug 2011 15:10:29 -0700
Message-ID: <CABNRm61R8n6u=WYATWDndjqXXLb73Py8O6CryZPQnuAyQyjbVg@mail.gmail.com>
On Fri, Aug 12, 2011 at 3:07 PM, Ehsan Akhgari <ehsan at mozilla.com> wrote:

> On 11-08-09 6:36 PM, Jonas Sicking wrote:
>> Sure, your API is more convenient in certain situations. But it also
>> encourages code duplication (I'll note that in the examples you
>> originally provided in this thread you always ended up duplicating
>> code between apply/reapply), which easily leads to bugs.
> I think this is a very important point, and this downside makes me think
> that we shouldn't expose a reapply API.  Since almost every case that I can
> think of where having a reapply function would make more sense requires
> authors to maintain other state information in their transaction objects, I
> don't think that maintaining one more boolean flag is going to make things
> noticeably harder for them.

But having authors add flag in almost all cases isn't that nice either.

- Ryosuke
Received on Friday, 12 August 2011 15:10:29 UTC

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