Chromium Code Reviews| 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); |
| +}; |