From 5eb2899146ac87a5973ff2826d2bb483b19544b2 Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Tue, 27 Feb 2018 16:05:40 +0100 Subject: [PATCH 1/2] Use SetIntegrityLevel instead of Object.freeze() Verbose, but clear and correct. Fixes #74. --- notifications.bs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/notifications.bs b/notifications.bs index 8d57720..c59327c 100644 --- a/notifications.bs +++ b/notifications.bs @@ -909,13 +909,13 @@ return the notification's require interaction prefere result of the following steps:
    -
  1. Let frozenActions be an empty list of type {{NotificationAction}}. +

  2. Let frozenActions be a new list.

  3. For each entry in the notification's list of actions, perform the following steps:

      -
    1. Let action be a new {{NotificationAction}}. +

    2. Let action be a new {{NotificationAction}} dictionary.

    3. Set action's {{NotificationAction/action}} to entry's name. @@ -926,15 +926,15 @@ result of the following steps:

    4. Set action's {{NotificationAction/icon}} to entry's icon URL. - -

    5. Call Object.freeze on action, to - prevent accidental mutation by scripts. +

    6. Let jsAction be action, converted to an ECMAScript value. -

    7. Append action to frozenActions. +

    8. Perform SetIntegrityLevel(jsAction, "frozen"). + +

    9. Let idlAction be jsAction, converted to an IDL value. + + +

    10. Append idlAction to frozenActions.

  4. Create a frozen array from frozenActions. @@ -1224,8 +1224,8 @@ urlPrefix: https://w3c.github.io/vibration/ text: validate and normalize urlPrefix: #idl-def-; type: interface text: VibratePattern; url: vibratepattern -urlPrefix: https://tc39.github.io/ecma262/#sec-object.; type: dfn - text: freeze +urlPrefix: https://tc39.github.io/ecma262/#sec-; spec: ECMA-262; type: abstract-op + text: SetIntegrityLevel

    
    From 9e4392db003ddd5bfd9e1ef4441e185df515f148 Mon Sep 17 00:00:00 2001
    From: Anne van Kesteren 
    Date: Tue, 27 Feb 2018 16:08:10 +0100
    Subject: [PATCH 2/2] nit
    
    ---
     notifications.bs | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/notifications.bs b/notifications.bs
    index c59327c..8c63c5c 100644
    --- a/notifications.bs
    +++ b/notifications.bs
    @@ -928,7 +928,7 @@ result of the following steps:
     
         
  5. Let jsAction be action, converted to an ECMAScript value. -

  6. Perform SetIntegrityLevel(jsAction, "frozen"). +

  7. Perform SetIntegrityLevel(jsAction, "frozen").

  8. Let idlAction be jsAction, converted to an IDL value.