W3C home > Mailing lists > Public > public-script-coord@w3.org > July to September 2014

Re: [webidl] Stringifiers should allow optional arguments

From: Anne van Kesteren <annevk@annevk.nl>
Date: Fri, 11 Jul 2014 10:44:01 +0200
Message-ID: <CADnb78gSaWbgXr_YMNGWDfduS8p6RJfUn2bJ0psdTORz158B1g@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, Robin Berjon <robin@w3.org>, "public-script-coord@w3.org" <public-script-coord@w3.org>
On Wed, Jul 9, 2014 at 6:25 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> With "serializer = { attribute };" (possibly with simpler syntax!) you
> automatically get a toJSON with the behavior everyone would typically expect
> toJSON to have here.  There's value in having that shortcut so spec authors
> do not have to reinvent that wheel in prose.

That applies equally to toString(). See e.g. URLUtils.

Received on Friday, 11 July 2014 08:44:28 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:22 UTC