- From: Adrian Hope-Bailie <notifications@github.com>
- Date: Wed, 20 Apr 2016 09:19:09 -0700
- To: w3c/browser-payment-api <browser-payment-api@noreply.github.com>
- Cc:
Received on Wednesday, 20 April 2016 16:20:21 UTC
@msporny, I think you misinterpreted my comment or perhaps I misunderstand your intent.
As someone that is not intimately familiar with how a browser processes input I have some questions. Assuming a browser API is defined that accepts the following message (described using WebIDL):
```
interface HelloApi {
void sayHello(HelloWorld message);
};
dictionary HelloWorld {
required DOMString title;
required DOMString message;
};
```
And a website calls that API with the following code:
```javascript
//Assume hello is an instance of HelloApi...
hello.sayHello({
title: "Hello",
message: "World",
otherThing: "!"
});
```
I would expect the browser to throw an error, no? If so, how do we define a fully extensible message in WebIDL when its not possible to allow for extra top-level members?
Do we simply accept a parameter of type `object` and describe the data model loosely in the messages spec? I think that the browser vendors have already said that's not a workable solution.
---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/browser-payment-api/issues/146#issuecomment-212498284
Received on Wednesday, 20 April 2016 16:20:21 UTC