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

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

From: timeless <timeless@gmail.com>
Date: Wed, 21 Sep 2011 16:30:13 -0400
Message-ID: <CAACrNNeYLTRYgR-BFLzKv7kMucg4jhSGdDW4xCqDtC_r3sAkYg@mail.gmail.com>
There's nothing wrong with the idl specifying apply(DOMString reason);

Reason will be "" for normal applications and "reapply" for reapply cases.

That still gives you a truth value, and it gives something more
meaningful to callees.

On 9/21/11, Ryosuke Niwa <rniwa at webkit.org> wrote:
> So the argument is that authors will never call apply themselves. Only
> browsers would. If you can come up with a use case where authors need to
> call apply function with a boolean value, then I'm more than happy to drop
> the boolean argument and just have apply, unapply, reapply.
>
> - Ryosuke
>
> On Wed, Sep 21, 2011 at 8:17 AM, Aryeh Gregor <ayg at aryeh.name> wrote:
>
>> On Tue, Sep 20, 2011 at 10:13 PM, Ryosuke Niwa <rniwa at webkit.org> wrote:
>> > void apply(in boolean isReapply)
>>
>> I haven't been following the substance of apply vs. reapply etc., but
>> as I said before, could you not make this a boolean argument?  How are
>> authors supposed to remember whether it's apply(true) that means
>> reapply or apply(false)?  You should instead make the argument
>> something that contains the word "reapply" somewhere, like maybe a
>> space-separated list of case-insensitive tokens where any token other
>> than "reapply" is ignored.  So you'd do apply("reapply") if you wanted
>> to reapply, and other flags could be added later if desired.  This is
>> both more comprehensible and more extensible.
>>
>

-- 
Sent from my mobile device
Received on Wednesday, 21 September 2011 13:30:13 UTC

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