Re: [heycam/webidl] Need pattern for feature detecting dictionary members (#107)

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