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

> @marcoscaceres could you elaborate?

Sure, my experience has been that internal slots generally only hold booleans, strings, promises, dictionaries, or other IDL types. For example, generally speaking [`PaymentRequest`'s internal slots](https://w3c.github.io/payment-request/#internal-slots) have these types:
 
```JS
list<string> [[serializedMethodData]] 
list<string> [[serializedModifierData]]
object [[details]]
PaymentOptions [[options]]
string [[state]]
boolean [[updating]]
promise [[acceptPromise]]
PaymentResponse [[response]]
```

Which are either IDL type or infra types. Ideally, I'd like to just declare them upfront in the IDL. So I guess part of the ask is for us to try to unify on the infra types as primitives. 

Thus, would really like something like this:

```Java
interface PaymentRequest : EventTarget {
  slot list<string> [[serializedMethodData]]; 
  slot list<string> [[serializedModifierData]];
  slot object [[details]];
  slot PaymentOptions [[options]];
  slot string [[state]];
  slot boolean [[updating]];
  slot Promise [[acceptPromise]];
  slot PaymentResponse [[response]];
  /* good old IDL attributes, operations, etc. */
};
```


-- 
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-476113028

Received on Monday, 25 March 2019 09:17:21 UTC