- From: Kagami Sascha Rosylight <notifications@github.com>
- Date: Fri, 10 Sep 2021 20:00:59 -0700
- To: heycam/webidl <webidl@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Saturday, 11 September 2021 03:01:11 UTC
Random idea on my bed: constructors for dictionaries
```webidl
dictionary Foo {
(DOMString or boolean) bar;
} ;
// implicitly creates an interface-like constructor
```
```js
"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 or view it on GitHub:
https://github.com/heycam/webidl/issues/107#issuecomment-917326416
Received on Saturday, 11 September 2021 03:01:11 UTC