Re: [heycam/webidl] [wip] First pass at adding internal slots (#495)

I really like this part of @domenic's suggestion:

```idl
interface Whatever {
  readonly attribute DOMString foo <- [[foo]];
}
```

Which would give `[[foo]]` a `DOMString` type.

It should be possible to do things like:

```idl
interface Whatever {
  [EnforceRange] unsigned long long [[bar]];
}
```

In this case `[[bar]]` is typed, and assigning a negative number to it will throw.

```idl
interface Whatever {
  [[thing]];
}
```

In this case, `[[thing]]` is untyped, and may be any IDL or infra type.

The distinction I want from slots (maybe this is stating the obvious) is that the values may not be changed/mutated from another thread.

-- 
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/pull/495#issuecomment-501663129

Received on Thursday, 13 June 2019 11:27:33 UTC