- From: Harald Alvestrand <notifications@github.com>
- Date: Sat, 11 Sep 2021 02:45:56 -0700
- To: heycam/webidl <webidl@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <heycam/webidl/issues/107/917377348@github.com>
If I were to randomly propose some function on a dictionary's prototype,
I'd propose that typeof(Foo.prototype.bar) returns "string" if it's a
string and 'undefined' if it's not a valid member variable.
On Sat, Sep 11, 2021 at 5:00 AM Kagami Sascha Rosylight <
***@***.***> wrote:
> Random idea on my bed: constructors for dictionaries
>
> dictionary Foo {
>
> (DOMString or boolean) bar;
>
> } ;
> // implicitly creates an interface-like constructor
>
> "bar" in Foo.prototype // typical existence check
> new Foo({ bar: "bar" }).bar === "bar" // type support check; string in this case
>
> Problem: massive namespace pollution 🤔
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/heycam/webidl/issues/107#issuecomment-917326416>, or
> unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AADVM7O35ME5A5VD554HODLUBLA6LANCNFSM4CANVH2Q>
> .
> Triage notifications on the go with GitHub Mobile for iOS
> <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
> or Android
> <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
>
>
--
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/107#issuecomment-917377348
Received on Saturday, 11 September 2021 09:46:10 UTC