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

Aryeh Gregor ayg at aryeh.name
Wed Sep 21 08:17:49 PDT 2011

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.

More information about the whatwg mailing list