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

Side by Side Diff: sdk/lib/html/dart2js/html_dart2js.dart

Issue 16638013: Adding annotations for native types of type Object or dynamic. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /// The Dart HTML library. 1 /// The Dart HTML library.
2 library dart.dom.html; 2 library dart.dom.html;
3 3
4 import 'dart:async'; 4 import 'dart:async';
5 import 'dart:collection'; 5 import 'dart:collection';
6 import 'dart:_collection-dev' hide Symbol; 6 import 'dart:_collection-dev' hide Symbol;
7 import 'dart:html_common'; 7 import 'dart:html_common';
8 import 'dart:indexed_db'; 8 import 'dart:indexed_db';
9 import 'dart:isolate'; 9 import 'dart:isolate';
10 import 'dart:json' as json; 10 import 'dart:json' as json;
(...skipping 6000 matching lines...) Expand 10 before | Expand all | Expand 10 after
6011 {bool canBubble: true, bool cancelable: true, Object detail}) { 6011 {bool canBubble: true, bool cancelable: true, Object detail}) {
6012 6012
6013 final CustomEvent e = document.$dom_createEvent("CustomEvent"); 6013 final CustomEvent e = document.$dom_createEvent("CustomEvent");
6014 e.$dom_initCustomEvent(type, canBubble, cancelable, detail); 6014 e.$dom_initCustomEvent(type, canBubble, cancelable, detail);
6015 6015
6016 return e; 6016 return e;
6017 } 6017 }
6018 6018
6019 @DomName('CustomEvent.detail') 6019 @DomName('CustomEvent.detail')
6020 @DocsEditable 6020 @DocsEditable
6021 @Creates('Null')
6021 final Object detail; 6022 final Object detail;
6022 6023
6023 @JSName('initCustomEvent') 6024 @JSName('initCustomEvent')
6024 @DomName('CustomEvent.initCustomEvent') 6025 @DomName('CustomEvent.initCustomEvent')
6025 @DocsEditable 6026 @DocsEditable
6026 void $dom_initCustomEvent(String typeArg, bool canBubbleArg, bool cancelableAr g, Object detailArg) native; 6027 void $dom_initCustomEvent(String typeArg, bool canBubbleArg, bool cancelableAr g, Object detailArg) native;
6027 6028
6028 } 6029 }
6029 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 6030 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
6030 // for details. All rights reserved. Use of this source code is governed by a 6031 // for details. All rights reserved. Use of this source code is governed by a
(...skipping 4247 matching lines...) Expand 10 before | Expand all | Expand 10 after
10278 10279
10279 10280
10280 @DocsEditable 10281 @DocsEditable
10281 @DomName('File') 10282 @DomName('File')
10282 class File extends Blob native "File" { 10283 class File extends Blob native "File" {
10283 10284
10284 DateTime get lastModifiedDate => _convertNativeToDart_DateTime(this._get_lastM odifiedDate); 10285 DateTime get lastModifiedDate => _convertNativeToDart_DateTime(this._get_lastM odifiedDate);
10285 @JSName('lastModifiedDate') 10286 @JSName('lastModifiedDate')
10286 @DomName('File.lastModifiedDate') 10287 @DomName('File.lastModifiedDate')
10287 @DocsEditable 10288 @DocsEditable
10289 @Creates('Null')
10288 final dynamic _get_lastModifiedDate; 10290 final dynamic _get_lastModifiedDate;
10289 10291
10290 @DomName('File.name') 10292 @DomName('File.name')
10291 @DocsEditable 10293 @DocsEditable
10292 final String name; 10294 final String name;
10293 10295
10294 @JSName('webkitRelativePath') 10296 @JSName('webkitRelativePath')
10295 @DomName('File.webkitRelativePath') 10297 @DomName('File.webkitRelativePath')
10296 @DocsEditable 10298 @DocsEditable
10297 @SupportedBrowser(SupportedBrowser.CHROME) 10299 @SupportedBrowser(SupportedBrowser.CHROME)
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
10847 10849
10848 10850
10849 @DocsEditable 10851 @DocsEditable
10850 @DomName('FocusEvent') 10852 @DomName('FocusEvent')
10851 class FocusEvent extends UIEvent native "FocusEvent" { 10853 class FocusEvent extends UIEvent native "FocusEvent" {
10852 10854
10853 EventTarget get relatedTarget => _convertNativeToDart_EventTarget(this._get_re latedTarget); 10855 EventTarget get relatedTarget => _convertNativeToDart_EventTarget(this._get_re latedTarget);
10854 @JSName('relatedTarget') 10856 @JSName('relatedTarget')
10855 @DomName('FocusEvent.relatedTarget') 10857 @DomName('FocusEvent.relatedTarget')
10856 @DocsEditable 10858 @DocsEditable
10859 @Creates('Null')
10857 final dynamic _get_relatedTarget; 10860 final dynamic _get_relatedTarget;
10858 } 10861 }
10859 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 10862 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
10860 // for details. All rights reserved. Use of this source code is governed by a 10863 // for details. All rights reserved. Use of this source code is governed by a
10861 // BSD-style license that can be found in the LICENSE file. 10864 // BSD-style license that can be found in the LICENSE file.
10862 10865
10863 10866
10864 @DocsEditable 10867 @DocsEditable
10865 @DomName('FontLoader') 10868 @DomName('FontLoader')
10866 // http://www.w3.org/TR/css3-fonts/#document-fontloader 10869 // http://www.w3.org/TR/css3-fonts/#document-fontloader
(...skipping 1936 matching lines...) Expand 10 before | Expand all | Expand 10 after
12803 final ValidityState validity; 12806 final ValidityState validity;
12804 12807
12805 @DomName('HTMLInputElement.value') 12808 @DomName('HTMLInputElement.value')
12806 @DocsEditable 12809 @DocsEditable
12807 String value; 12810 String value;
12808 12811
12809 DateTime get valueAsDate => _convertNativeToDart_DateTime(this._get_valueAsDat e); 12812 DateTime get valueAsDate => _convertNativeToDart_DateTime(this._get_valueAsDat e);
12810 @JSName('valueAsDate') 12813 @JSName('valueAsDate')
12811 @DomName('HTMLInputElement.valueAsDate') 12814 @DomName('HTMLInputElement.valueAsDate')
12812 @DocsEditable 12815 @DocsEditable
12816 @Creates('Null')
12813 final dynamic _get_valueAsDate; 12817 final dynamic _get_valueAsDate;
12814 12818
12815 void set valueAsDate(DateTime value) { 12819 void set valueAsDate(DateTime value) {
12816 this._set_valueAsDate = _convertDartToNative_DateTime(value); 12820 this._set_valueAsDate = _convertDartToNative_DateTime(value);
12817 } 12821 }
12818 void set _set_valueAsDate(/*dynamic*/ value) { 12822 void set _set_valueAsDate(/*dynamic*/ value) {
12819 JS("void", "#.valueAsDate = #", this, value); 12823 JS("void", "#.valueAsDate = #", this, value);
12820 } 12824 }
12821 12825
12822 @DomName('HTMLInputElement.valueAsNumber') 12826 @DomName('HTMLInputElement.valueAsNumber')
(...skipping 1006 matching lines...) Expand 10 before | Expand all | Expand 10 after
13829 void reload() native; 13833 void reload() native;
13830 13834
13831 @DomName('Location.replace') 13835 @DomName('Location.replace')
13832 @DocsEditable 13836 @DocsEditable
13833 void replace(String url) native; 13837 void replace(String url) native;
13834 13838
13835 @DomName('Location.toString') 13839 @DomName('Location.toString')
13836 @DocsEditable 13840 @DocsEditable
13837 String toString() native; 13841 String toString() native;
13838 13842
13839 @DomName('Location.valueOf')
13840 @DocsEditable
13841 @Experimental // nonstandard
13842 Object valueOf() native;
13843
13844 13843
13845 @DomName('Location.origin') 13844 @DomName('Location.origin')
13846 String get origin { 13845 String get origin {
13847 if (JS('bool', '("origin" in #)', this)) { 13846 if (JS('bool', '("origin" in #)', this)) {
13848 return JS('String', '#.origin', this); 13847 return JS('String', '#.origin', this);
13849 } 13848 }
13850 return '${this.protocol}//${this.host}'; 13849 return '${this.protocol}//${this.host}';
13851 } 13850 }
13852 } 13851 }
13853 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 13852 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
(...skipping 1409 matching lines...) Expand 10 before | Expand all | Expand 10 after
15263 @DocsEditable 15262 @DocsEditable
15264 @DomName('Metadata') 15263 @DomName('Metadata')
15265 // http://www.w3.org/TR/file-system-api/#the-metadata-interface 15264 // http://www.w3.org/TR/file-system-api/#the-metadata-interface
15266 @Experimental 15265 @Experimental
15267 class Metadata native "Metadata" { 15266 class Metadata native "Metadata" {
15268 15267
15269 DateTime get modificationTime => _convertNativeToDart_DateTime(this._get_modif icationTime); 15268 DateTime get modificationTime => _convertNativeToDart_DateTime(this._get_modif icationTime);
15270 @JSName('modificationTime') 15269 @JSName('modificationTime')
15271 @DomName('Metadata.modificationTime') 15270 @DomName('Metadata.modificationTime')
15272 @DocsEditable 15271 @DocsEditable
15272 @Creates('Null')
15273 final dynamic _get_modificationTime; 15273 final dynamic _get_modificationTime;
15274 15274
15275 @DomName('Metadata.size') 15275 @DomName('Metadata.size')
15276 @DocsEditable 15276 @DocsEditable
15277 final int size; 15277 final int size;
15278 } 15278 }
15279 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 15279 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
15280 // for details. All rights reserved. Use of this source code is governed by a 15280 // for details. All rights reserved. Use of this source code is governed by a
15281 // BSD-style license that can be found in the LICENSE file. 15281 // BSD-style license that can be found in the LICENSE file.
15282 15282
(...skipping 3759 matching lines...) Expand 10 before | Expand all | Expand 10 after
19042 final RtcStatsReport local; 19042 final RtcStatsReport local;
19043 19043
19044 @DomName('RTCStatsReport.remote') 19044 @DomName('RTCStatsReport.remote')
19045 @DocsEditable 19045 @DocsEditable
19046 final RtcStatsReport remote; 19046 final RtcStatsReport remote;
19047 19047
19048 DateTime get timestamp => _convertNativeToDart_DateTime(this._get_timestamp); 19048 DateTime get timestamp => _convertNativeToDart_DateTime(this._get_timestamp);
19049 @JSName('timestamp') 19049 @JSName('timestamp')
19050 @DomName('RTCStatsReport.timestamp') 19050 @DomName('RTCStatsReport.timestamp')
19051 @DocsEditable 19051 @DocsEditable
19052 @Creates('Null')
19052 final dynamic _get_timestamp; 19053 final dynamic _get_timestamp;
19053 19054
19054 @DomName('RTCStatsReport.type') 19055 @DomName('RTCStatsReport.type')
19055 @DocsEditable 19056 @DocsEditable
19056 final String type; 19057 final String type;
19057 19058
19058 @DomName('RTCStatsReport.names') 19059 @DomName('RTCStatsReport.names')
19059 @DocsEditable 19060 @DocsEditable
19060 List<String> names() native; 19061 List<String> names() native;
19061 19062
(...skipping 3021 matching lines...) Expand 10 before | Expand all | Expand 10 after
22083 // BSD-style license that can be found in the LICENSE file. 22084 // BSD-style license that can be found in the LICENSE file.
22084 22085
22085 22086
22086 @DocsEditable 22087 @DocsEditable
22087 @DomName('TrackEvent') 22088 @DomName('TrackEvent')
22088 @Unstable 22089 @Unstable
22089 class TrackEvent extends Event native "TrackEvent" { 22090 class TrackEvent extends Event native "TrackEvent" {
22090 22091
22091 @DomName('TrackEvent.track') 22092 @DomName('TrackEvent.track')
22092 @DocsEditable 22093 @DocsEditable
22094 @Creates('Null')
22093 final Object track; 22095 final Object track;
22094 } 22096 }
22095 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 22097 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
22096 // for details. All rights reserved. Use of this source code is governed by a 22098 // for details. All rights reserved. Use of this source code is governed by a
22097 // BSD-style license that can be found in the LICENSE file. 22099 // BSD-style license that can be found in the LICENSE file.
22098 22100
22099 22101
22100 @DocsEditable 22102 @DocsEditable
22101 @DomName('TransitionEvent') 22103 @DomName('TransitionEvent')
22102 class TransitionEvent extends Event native "TransitionEvent,WebKitTransitionEven t" { 22104 class TransitionEvent extends Event native "TransitionEvent,WebKitTransitionEven t" {
(...skipping 1527 matching lines...) Expand 10 before | Expand all | Expand 10 after
23630 @DocsEditable 23632 @DocsEditable
23631 int _setInterval(Object handler, int timeout) native; 23633 int _setInterval(Object handler, int timeout) native;
23632 23634
23633 @JSName('setTimeout') 23635 @JSName('setTimeout')
23634 @DomName('Window.setTimeout') 23636 @DomName('Window.setTimeout')
23635 @DocsEditable 23637 @DocsEditable
23636 int _setTimeout(Object handler, int timeout) native; 23638 int _setTimeout(Object handler, int timeout) native;
23637 23639
23638 @DomName('Window.showModalDialog') 23640 @DomName('Window.showModalDialog')
23639 @DocsEditable 23641 @DocsEditable
23642 @Creates('Null')
23640 Object showModalDialog(String url, [Object dialogArgs, String featureArgs]) na tive; 23643 Object showModalDialog(String url, [Object dialogArgs, String featureArgs]) na tive;
23641 23644
23642 @DomName('Window.stop') 23645 @DomName('Window.stop')
23643 @DocsEditable 23646 @DocsEditable
23644 void stop() native; 23647 void stop() native;
23645 23648
23646 @DomName('Window.toString') 23649 @DomName('Window.toString')
23647 @DocsEditable 23650 @DocsEditable
23648 String toString() native; 23651 String toString() native;
23649 23652
(...skipping 6236 matching lines...) Expand 10 before | Expand all | Expand 10 after
29886 _position = nextPosition; 29889 _position = nextPosition;
29887 return true; 29890 return true;
29888 } 29891 }
29889 _current = null; 29892 _current = null;
29890 _position = _array.length; 29893 _position = _array.length;
29891 return false; 29894 return false;
29892 } 29895 }
29893 29896
29894 T get current => _current; 29897 T get current => _current;
29895 } 29898 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | sdk/lib/web_audio/dart2js/web_audio_dart2js.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698