diff --git a/index.html b/index.html index 35e23aa5..f6f13c5f 100644 --- a/index.html +++ b/index.html @@ -356,7 +356,8 @@

  • If the current settings object's responsible document is not allowed to use the feature indicated by attribute name - allowpaymentrequest, then throw a SecurityError. + allowpaymentrequest, then throw a + "SecurityError" DOMException.
  • Let parsedMethodData be an empty list.
  • @@ -606,7 +607,8 @@

    which the method is called.
  • If the value of request.[[\state]] is not - created then throw an InvalidStateError. + created then throw an "InvalidStateError" + DOMException.
  • Set the value of request.[[\state]] to interactive. @@ -631,8 +633,8 @@

  • If this consultation produced no supported method of paying, then - reject acceptPromise with a NotSupportedError, and - abort this algorithm. + reject acceptPromise with a "NotSupportedError" + DOMException, and abort this algorithm.
  • @@ -683,7 +685,8 @@

    which the method is called.

  • If the value of request.[[\state]] is not - interactive then throw an InvalidStateError. + interactive then throw an "InvalidStateError" + DOMException.
  • Let promise be a new Promise.
  • @@ -694,14 +697,14 @@

    remaining user interface.
  • If it is not possible to abort the current user interaction, then - reject promise with InvalidStateError and abort - this algorithm. + reject promise with "InvalidStateError" + DOMException and abort this algorithm.
  • Set the value of the internal slot request.[[\state]] to closed.
  • Reject the promise request.[[\acceptPromise]] - with an AbortError. + with an "AbortError" DOMException.
  • Resolve promise with undefined.
  • @@ -719,8 +722,8 @@

    any of the desired payment methods supplied to the PaymentRequest constructor, and false if none are supported. If the method is called too often, the user agent might instead - return a promise rejected with a QuotaExceededError, at its - discretion. + return a promise rejected with a "QuotaExceededError" + DOMException, at its discretion.

    The canMakePayment method MUST act as follows: @@ -730,10 +733,12 @@

    which the method was called.
  • If request.[[\state]] is not created, - then return a promise rejected with an InvalidStateError. + then return a promise rejected with an "InvalidStateError" + DOMException.
  • Optionally, at the user agent's discretion, return a - promise rejected with a QuotaExceededError. + promise rejected with a "QuotaExceededError" + DOMException.

    This allows user agents to apply heuristics to detect and prevent abuse of the canMakePayment method for fingerprinting @@ -1670,7 +1675,8 @@

  • Let promise be a new Promise.
  • If the value of the internal slot [[\completeCalled]] is - true, then throw an InvalidStateError. + true, then throw an "InvalidStateError" + DOMException.
  • Set the value of the internal slot [[\completeCalled]] to true. @@ -1812,17 +1818,18 @@

  • If target is not a PaymentRequest object, then throw a TypeError.
  • -
  • If the dispatch flag is unset, then throw an - InvalidStateError. +
  • If the dispatch flag is unset, then throw an + "InvalidStateError" DOMException.
  • If [[\waitForUpdate]] is true, then throw an - InvalidStateError. + "InvalidStateError" DOMException.
  • If target.[[\state]] is not - interactive, then throw an InvalidStateError. + interactive, then throw an "InvalidStateError" + DOMException.
  • If target.[[\updating]] is true, then - throw an InvalidStateError. + throw an "InvalidStateError" DOMException.
  • Set the stop propagation flag and stop immediate propagation flag. @@ -1871,7 +1878,7 @@

  • Reject the promise target.[[\acceptPromise]] with an - AbortError. + "AbortError" DOMException.
  • @@ -2369,9 +2376,31 @@

    The Event type and the terms fire an event, dispatch flag, stop propagation flag, and stop immediate propagation flag are defined by [[!DOM4]]. + +
    + Web IDL +
    +
    + When this specification says to throw an error, the user agent + must throw an error as described in [[!WEBIDL-2]]. When this occurs + in a sub-algorithm, this results in termination of execution of the + sub-algorithm and all ancestor algorithms until one is reached that + explicitly describes procedures for catching exceptions. +

    + The term extended attribute is defined by [[!WEBIDL-2]]. +

    +

    + The algorithm for converting an ECMAScript value to a + dictionary and for converting a dictionary to an + ECMAScript value is defined by [[!WEBIDL-2]]. +

    +
    +

    - DOMException and the following DOMException types from - [[!DOM4]] are used: + DOMException and the + following DOMException types from [[!WEBIDL-2]] are used:

    @@ -2384,7 +2413,8 @@

    - AbortError + AbortError The payment request was aborted @@ -2392,7 +2422,8 @@

    - InvalidStateError + InvalidStateError The object is in an invalid state @@ -2400,7 +2431,8 @@

    - NotSupportedError + NotSupportedError The payment method was not supported @@ -2408,7 +2440,8 @@

    - QuotaExceededError + QuotaExceededError The
    - SecurityError + SecurityError The operation is only supported in a secure context @@ -2427,25 +2461,6 @@

    -
    - Web IDL -
    -
    - When this specification says to throw an error, the - user agent must throw an error as described in [[!WEBIDL-2]]. - When this occurs in a sub-algorithm, this results in termination of - execution of the sub-algorithm and all ancestor algorithms until one - is reached that explicitly describes procedures for catching - exceptions. -

    - The term extended attribute is defined by [[!WEBIDL-2]]. -

    -

    - The algorithm for converting an ECMAScript value to a - dictionary and for converting a dictionary to an - ECMAScript value is defined by [[!WEBIDL-2]]. -

    -
    Secure Contexts