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

Unified Diff: tools/dom/templates/html/impl/impl_ServiceWorkerMessageEvent.darttemplate

Issue 1759303003: Change scripts to avoid generating things that bloat the compiled code (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « tools/dom/templates/html/impl/impl_MessageEvent.darttemplate ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/templates/html/impl/impl_ServiceWorkerMessageEvent.darttemplate
diff --git a/tools/dom/templates/html/impl/impl_MessageEvent.darttemplate b/tools/dom/templates/html/impl/impl_ServiceWorkerMessageEvent.darttemplate
similarity index 50%
copy from tools/dom/templates/html/impl/impl_MessageEvent.darttemplate
copy to tools/dom/templates/html/impl/impl_ServiceWorkerMessageEvent.darttemplate
index fec434127b637751cd4056633f02483ec980c4fe..42a803f1613409ac08807905bba86b1b3e77d771 100644
--- a/tools/dom/templates/html/impl/impl_MessageEvent.darttemplate
+++ b/tools/dom/templates/html/impl/impl_ServiceWorkerMessageEvent.darttemplate
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
@@ -6,52 +6,32 @@
part of $LIBRARYNAME;
+// TODO(alanknight): Provide a nicer constructor that uses named parameters
+// rather than an initialization map.
$(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS {
- factory $CLASSNAME(String type,
- {bool canBubble: false, bool cancelable: false, Object data,
- String origin, String lastEventId,
- Window source, List messagePorts}) {
- if (source == null) {
- source = window;
- }
-$if DART2JS
- if (!Device.isIE) { // TODO: This if check should be removed once IE
- // implements the constructor.
- return JS('MessageEvent', 'new MessageEvent(#, {bubbles: #, cancelable: #, data: #, origin: #, lastEventId: #, source: #, ports: #})',
- type, canBubble, cancelable, data, origin, lastEventId, source,
- messagePorts);
- }
-$endif
- var event = document._createEvent("MessageEvent");
- event._initMessageEvent(type, canBubble, cancelable, data, origin,
- lastEventId, source, messagePorts);
- return event;
- }
$if DARTIUM
// TODO(alanknight): This really should be generated by the
// _OutputConversion in the systemnative.py script, but that doesn't
// use those conversions right now, so do this as a one-off.
- @DomName('MessageEvent.data')
+ @DomName('ServiceWorkerMessageEvent.data')
@DocsEditable()
dynamic get data => convertNativeToDart_SerializedScriptValue(
_blink.BlinkMessageEvent.instance.data_Getter_(unwrap_jso(this)));
-
$else
// TODO(alanknight): This really should be generated by the
// _OutputConversion in the systemnative.py script, but that doesn't
// use those conversions right now, so do this as a one-off.
- @DomName('MessageEvent.data')
+ @DomName('ServiceWorkerMessageEvent.data')
@DocsEditable()
dynamic get data => convertNativeToDart_SerializedScriptValue(this._get_data);
@JSName('data')
- @DomName('MessageEvent.data')
+ @DomName('ServiceWorkerMessageEvent.data')
@DocsEditable()
- @Creates('Null')
- @Returns('Object|Null')
+ @annotation_Creates_SerializedScriptValue
+ @annotation_Returns_SerializedScriptValue
final dynamic _get_data;
-
$endif
$!MEMBERS
« no previous file with comments | « tools/dom/templates/html/impl/impl_MessageEvent.darttemplate ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698