W3C home > Mailing lists > Public > whatwg@whatwg.org > July 2012

Re: [whatwg] UndoManager: rationale for having undoManager.position and undoManager.item?

From: Ryosuke Niwa <rniwa@webkit.org>
Date: Thu, 19 Jul 2012 15:32:21 -0700
Message-ID: <CABNRm60NSppfmWd34p89YWfEri9TOk2in-+-b-21j7QqW+SSXw@mail.gmail.com>
To: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
Cc: whatwg@lists.whatwg.org
On Mon, Jun 25, 2012 at 3:23 PM, Caio Marcelo de Oliveira Filho <
caio.oliveira@openbossa.org> wrote:

> Hi,
>
> In the June 8, 2012 version, there's a note after the description of
> undoManager.item:
>
> "Note: Being able to access an arbitrary element in the undo
> transaction history is needed to allow scripts to determine whether
> new DOM transaction and the last DOM transaction should being to the
> same entry or not."
>
> I'm guessing undoManager.position exists to be used together with
> undoManager.item to achieve this.
>
> After checking the problem descriptions again
> (http://wiki.whatwg.org/wiki/UndoManager_Problem_Descriptions), I'm
> wondering if the use case is only checking the last transaction,
> couldn't we have a smaller API? Or we have other situations where
> "peeking" in the undo stack is desired? Maybe is needed for a specific
> case in Collaborative editing that I couldn't grasp in the problem
> description?
>

There was a use case for collaborative editing case where developers wanted
to be able to modify undo stack as the remote data model changes but I
suppose they could achieve the same effect by removing all entries in the
undo manager & adding new entries?

- Ryosuke
Received on Thursday, 19 July 2012 22:33:10 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:09 GMT