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

[Bug 26303] Add a way to have required dictionary entries

From: <bugzilla@jessica.w3.org>
Date: Sat, 23 Aug 2014 13:18:55 +0000
To: public-script-coord@w3.org
Message-ID: <bug-26303-3890-BaEqqD9JQo@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=26303

--- Comment #6 from Boris Zbarsky <bzbarsky@mit.edu> ---
We did, but that doesn't work for APIs like webcrypto which want to take
different dictionaries depending on the type of algorithm and some of those
dictionaries want to have some required entries.  You can't even really do that
with overloading, since the behavior depends on the value of a string argument
(the algorithm name).

People clearly shouldn't _abuse_ this functionality to create functions which
just have a single dictionary argument instead of several useful ones, but
there are use cases where doing this makes sense.

Fwiw, https://github.com/heycam/webidl/pull/17

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Received on Saturday, 23 August 2014 13:18:57 UTC

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