| Index: modules/notifications/Notification.idl
|
| diff --git a/modules/notifications/Notification.idl b/modules/notifications/Notification.idl
|
| index 0ad1096f9b3577e8cbf72eccec2bf20c9eec53bb..8ad23a1223573ac6d09b6509cf542ca6a931f66c 100644
|
| --- a/modules/notifications/Notification.idl
|
| +++ b/modules/notifications/Notification.idl
|
| @@ -29,9 +29,19 @@
|
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| */
|
|
|
| +// https://notifications.spec.whatwg.org/#enumdef-notificationpermission
|
| +
|
| +enum NotificationPermission {
|
| + "default",
|
| + "denied",
|
| + "granted"
|
| +};
|
| +
|
| +// https://notifications.spec.whatwg.org/#api
|
| +
|
| [
|
| GarbageCollected,
|
| - ActiveDOMObject,
|
| + DependentLifetime,
|
| Constructor(DOMString title, optional NotificationOptions options),
|
| ConstructorCallWith=ExecutionContext,
|
| Exposed=(Window,Worker),
|
| @@ -39,10 +49,11 @@
|
| RaisesException=Constructor,
|
| RuntimeEnabled=Notifications,
|
| ] interface Notification : EventTarget {
|
| - [CallWith=ExecutionContext, MeasureAs=NotificationPermission] static readonly attribute DOMString permission;
|
| - [CallWith=ExecutionContext, MeasureAs=NotificationPermissionRequested] static void requestPermission(optional NotificationPermissionCallback callback);
|
| + [CallWith=ExecutionContext, MeasureAs=NotificationPermission] static readonly attribute NotificationPermission permission;
|
| +
|
| + [CallWith=ScriptState, Exposed=Window, MeasureAs=NotificationPermissionRequested] static Promise<NotificationPermission> requestPermission(optional NotificationPermissionCallback deprecatedCallback);
|
|
|
| - // FIXME: Implement the Notification.get() method.
|
| + static readonly attribute unsigned long maxActions;
|
|
|
| attribute EventHandler onclick;
|
| [MeasureAs=NotificationShowEvent] attribute EventHandler onshow;
|
| @@ -54,11 +65,19 @@
|
| readonly attribute DOMString lang;
|
| readonly attribute DOMString body;
|
| readonly attribute DOMString tag;
|
| - readonly attribute DOMString icon;
|
| + readonly attribute USVString icon;
|
|
|
| [RuntimeEnabled=NotificationExperimental] readonly attribute sequence<unsigned long>? vibrate;
|
| + readonly attribute DOMTimeStamp timestamp;
|
| + readonly attribute boolean renotify;
|
| readonly attribute boolean silent;
|
| - [CallWith=ScriptState] readonly attribute any data;
|
| + readonly attribute boolean requireInteraction;
|
| + [CallWith=ScriptState, SameObject] readonly attribute any data;
|
| +
|
| + // TODO(johnme): Ship once Blink supports FrozenArray (https://crbug.com/515920)
|
| + // and we've implemented the additional Object.freeze described in
|
| + // https://notifications.spec.whatwg.org/#dom-notification-actions
|
| + [RuntimeEnabled=NotificationExperimental] readonly attribute sequence<NotificationAction> actions;
|
|
|
| [MeasureAs=NotificationClosed] void close();
|
| };
|
|
|