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

Side by Side Diff: tools/dom/templates/html/impl/impl_Element.darttemplate

Issue 46143004: Added helpful information on all event getters and static members. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Made event names all lowercase. Created 7 years, 1 month 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
« no previous file with comments | « tools/dom/docs/docs.json ('k') | tools/dom/templates/html/impl/impl_HTMLDocument.darttemplate » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of $LIBRARYNAME; 5 part of $LIBRARYNAME;
6 6
7 class _ChildrenElementList extends ListBase<Element> 7 class _ChildrenElementList extends ListBase<Element>
8 implements NodeListWrapper { 8 implements NodeListWrapper {
9 // Raw Element. 9 // Raw Element.
10 final Element _element; 10 final Element _element;
(...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after
821 this._scrollIntoViewIfNeeded(true); 821 this._scrollIntoViewIfNeeded(true);
822 } else { 822 } else {
823 this._scrollIntoViewIfNeeded(); 823 this._scrollIntoViewIfNeeded();
824 } 824 }
825 } else { 825 } else {
826 this._scrollIntoView(); 826 this._scrollIntoView();
827 } 827 }
828 } 828 }
829 829
830 $if DART2JS 830 $if DART2JS
831 /**
832 * Static factory designed to expose `mousewheel` events to event
833 * handlers that are not necessarily instances of [Element].
834 *
835 * See [EventStreamProvider] for usage information.
836 */
831 @DomName('Element.mouseWheelEvent') 837 @DomName('Element.mouseWheelEvent')
832 static const EventStreamProvider<WheelEvent> mouseWheelEvent = 838 static const EventStreamProvider<WheelEvent> mouseWheelEvent =
833 const _CustomEventStreamProvider<WheelEvent>( 839 const _CustomEventStreamProvider<WheelEvent>(
834 Element._determineMouseWheelEventType); 840 Element._determineMouseWheelEventType);
835 841
836 static String _determineMouseWheelEventType(EventTarget e) { 842 static String _determineMouseWheelEventType(EventTarget e) {
837 if (JS('bool', '#.onwheel !== undefined', e)) { 843 if (JS('bool', '#.onwheel !== undefined', e)) {
838 // W3C spec, and should be IE9+, but IE has a bug exposing onwheel. 844 // W3C spec, and should be IE9+, but IE has a bug exposing onwheel.
839 return 'wheel'; 845 return 'wheel';
840 } else if (JS('bool', '#.onmousewheel !== undefined', e)) { 846 } else if (JS('bool', '#.onmousewheel !== undefined', e)) {
841 // Chrome & IE 847 // Chrome & IE
842 return 'mousewheel'; 848 return 'mousewheel';
843 } else { 849 } else {
844 // Firefox 850 // Firefox
845 return 'DOMMouseScroll'; 851 return 'DOMMouseScroll';
846 } 852 }
847 } 853 }
848 854
855 /**
856 * Static factory designed to expose `transitionend` events to event
857 * handlers that are not necessarily instances of [Element].
858 *
859 * See [EventStreamProvider] for usage information.
860 */
849 @DomName('Element.transitionEndEvent') 861 @DomName('Element.transitionEndEvent')
850 static const EventStreamProvider<TransitionEvent> transitionEndEvent = 862 static const EventStreamProvider<TransitionEvent> transitionEndEvent =
851 const _CustomEventStreamProvider<TransitionEvent>( 863 const _CustomEventStreamProvider<TransitionEvent>(
852 Element._determineTransitionEventType); 864 Element._determineTransitionEventType);
853 865
854 static String _determineTransitionEventType(EventTarget e) { 866 static String _determineTransitionEventType(EventTarget e) {
855 // Unfortunately the normal 'ontransitionend' style checks don't work here. 867 // Unfortunately the normal 'ontransitionend' style checks don't work here.
856 if (Device.isWebKit) { 868 if (Device.isWebKit) {
857 return 'webkitTransitionEnd'; 869 return 'webkitTransitionEnd';
858 } else if (Device.isOpera) { 870 } else if (Device.isOpera) {
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
1289 const ScrollAlignment._internal(this._value); 1301 const ScrollAlignment._internal(this._value);
1290 toString() => 'ScrollAlignment.$_value'; 1302 toString() => 'ScrollAlignment.$_value';
1291 1303
1292 /// Attempt to align the element to the top of the scrollable area. 1304 /// Attempt to align the element to the top of the scrollable area.
1293 static const TOP = const ScrollAlignment._internal('TOP'); 1305 static const TOP = const ScrollAlignment._internal('TOP');
1294 /// Attempt to center the element in the scrollable area. 1306 /// Attempt to center the element in the scrollable area.
1295 static const CENTER = const ScrollAlignment._internal('CENTER'); 1307 static const CENTER = const ScrollAlignment._internal('CENTER');
1296 /// Attempt to align the element to the bottom of the scrollable area. 1308 /// Attempt to align the element to the bottom of the scrollable area.
1297 static const BOTTOM = const ScrollAlignment._internal('BOTTOM'); 1309 static const BOTTOM = const ScrollAlignment._internal('BOTTOM');
1298 } 1310 }
OLDNEW
« no previous file with comments | « tools/dom/docs/docs.json ('k') | tools/dom/templates/html/impl/impl_HTMLDocument.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698