OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved. | 3 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 22 matching lines...) Expand all Loading... |
33 | 33 |
34 enum NotificationPermission { | 34 enum NotificationPermission { |
35 "default", | 35 "default", |
36 "denied", | 36 "denied", |
37 "granted" | 37 "granted" |
38 }; | 38 }; |
39 | 39 |
40 // https://notifications.spec.whatwg.org/#api | 40 // https://notifications.spec.whatwg.org/#api |
41 | 41 |
42 [ | 42 [ |
| 43 ActiveScriptWrappable, |
| 44 ConstructorCallWith=ExecutionContext, |
| 45 Constructor(DOMString title, optional NotificationOptions options), |
| 46 DependentLifetime, |
| 47 Exposed=(Window,Worker), |
43 GarbageCollected, | 48 GarbageCollected, |
44 DependentLifetime, | |
45 Constructor(DOMString title, optional NotificationOptions options), | |
46 ConstructorCallWith=ExecutionContext, | |
47 Exposed=(Window,Worker), | |
48 MeasureAs=NotificationCreated, | 49 MeasureAs=NotificationCreated, |
49 RaisesException=Constructor, | 50 RaisesException=Constructor, |
50 RuntimeEnabled=Notifications, | 51 RuntimeEnabled=Notifications, |
51 ] interface Notification : EventTarget { | 52 ] interface Notification : EventTarget { |
52 [CallWith=ExecutionContext, MeasureAs=NotificationPermission] static readonl
y attribute NotificationPermission permission; | 53 [CallWith=ExecutionContext, MeasureAs=NotificationPermission] static readonl
y attribute NotificationPermission permission; |
53 | 54 |
54 [CallWith=ScriptState, Exposed=Window, MeasureAs=NotificationPermissionReque
sted] static Promise<NotificationPermission> requestPermission(optional Notifica
tionPermissionCallback deprecatedCallback); | 55 [CallWith=ScriptState, Exposed=Window, MeasureAs=NotificationPermissionReque
sted] static Promise<NotificationPermission> requestPermission(optional Notifica
tionPermissionCallback deprecatedCallback); |
55 | 56 |
56 static readonly attribute unsigned long maxActions; | 57 static readonly attribute unsigned long maxActions; |
57 | 58 |
(...skipping 17 matching lines...) Expand all Loading... |
75 readonly attribute boolean requireInteraction; | 76 readonly attribute boolean requireInteraction; |
76 [CallWith=ScriptState, SameObject] readonly attribute any data; | 77 [CallWith=ScriptState, SameObject] readonly attribute any data; |
77 | 78 |
78 // TODO(johnme): Ship once Blink supports FrozenArray (https://crbug.com/515
920) | 79 // TODO(johnme): Ship once Blink supports FrozenArray (https://crbug.com/515
920) |
79 // and we've implemented the additional Object.freeze described in | 80 // and we've implemented the additional Object.freeze described in |
80 // https://notifications.spec.whatwg.org/#dom-notification-actions | 81 // https://notifications.spec.whatwg.org/#dom-notification-actions |
81 [RuntimeEnabled=NotificationExperimental] readonly attribute sequence<Notifi
cationAction> actions; | 82 [RuntimeEnabled=NotificationExperimental] readonly attribute sequence<Notifi
cationAction> actions; |
82 | 83 |
83 [MeasureAs=NotificationClosed] void close(); | 84 [MeasureAs=NotificationClosed] void close(); |
84 }; | 85 }; |
OLD | NEW |