[heycam/webidl] Some means to signal that a method requires user action to be called (#479)

Certain things in the platform require that they be initiated by user action to have an effect. For example, in `PaymentRequest`, a developer shouldn't be allow to call the `.show()` method unless the user clicked on something (within a reasonable amount of time). 

Could we add an extended attribute to WebIDL that indicates "a call to this method requires user action"? 

Like: 

```IDL
interface PaymentRequest {
  [UserGated] Promise<PaymentResponse> show();
};
```

And then we could work out a common security model for what "UserGated" (please bikeshed) means in the platform based on existing APIs that rely on this behavior.   

(Apologies, I'm sure I've asked for this before but couldn't find the issue... it's come up again, so wanted to have another go at it as I think it could be universally beneficial). 

-- 
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/479

Received on Thursday, 23 November 2017 02:54:34 UTC