diff --git a/index.html b/index.html index 54fee5d8..cea8a6ea 100644 --- a/index.html +++ b/index.html @@ -152,7 +152,7 @@

Non-goals

A user agent MUST behave as described in this specification in order to be considered conformant. In this specification, user agent means a Web - browser or other interactive user agent as defined in [[!HTML5]]. + browser or other interactive user agent as defined in [[!HTML51]].

User agents MAY implement algorithms given in this @@ -185,10 +185,11 @@

Dependencies

The term Payment Method Identifier is defined by the Payment Method Identifiers specification [[!METHOD-IDENTIFIERS]].
-
HTML5
+
HTML 5.1
The terms global object, - queue a task, browsing context, and - top-level browsing context are defined by [[!HTML5]].
+ boolean attribute, reflect, iframe, + queue a task, browsing context, nested browsing context, and + top-level browsing context are defined by [[!HTML51]].
ECMA-262 6th Edition, The ECMAScript 2015 Language Specification
The terms Promise, internal slot, TypeError, JSON.stringify, and JSON.parse are @@ -354,15 +355,9 @@

PaymentRequest constructor

  • If the browsing context of the script calling the constructor is - not a top-level browsing context, then throw a SecurityError. -
    -

    There is an open issue about requiring - a top-level browsing context for using PaymentRequest. Requiring one - is a mitigation for a user being tricked into thinking a trusted site is asking for - payment when in fact an untrusted iframe is asking for payment. The problem is some iframes may - have a legitimate reason to request payment.

    -
    + a nested browsing context whose origin is different from the top-level browsing context's + origin and the nested browsing context is not allowed to make payment requests, then throw + a SecurityError.
  • If details does not contain a value for total, then throw a @@ -1110,6 +1105,38 @@

    Internal Slots

    +
    +

    PaymentRequest and iframes

    +

    + There are some circumstances where a cross-origin iframe wants to make a payment + request. A cross-origin iframe needs explicit permission from the embedding page to invoke + the payment request API. +

    +

    + The HTMLIFrameElement is extended with an allowpaymentrequest + content attribue. allowpaymentrequest is a boolean attribute. + When specified, it indicates that scripts in the iframe element's browsing context are + allowed to make payment requests (if it's not blocked for other reasons, e.g. + there is another ancestor iframe without this attribute set). +

    +
    +

    HTMLIFrameElement extension

    +

    The iframe DOM interface is extended as follows:

    +
    +      partial interface HTMLIFrameElement {
    +          attribute boolean allowPaymentRequest;
    +      };
    +    
    +
    +
    allowPaymentRequest
    +
    + The allowPaymentRequest IDL attribute MUST reflect the + allowpaymentrequest content attribute. +
    +
    +
    +
    +

    Events