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: Thu, 11 Aug 2011 14:56:06 -0700
Message-ID: <CABNRm63rQ-2MwM1PC9k2xhsfYaLaXYgupKPNq4SVr7dOeo5PLA@mail.gmail.com>
On Thu, Aug 11, 2011 at 2:53 PM, Ehsan Akhgari <ehsan at mozilla.com> wrote:
> I think the confusion is arising because you chose to attach undoManager to
> elements, not nodes.  Note that document _is_ a node in the DOM, but it's
> not an element.  I think we should just modify the spec to attach
> undoManager to nodes.  Once we have that, we don't need to treat
> documentElement specially at all, it just looks at its parent (the document
> node) and gets the undoManager from there.

Makes sense.

The only downside is that we should explicitly prohibit some node types from
> having an undoManager where it doesn't make sense (such as text nodes,
> comment nodes, etc.).  We can enumerate them explicitly and say that
> accessing the undoManager on these types of nodes will throw.

Alternatively, can we say that only Element and Document are allowed to have

- Ryosuke
Received on Thursday, 11 August 2011 14:56:06 UTC

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