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

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