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

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

From: Jonas Sicking <jonas@sicking.cc>
Date: Fri, 5 Aug 2011 10:20:08 -0700
Message-ID: <CA+c2ei-01xzDaeqBkD68GKXciTWrZ8fctY9xazEqCa90FF9H8g@mail.gmail.com>
On Fri, Aug 5, 2011 at 10:01 AM, Ryosuke Niwa <rniwa at webkit.org> wrote:
> On Fri, Aug 5, 2011 at 9:57 AM, Jonas Sicking <jonas at sicking.cc> wrote:
>>
>> Why treat documentElement specially here? Just make the documentElement
>> *not* have a undoManager by default and have it just use it's ancestor's,
>> just like all other elements.
>>
>> The document is an ancestor of the documentElement after all.
>
> Anne had a different idea to make documentElement have the root undoManager
> to avoid adding a new property to Document. ?I personally like your approach
> but I don't know enough about Web IDLs to give a call.
> Anyone else have opinions on this?

I don't think this is a WebIDL issue really.

Given the inconsistencies that it introduces in that a property
appears on documentElement, but isn't actually associated with the
element, and the fact that people will have to wrote the longer syntax
"document.documentElement.undoManager" rather than
"document.undoManager", I think it's better to just expose it on the
Document.

Adding things to the Window object is always iffy as that's the global
object, adding things to Document isn't really a big deal IMHO.

/ Jonas
Received on Friday, 5 August 2011 10:20:08 UTC

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