Re: [heycam/webidl] Represent objects with both specified and unspecified members (#568)

>I don't know what's going on with the keyframes case; too much prose.

```webidl
dictionary Keyframe {
    // ... property-value pairs ...
    // i.e. DOMString propertyName
    double?             offset = null;
    DOMString           easing = "linear";
    CompositeOperation  composite;
};
```

```js
// This constructor receives `sequence<Keyframe>`, but specced as `object`
new SharedKeyframeList([
  { transform: 'translateY(0px)' }, // a key-value pair not specced in Keyframe, but has a meaning
  { transform: 'translateY(-300px)' }
]);
```

The spec's algorithm gets the ES object, run [the ES-to-dictionary conversion](https://heycam.github.io/webidl/#es-to-dictionary) explicitly (without help of IDL), and then again [extracts remaining fields](https://drafts.csswg.org/web-animations/#idl-attribute-name-to-animation-property-name) from the original object.

-- 
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/568#issuecomment-398427598

Received on Tuesday, 19 June 2018 14:51:33 UTC