summaryrefslogtreecommitdiff
path: root/Source/WebCore/Modules/notifications/Notification.idl
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/Modules/notifications/Notification.idl
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebCore/Modules/notifications/Notification.idl')
-rw-r--r--Source/WebCore/Modules/notifications/Notification.idl62
1 files changed, 25 insertions, 37 deletions
diff --git a/Source/WebCore/Modules/notifications/Notification.idl b/Source/WebCore/Modules/notifications/Notification.idl
index 6b0e14021..cb3fbee74 100644
--- a/Source/WebCore/Modules/notifications/Notification.idl
+++ b/Source/WebCore/Modules/notifications/Notification.idl
@@ -32,49 +32,37 @@
[
Conditional=NOTIFICATIONS|LEGACY_NOTIFICATIONS,
ActiveDOMObject,
- EventTarget,
+ ExportMacro=WEBCORE_EXPORT,
#if defined(ENABLE_NOTIFICATIONS) && ENABLE_NOTIFICATIONS
- Constructor(DOMString title, [Default=Undefined] optional Dictionary options),
- ConstructorCallWith=ScriptExecutionContext,
+ Constructor(DOMString title, optional NotificationOptions options),
+ ConstructorCallWith=Document,
#endif
-] interface Notification {
+] interface Notification : EventTarget {
void show();
-#if defined(ENABLE_LEGACY_NOTIFICATIONS) && ENABLE_LEGACY_NOTIFICATIONS
- void cancel();
-#endif
-#if defined(ENABLE_NOTIFICATIONS) && ENABLE_NOTIFICATIONS
- void close();
-#endif
+ [Conditional=LEGACY_NOTIFICATIONS, ImplementedAs=close] void cancel();
+ [Conditional=NOTIFICATIONS] void close();
+ [Conditional=NOTIFICATIONS, CallWith=Document] static readonly attribute DOMString permission;
+ [Conditional=NOTIFICATIONS, CallWith=Document] static void requestPermission(optional NotificationPermissionCallback? callback);
-#if defined(ENABLE_NOTIFICATIONS) && ENABLE_NOTIFICATIONS
- [CallWith=ScriptExecutionContext] static readonly attribute DOMString permission;
- [CallWith=ScriptExecutionContext] static void requestPermission(optional NotificationPermissionCallback callback);
-#endif
-
- attribute EventListener onshow;
-#if defined(ENABLE_LEGACY_NOTIFICATIONS) && ENABLE_LEGACY_NOTIFICATIONS
- attribute EventListener ondisplay;
-#endif
- attribute EventListener onerror;
- attribute EventListener onclose;
- attribute EventListener onclick;
+ attribute EventHandler onclick;
+ attribute EventHandler onclose;
+ [ImplementedAs=onshow] attribute EventHandler ondisplay;
+ attribute EventHandler onerror;
+ attribute EventHandler onshow;
-#if defined(ENABLE_LEGACY_NOTIFICATIONS) && ENABLE_LEGACY_NOTIFICATIONS
- attribute DOMString dir;
- attribute DOMString replaceId;
-#endif
-#if defined(ENABLE_NOTIFICATIONS) && ENABLE_NOTIFICATIONS
- attribute DOMString tag;
-#endif
+ [Conditional=LEGACY_NOTIFICATIONS] attribute DOMString dir;
+ [Conditional=LEGACY_NOTIFICATIONS] attribute DOMString replaceId;
- // EventTarget interface
- void addEventListener(DOMString type,
- EventListener listener,
- optional boolean useCapture);
- void removeEventListener(DOMString type,
- EventListener listener,
- optional boolean useCapture);
- [RaisesException] boolean dispatchEvent(Event evt);
+ [Conditional=NOTIFICATIONS] attribute DOMString tag;
};
+[Conditional=NOTIFICATIONS] enum NotificationDirection { "auto", "ltr", "rtl" };
+
+[Conditional=NOTIFICATIONS] dictionary NotificationOptions {
+ NotificationDirection dir = "auto";
+ DOMString lang = "";
+ DOMString body = "";
+ DOMString tag = "";
+ DOMString icon;
+};