[w3c/payment-handler] Move normative requirements on PaymentRequestEvent to the processing model (#262)

This is similar to #261. Normally for interfaces, their attribute definitions contain normative text. But events are kind of special, and instead you want to define everything when you initialize them.

Right now you have things like

> This attribute is a string that indicates the origin of the top level payee web page. The string MUST be formatted according to the "Unicode Serialization of an Origin" algorithm defined in section 6.1 of [RFC6454]. 

which is then contradicted by the processing model

> Set the topLevelOrigin attribute of e to the origin of the top level payee web page.

Here it's setting topLevelOrigin to an [origin](https://html.spec.whatwg.org/multipage/origin.html#concept-origin), which is not a string.

Instead, the split should be more like

> Returns a string that indicates the origin of the top level payee web page. Initialized by "Handling a PaymentRequestEvent".

(it's OK to be imprecise in this description.)

plus

> Set the topLevelOrigin attribute of e to the serialization of the origin of the top level payee web page.

(Linking serialization in both cases to https://html.spec.whatwg.org/multipage/origin.html#ascii-serialisation-of-an-origin, per #260.)

-- 
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/payment-handler/issues/262

Received on Friday, 16 March 2018 02:49:58 UTC