Index: tool/input_sdk/lib/html/ddc/html_ddc.dart |
diff --git a/tool/input_sdk/lib/html/ddc/html_ddc.dart b/tool/input_sdk/lib/html/ddc/html_ddc.dart |
index d423b983e99220e80565a9efd522c33fe900a718..18382492feb595097b8ade7046536c994fba4d2f 100644 |
--- a/tool/input_sdk/lib/html/ddc/html_ddc.dart |
+++ b/tool/input_sdk/lib/html/ddc/html_ddc.dart |
@@ -3952,6 +3952,83 @@ class CssStyleDeclarationBase { |
// 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. |
+// WARNING: Do not edit - generated code. |
+ |
+ |
+@DomName('CustomEvent') |
+@Native("CustomEvent") |
+class CustomEvent extends Event { |
+ var _dartDetail; |
+ |
+ factory CustomEvent(String type, |
+ {bool canBubble: true, bool cancelable: true, Object detail}) { |
+ |
+ final CustomEvent e = document._createEvent('CustomEvent'); |
+ |
+ e._dartDetail = detail; |
+ |
+ // Only try setting the detail if it's one of these types to avoid |
+ // first-chance exceptions. Can expand this list in the future as needed. |
+ if (detail is List || detail is Map || detail is String || detail is num) { |
+ try { |
Jacob
2016/01/28 17:57:42
you sure this works?
i'm having trouble figuring o
|
+ e._initCustomEvent(type, canBubble, cancelable, detail); |
+ } catch(_) { |
+ e._initCustomEvent(type, canBubble, cancelable, null); |
+ } |
+ } else { |
+ e._initCustomEvent(type, canBubble, cancelable, null); |
+ } |
+ |
+ return e; |
+ } |
+ |
+ @DomName('CustomEvent.detail') |
+ get detail { |
+ if (_dartDetail != null) { |
+ return _dartDetail; |
+ } |
+ return _detail; |
+ } |
+ // To suppress missing implicit constructor warnings. |
+ factory CustomEvent._() { throw new UnsupportedError("Not supported"); } |
+ |
+ |
+ @Deprecated("Internal Use Only") |
+ static CustomEvent internalCreateCustomEvent() { |
+ return new CustomEvent.internal_(); |
+ } |
+ |
+ @Deprecated("Internal Use Only") |
+ CustomEvent.internal_() : super.internal_(); |
+ |
+ |
+ @DomName('CustomEvent._detail') |
+ @DocsEditable() |
+ @Experimental() // untriaged |
+ dynamic get _detail => convertNativeToDart_SerializedScriptValue(this._get__detail); |
+ @JSName('detail') |
+ @DomName('CustomEvent._detail') |
+ @DocsEditable() |
+ @Experimental() // untriaged |
+ @Creates('Null') |
+ dynamic get _get__detail => wrap_jso(JS("dynamic", "#.detail", this.raw)); |
+ |
+ @DomName('CustomEvent.initCustomEvent') |
+ @DocsEditable() |
+ void _initCustomEvent(String typeArg, bool canBubbleArg, bool cancelableArg, Object detailArg) { |
+ _initCustomEvent_1(typeArg, canBubbleArg, cancelableArg, detailArg); |
+ return; |
+ } |
+ @JSName('initCustomEvent') |
+ @DomName('CustomEvent.initCustomEvent') |
+ @DocsEditable() |
+ void _initCustomEvent_1(typeArg, canBubbleArg, cancelableArg, detailArg) => wrap_jso(JS("void ", "#.raw.initCustomEvent(#, #, #, #)", this, unwrap_jso(typeArg), unwrap_jso(canBubbleArg), unwrap_jso(cancelableArg), unwrap_jso(detailArg))); |
+ |
+} |
+// 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 |
+// BSD-style license that can be found in the LICENSE file. |
+ |
@DocsEditable() |
/** |
@@ -19605,6 +19682,7 @@ final htmlBlinkMap = { |
'Comment': () => Comment, |
'Console': () => Console, |
'ConsoleBase': () => ConsoleBase, |
+ 'CustomEvent': () => CustomEvent, |
'DOMImplementation': () => DomImplementation, |
'DOMTokenList': () => DomTokenList, |
'Document': () => Document, |
@@ -19657,6 +19735,7 @@ final htmlBlinkFunctionMap = { |
'Comment': () => Comment.internalCreateComment, |
'Console': () => Console.internalCreateConsole, |
'ConsoleBase': () => ConsoleBase.internalCreateConsoleBase, |
+ 'CustomEvent': () => CustomEvent.internalCreateCustomEvent, |
'DOMImplementation': () => DomImplementation.internalCreateDomImplementation, |
'DOMTokenList': () => DomTokenList.internalCreateDomTokenList, |
'Document': () => Document.internalCreateDocument, |