summaryrefslogtreecommitdiff
path: root/Source/WebCore/dom/MessageEvent.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/dom/MessageEvent.idl
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebCore/dom/MessageEvent.idl')
-rw-r--r--Source/WebCore/dom/MessageEvent.idl70
1 files changed, 24 insertions, 46 deletions
diff --git a/Source/WebCore/dom/MessageEvent.idl b/Source/WebCore/dom/MessageEvent.idl
index b678c2b95..ee696b9be 100644
--- a/Source/WebCore/dom/MessageEvent.idl
+++ b/Source/WebCore/dom/MessageEvent.idl
@@ -1,6 +1,7 @@
/*
* Copyright (C) 2007 Henry Mason <hmason@mac.com>
* Copyright (C) 2011 Google Inc. All rights reserved.
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -11,10 +12,10 @@
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
@@ -26,51 +27,28 @@
*/
[
- GlobalContext=DOMWindow&WorkerGlobalScope,
- JSNoStaticTables,
- ConstructorTemplate=Event,
+ Constructor(DOMString type, optional MessageEventInit eventInitDict),
+ ConstructorCallWith=ScriptState,
+ Exposed=(Window,Worker),
] interface MessageEvent : Event {
- [InitializedByEventConstructor] readonly attribute DOMString origin;
- [InitializedByEventConstructor] readonly attribute DOMString lastEventId;
- [InitializedByEventConstructor] readonly attribute EventTarget source; // May be a DOMWindow or a MessagePort.
-#if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
- [InitializedByEventConstructor, CachedAttribute, CustomGetter] readonly attribute any data;
- [InitializedByEventConstructor] readonly attribute MessagePort[] ports;
-
- [Custom] void initMessageEvent([Default=Undefined] optional DOMString typeArg,
- [Default=Undefined] optional boolean canBubbleArg,
- [Default=Undefined] optional boolean cancelableArg,
- [Default=Undefined] optional any dataArg,
- [Default=Undefined] optional DOMString originArg,
- [Default=Undefined] optional DOMString lastEventIdArg,
- [Default=Undefined] optional DOMWindow sourceArg,
- [Default=Undefined] optional Array messagePorts);
-
- [Custom] void webkitInitMessageEvent([Default=Undefined] optional DOMString typeArg,
- [Default=Undefined] optional boolean canBubbleArg,
- [Default=Undefined] optional boolean cancelableArg,
- [Default=Undefined] optional any dataArg,
- [Default=Undefined] optional DOMString originArg,
- [Default=Undefined] optional DOMString lastEventIdArg,
- [Default=Undefined] optional DOMWindow sourceArg,
- [Default=Undefined] optional Array transferables);
-#else
- // Code generator for ObjC bindings does not support custom bindings, thus there is no good way to
- // return a variant value. As workaround, expose the data attribute as SerializedScriptValue.
- readonly attribute SerializedScriptValue data;
-
- // There's no good way to expose an array via the ObjC bindings, so for now just expose a single port.
- readonly attribute MessagePort messagePort;
-
- void initMessageEvent([Default=Undefined] optional DOMString typeArg,
- [Default=Undefined] optional boolean canBubbleArg,
- [Default=Undefined] optional boolean cancelableArg,
- [Default=Undefined] optional SerializedScriptValue dataArg,
- [Default=Undefined] optional DOMString originArg,
- [Default=Undefined] optional DOMString lastEventIdArg,
- [Default=Undefined] optional DOMWindow sourceArg,
- [Default=Undefined] optional MessagePort messagePort);
-#endif
+ readonly attribute USVString origin;
+ readonly attribute DOMString lastEventId;
+ readonly attribute EventTarget? source;
+ [CachedAttribute, CustomGetter] readonly attribute any data;
+ readonly attribute FrozenArray<MessagePort> ports;
+ [CallWith=ScriptState] void initMessageEvent(DOMString type, optional boolean bubbles = false, optional boolean cancelable = false,
+ optional any data = null, optional USVString originArg = "", optional DOMString lastEventId = "", optional (DOMWindow or MessagePort)? source = null,
+ optional sequence<MessagePort> messagePorts = []);
+ [Custom] void webkitInitMessageEvent(optional DOMString typeArg, optional boolean canBubbleArg, optional boolean cancelableArg,
+ optional any dataArg, optional USVString originArg, optional DOMString lastEventIdArg, optional (DOMWindow or MessagePort)? sourceArg,
+ optional sequence<MessagePort> messagePorts);
};
+dictionary MessageEventInit : EventInit {
+ any data = null;
+ USVString origin = "";
+ DOMString lastEventId = "";
+ (DOMWindow or MessagePort)? source = null;
+ sequence<MessagePort> ports = [];
+};