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

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

From: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
Date: Mon, 25 Jun 2012 19:23:19 -0300
Message-ID: <CAM1FioLToBWPeuEgGw_36h67Ook=CDnqziD8QQoJqVHAV9V2xw@mail.gmail.com>
To: whatwg@lists.whatwg.org
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?


Cheers,

-- 
Caio Marcelo de Oliveira Filho
openBossa @ INdT - Instituto Nokia de Tecnologia
Received on Monday, 25 June 2012 22:23:49 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:13 UTC