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

Unified Diff: lib/html/dart2js/html_dart2js.dart

Issue 11030012: Add constructor for CustomEvent. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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 | « no previous file | lib/html/dartium/html_dartium.dart » ('j') | lib/html/src/shared_FactoryProviders.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/html/dart2js/html_dart2js.dart
===================================================================
--- lib/html/dart2js/html_dart2js.dart (revision 13097)
+++ lib/html/dart2js/html_dart2js.dart (working copy)
@@ -8495,18 +8495,23 @@
/// @domName CustomEvent
abstract class CustomEvent implements Event {
+ factory CustomEvent(String type, [bool canBubble = true, bool cancelable = true,
+ Object detail = null]) => _CustomEventFactoryProvider.createCustomEvent(type, canBubble,
+ cancelable, detail);
+
+
/** @domName CustomEvent.detail */
abstract Object get detail;
/** @domName CustomEvent.initCustomEvent */
- void initCustomEvent(String typeArg, bool canBubbleArg, bool cancelableArg, Object detailArg);
+ void $dom_initCustomEvent(String typeArg, bool canBubbleArg, bool cancelableArg, Object detailArg);
}
class _CustomEventImpl extends _EventImpl implements CustomEvent native "*CustomEvent" {
final Object detail;
- void initCustomEvent(String typeArg, bool canBubbleArg, bool cancelableArg, Object detailArg) native;
+ void $dom_initCustomEvent(String typeArg, bool canBubbleArg, bool cancelableArg, Object detailArg) native "initCustomEvent";
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
@@ -40925,6 +40930,15 @@
// 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.
+class _CustomEventFactoryProvider {
+ static CustomEvent createCustomEvent(String type, [bool canBubble = true,
+ bool cancelable = true, Object detail = null]) {
+ final _CustomEventImpl e = _document.$dom_createEvent("CustomEvent");
+ e.$dom_initCustomEvent(type, canBubble, cancelable, detail);
+ return e;
+ }
+}
+
class _EventFactoryProvider {
static Event createEvent(String type, [bool canBubble = true,
bool cancelable = true]) {
@@ -40933,7 +40947,7 @@
return e;
}
}
-
+
class _MouseEventFactoryProvider {
static MouseEvent createMouseEvent(String type, Window view, int detail,
int screenX, int screenY, int clientX, int clientY, int button,
« no previous file with comments | « no previous file | lib/html/dartium/html_dartium.dart » ('j') | lib/html/src/shared_FactoryProviders.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698