- From: Boris Zbarsky <notifications@github.com>
- Date: Fri, 28 Sep 2018 05:39:36 -0700
- To: heycam/webidl <webidl@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Friday, 28 September 2018 12:39:57 UTC
> You mean in the event that someone passes undefined?
Yes.   So given this IDL:
    dictionary Foo  {
      long x = 5;
    };
    [Constructor]
    interface Bar {
      void myMethod(optional Foo foo, long baz);
    };
and this JS:
    new Bar().myMethod(undefined, 3);
is there a reason to support the "foo" arg being missing as opposed to being an empty dictionary (or more precisely a dictionary with an `x` member whose value is `5`)?   And yes, this is a pretty weird API and people shouldn't really create APIs like this.
-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/issues/76#issuecomment-425422576
Received on Friday, 28 September 2018 12:39:57 UTC