Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Unified Diff: Source/modules/serviceworkers/ServiceWorkerMessageEvent.idl

Issue 1130113006: ServiceWorker: Introduce ServiceWorkerMessageEvent to replace MessageEvent (3/3). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: add initEvent tests Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/modules/serviceworkers/ServiceWorkerMessageEvent.idl
diff --git a/Source/modules/serviceworkers/ServiceWorkerMessageEvent.idl b/Source/modules/serviceworkers/ServiceWorkerMessageEvent.idl
new file mode 100644
index 0000000000000000000000000000000000000000..fff090e700c9c41b707708cd6361a946b61f44a7
--- /dev/null
+++ b/Source/modules/serviceworkers/ServiceWorkerMessageEvent.idl
@@ -0,0 +1,25 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#serviceworkermessage-event-section
+
+[
+ CustomConstructor(DOMString type, optional ServiceWorkerMessageEventInit eventInitDict),
falken 2015/05/18 03:40:23 CustomConstructor is listed as "strongly discourag
bashi 2015/05/20 05:22:16 I don't see why you need CustomConstructor. This s
+ Exposed=(Window, Worker),
+ RuntimeEnabled=ServiceWorker,
+] interface ServiceWorkerMessageEvent : Event {
+ [InitializedByEventConstructor] readonly attribute DOMString origin;
bashi 2015/05/20 05:22:16 Please drop [InitializedByEventConstructor]. It is
+ [InitializedByEventConstructor] readonly attribute DOMString lastEventId;
+ [InitializedByEventConstructor, Custom=Getter] readonly attribute any source;
bashi 2015/05/20 05:22:16 I guess you can use (ServiceWorker or MessagePort)
+ [InitializedByEventConstructor, Custom=Getter] readonly attribute any data;
bashi 2015/05/20 05:22:16 Please be careful not to leak V8 objects to differ
+ [InitializedByEventConstructor] readonly attribute MessagePort[] ports;
+ [Custom] void initServiceWorkerMessageEvent([Default=Undefined] optional DOMString typeArg,
bashi 2015/05/20 05:22:15 I think we should not implement this. I filed a bu
+ [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 any sourceArg,
+ [Default=Undefined] optional MessagePort[] messagePorts);
+};

Powered by Google App Engine
This is Rietveld 408576698