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

Side by Side Diff: sdk/lib/svg/dart2js/svg_dart2js.dart

Issue 569783002: Migrate to Chrome 37 IDL (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /** 1 /**
2 * Scalable Vector Graphics: 2 * Scalable Vector Graphics:
3 * Two-dimensional vector graphics with support for events and animation. 3 * Two-dimensional vector graphics with support for events and animation.
4 * 4 *
5 * For details about the features and syntax of SVG, a W3C standard, 5 * For details about the features and syntax of SVG, a W3C standard,
6 * refer to the 6 * refer to the
7 * [Scalable Vector Graphics Specification](http://www.w3.org/TR/SVG/). 7 * [Scalable Vector Graphics Specification](http://www.w3.org/TR/SVG/).
8 */ 8 */
9 library dart.dom.svg; 9 library dart.dom.svg;
10 10
(...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 * This can only be called by subclasses from their created constructor. 707 * This can only be called by subclasses from their created constructor.
708 */ 708 */
709 DiscardElement.created() : super.created(); 709 DiscardElement.created() : super.created();
710 } 710 }
711 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 711 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
712 // for details. All rights reserved. Use of this source code is governed by a 712 // for details. All rights reserved. Use of this source code is governed by a
713 // BSD-style license that can be found in the LICENSE file. 713 // BSD-style license that can be found in the LICENSE file.
714 714
715 715
716 @DocsEditable() 716 @DocsEditable()
717 @DomName('SVGElementInstance')
718 @Unstable()
719 @Native("SVGElementInstance")
720 class ElementInstance extends EventTarget {
721 // To suppress missing implicit constructor warnings.
722 factory ElementInstance._() { throw new UnsupportedError("Not supported"); }
723
724 /**
725 * Static factory designed to expose `abort` events to event
726 * handlers that are not necessarily instances of [ElementInstance].
727 *
728 * See [EventStreamProvider] for usage information.
729 */
730 @DomName('SVGElementInstance.abortEvent')
731 @DocsEditable()
732 static const EventStreamProvider<Event> abortEvent = const EventStreamProvider <Event>('abort');
733
734 /**
735 * Static factory designed to expose `beforecopy` events to event
736 * handlers that are not necessarily instances of [ElementInstance].
737 *
738 * See [EventStreamProvider] for usage information.
739 */
740 @DomName('SVGElementInstance.beforecopyEvent')
741 @DocsEditable()
742 static const EventStreamProvider<Event> beforeCopyEvent = const EventStreamPro vider<Event>('beforecopy');
743
744 /**
745 * Static factory designed to expose `beforecut` events to event
746 * handlers that are not necessarily instances of [ElementInstance].
747 *
748 * See [EventStreamProvider] for usage information.
749 */
750 @DomName('SVGElementInstance.beforecutEvent')
751 @DocsEditable()
752 static const EventStreamProvider<Event> beforeCutEvent = const EventStreamProv ider<Event>('beforecut');
753
754 /**
755 * Static factory designed to expose `beforepaste` events to event
756 * handlers that are not necessarily instances of [ElementInstance].
757 *
758 * See [EventStreamProvider] for usage information.
759 */
760 @DomName('SVGElementInstance.beforepasteEvent')
761 @DocsEditable()
762 static const EventStreamProvider<Event> beforePasteEvent = const EventStreamPr ovider<Event>('beforepaste');
763
764 /**
765 * Static factory designed to expose `blur` events to event
766 * handlers that are not necessarily instances of [ElementInstance].
767 *
768 * See [EventStreamProvider] for usage information.
769 */
770 @DomName('SVGElementInstance.blurEvent')
771 @DocsEditable()
772 static const EventStreamProvider<Event> blurEvent = const EventStreamProvider< Event>('blur');
773
774 /**
775 * Static factory designed to expose `change` events to event
776 * handlers that are not necessarily instances of [ElementInstance].
777 *
778 * See [EventStreamProvider] for usage information.
779 */
780 @DomName('SVGElementInstance.changeEvent')
781 @DocsEditable()
782 static const EventStreamProvider<Event> changeEvent = const EventStreamProvide r<Event>('change');
783
784 /**
785 * Static factory designed to expose `click` events to event
786 * handlers that are not necessarily instances of [ElementInstance].
787 *
788 * See [EventStreamProvider] for usage information.
789 */
790 @DomName('SVGElementInstance.clickEvent')
791 @DocsEditable()
792 static const EventStreamProvider<MouseEvent> clickEvent = const EventStreamPro vider<MouseEvent>('click');
793
794 /**
795 * Static factory designed to expose `contextmenu` events to event
796 * handlers that are not necessarily instances of [ElementInstance].
797 *
798 * See [EventStreamProvider] for usage information.
799 */
800 @DomName('SVGElementInstance.contextmenuEvent')
801 @DocsEditable()
802 static const EventStreamProvider<MouseEvent> contextMenuEvent = const EventStr eamProvider<MouseEvent>('contextmenu');
803
804 /**
805 * Static factory designed to expose `copy` events to event
806 * handlers that are not necessarily instances of [ElementInstance].
807 *
808 * See [EventStreamProvider] for usage information.
809 */
810 @DomName('SVGElementInstance.copyEvent')
811 @DocsEditable()
812 static const EventStreamProvider<Event> copyEvent = const EventStreamProvider< Event>('copy');
813
814 /**
815 * Static factory designed to expose `cut` events to event
816 * handlers that are not necessarily instances of [ElementInstance].
817 *
818 * See [EventStreamProvider] for usage information.
819 */
820 @DomName('SVGElementInstance.cutEvent')
821 @DocsEditable()
822 static const EventStreamProvider<Event> cutEvent = const EventStreamProvider<E vent>('cut');
823
824 /**
825 * Static factory designed to expose `doubleclick` events to event
826 * handlers that are not necessarily instances of [ElementInstance].
827 *
828 * See [EventStreamProvider] for usage information.
829 */
830 @DomName('SVGElementInstance.dblclickEvent')
831 @DocsEditable()
832 static const EventStreamProvider<Event> doubleClickEvent = const EventStreamPr ovider<Event>('dblclick');
833
834 /**
835 * Static factory designed to expose `drag` events to event
836 * handlers that are not necessarily instances of [ElementInstance].
837 *
838 * See [EventStreamProvider] for usage information.
839 */
840 @DomName('SVGElementInstance.dragEvent')
841 @DocsEditable()
842 static const EventStreamProvider<MouseEvent> dragEvent = const EventStreamProv ider<MouseEvent>('drag');
843
844 /**
845 * Static factory designed to expose `dragend` events to event
846 * handlers that are not necessarily instances of [ElementInstance].
847 *
848 * See [EventStreamProvider] for usage information.
849 */
850 @DomName('SVGElementInstance.dragendEvent')
851 @DocsEditable()
852 static const EventStreamProvider<MouseEvent> dragEndEvent = const EventStreamP rovider<MouseEvent>('dragend');
853
854 /**
855 * Static factory designed to expose `dragenter` events to event
856 * handlers that are not necessarily instances of [ElementInstance].
857 *
858 * See [EventStreamProvider] for usage information.
859 */
860 @DomName('SVGElementInstance.dragenterEvent')
861 @DocsEditable()
862 static const EventStreamProvider<MouseEvent> dragEnterEvent = const EventStrea mProvider<MouseEvent>('dragenter');
863
864 /**
865 * Static factory designed to expose `dragleave` events to event
866 * handlers that are not necessarily instances of [ElementInstance].
867 *
868 * See [EventStreamProvider] for usage information.
869 */
870 @DomName('SVGElementInstance.dragleaveEvent')
871 @DocsEditable()
872 static const EventStreamProvider<MouseEvent> dragLeaveEvent = const EventStrea mProvider<MouseEvent>('dragleave');
873
874 /**
875 * Static factory designed to expose `dragover` events to event
876 * handlers that are not necessarily instances of [ElementInstance].
877 *
878 * See [EventStreamProvider] for usage information.
879 */
880 @DomName('SVGElementInstance.dragoverEvent')
881 @DocsEditable()
882 static const EventStreamProvider<MouseEvent> dragOverEvent = const EventStream Provider<MouseEvent>('dragover');
883
884 /**
885 * Static factory designed to expose `dragstart` events to event
886 * handlers that are not necessarily instances of [ElementInstance].
887 *
888 * See [EventStreamProvider] for usage information.
889 */
890 @DomName('SVGElementInstance.dragstartEvent')
891 @DocsEditable()
892 static const EventStreamProvider<MouseEvent> dragStartEvent = const EventStrea mProvider<MouseEvent>('dragstart');
893
894 /**
895 * Static factory designed to expose `drop` events to event
896 * handlers that are not necessarily instances of [ElementInstance].
897 *
898 * See [EventStreamProvider] for usage information.
899 */
900 @DomName('SVGElementInstance.dropEvent')
901 @DocsEditable()
902 static const EventStreamProvider<MouseEvent> dropEvent = const EventStreamProv ider<MouseEvent>('drop');
903
904 /**
905 * Static factory designed to expose `error` events to event
906 * handlers that are not necessarily instances of [ElementInstance].
907 *
908 * See [EventStreamProvider] for usage information.
909 */
910 @DomName('SVGElementInstance.errorEvent')
911 @DocsEditable()
912 static const EventStreamProvider<Event> errorEvent = const EventStreamProvider <Event>('error');
913
914 /**
915 * Static factory designed to expose `focus` events to event
916 * handlers that are not necessarily instances of [ElementInstance].
917 *
918 * See [EventStreamProvider] for usage information.
919 */
920 @DomName('SVGElementInstance.focusEvent')
921 @DocsEditable()
922 static const EventStreamProvider<Event> focusEvent = const EventStreamProvider <Event>('focus');
923
924 /**
925 * Static factory designed to expose `input` events to event
926 * handlers that are not necessarily instances of [ElementInstance].
927 *
928 * See [EventStreamProvider] for usage information.
929 */
930 @DomName('SVGElementInstance.inputEvent')
931 @DocsEditable()
932 static const EventStreamProvider<Event> inputEvent = const EventStreamProvider <Event>('input');
933
934 /**
935 * Static factory designed to expose `keydown` events to event
936 * handlers that are not necessarily instances of [ElementInstance].
937 *
938 * See [EventStreamProvider] for usage information.
939 */
940 @DomName('SVGElementInstance.keydownEvent')
941 @DocsEditable()
942 static const EventStreamProvider<KeyboardEvent> keyDownEvent = const EventStre amProvider<KeyboardEvent>('keydown');
943
944 /**
945 * Static factory designed to expose `keypress` events to event
946 * handlers that are not necessarily instances of [ElementInstance].
947 *
948 * See [EventStreamProvider] for usage information.
949 */
950 @DomName('SVGElementInstance.keypressEvent')
951 @DocsEditable()
952 static const EventStreamProvider<KeyboardEvent> keyPressEvent = const EventStr eamProvider<KeyboardEvent>('keypress');
953
954 /**
955 * Static factory designed to expose `keyup` events to event
956 * handlers that are not necessarily instances of [ElementInstance].
957 *
958 * See [EventStreamProvider] for usage information.
959 */
960 @DomName('SVGElementInstance.keyupEvent')
961 @DocsEditable()
962 static const EventStreamProvider<KeyboardEvent> keyUpEvent = const EventStream Provider<KeyboardEvent>('keyup');
963
964 /**
965 * Static factory designed to expose `load` events to event
966 * handlers that are not necessarily instances of [ElementInstance].
967 *
968 * See [EventStreamProvider] for usage information.
969 */
970 @DomName('SVGElementInstance.loadEvent')
971 @DocsEditable()
972 static const EventStreamProvider<Event> loadEvent = const EventStreamProvider< Event>('load');
973
974 /**
975 * Static factory designed to expose `mousedown` events to event
976 * handlers that are not necessarily instances of [ElementInstance].
977 *
978 * See [EventStreamProvider] for usage information.
979 */
980 @DomName('SVGElementInstance.mousedownEvent')
981 @DocsEditable()
982 static const EventStreamProvider<MouseEvent> mouseDownEvent = const EventStrea mProvider<MouseEvent>('mousedown');
983
984 /**
985 * Static factory designed to expose `mouseenter` events to event
986 * handlers that are not necessarily instances of [ElementInstance].
987 *
988 * See [EventStreamProvider] for usage information.
989 */
990 @DomName('SVGElementInstance.mouseenterEvent')
991 @DocsEditable()
992 @Experimental() // untriaged
993 static const EventStreamProvider<MouseEvent> mouseEnterEvent = const EventStre amProvider<MouseEvent>('mouseenter');
994
995 /**
996 * Static factory designed to expose `mouseleave` events to event
997 * handlers that are not necessarily instances of [ElementInstance].
998 *
999 * See [EventStreamProvider] for usage information.
1000 */
1001 @DomName('SVGElementInstance.mouseleaveEvent')
1002 @DocsEditable()
1003 @Experimental() // untriaged
1004 static const EventStreamProvider<MouseEvent> mouseLeaveEvent = const EventStre amProvider<MouseEvent>('mouseleave');
1005
1006 /**
1007 * Static factory designed to expose `mousemove` events to event
1008 * handlers that are not necessarily instances of [ElementInstance].
1009 *
1010 * See [EventStreamProvider] for usage information.
1011 */
1012 @DomName('SVGElementInstance.mousemoveEvent')
1013 @DocsEditable()
1014 static const EventStreamProvider<MouseEvent> mouseMoveEvent = const EventStrea mProvider<MouseEvent>('mousemove');
1015
1016 /**
1017 * Static factory designed to expose `mouseout` events to event
1018 * handlers that are not necessarily instances of [ElementInstance].
1019 *
1020 * See [EventStreamProvider] for usage information.
1021 */
1022 @DomName('SVGElementInstance.mouseoutEvent')
1023 @DocsEditable()
1024 static const EventStreamProvider<MouseEvent> mouseOutEvent = const EventStream Provider<MouseEvent>('mouseout');
1025
1026 /**
1027 * Static factory designed to expose `mouseover` events to event
1028 * handlers that are not necessarily instances of [ElementInstance].
1029 *
1030 * See [EventStreamProvider] for usage information.
1031 */
1032 @DomName('SVGElementInstance.mouseoverEvent')
1033 @DocsEditable()
1034 static const EventStreamProvider<MouseEvent> mouseOverEvent = const EventStrea mProvider<MouseEvent>('mouseover');
1035
1036 /**
1037 * Static factory designed to expose `mouseup` events to event
1038 * handlers that are not necessarily instances of [ElementInstance].
1039 *
1040 * See [EventStreamProvider] for usage information.
1041 */
1042 @DomName('SVGElementInstance.mouseupEvent')
1043 @DocsEditable()
1044 static const EventStreamProvider<MouseEvent> mouseUpEvent = const EventStreamP rovider<MouseEvent>('mouseup');
1045
1046 /**
1047 * Static factory designed to expose `mousewheel` events to event
1048 * handlers that are not necessarily instances of [ElementInstance].
1049 *
1050 * See [EventStreamProvider] for usage information.
1051 */
1052 @DomName('SVGElementInstance.mousewheelEvent')
1053 @DocsEditable()
1054 static const EventStreamProvider<WheelEvent> mouseWheelEvent = const EventStre amProvider<WheelEvent>('mousewheel');
1055
1056 /**
1057 * Static factory designed to expose `paste` events to event
1058 * handlers that are not necessarily instances of [ElementInstance].
1059 *
1060 * See [EventStreamProvider] for usage information.
1061 */
1062 @DomName('SVGElementInstance.pasteEvent')
1063 @DocsEditable()
1064 static const EventStreamProvider<Event> pasteEvent = const EventStreamProvider <Event>('paste');
1065
1066 /**
1067 * Static factory designed to expose `reset` events to event
1068 * handlers that are not necessarily instances of [ElementInstance].
1069 *
1070 * See [EventStreamProvider] for usage information.
1071 */
1072 @DomName('SVGElementInstance.resetEvent')
1073 @DocsEditable()
1074 static const EventStreamProvider<Event> resetEvent = const EventStreamProvider <Event>('reset');
1075
1076 /**
1077 * Static factory designed to expose `resize` events to event
1078 * handlers that are not necessarily instances of [ElementInstance].
1079 *
1080 * See [EventStreamProvider] for usage information.
1081 */
1082 @DomName('SVGElementInstance.resizeEvent')
1083 @DocsEditable()
1084 static const EventStreamProvider<Event> resizeEvent = const EventStreamProvide r<Event>('resize');
1085
1086 /**
1087 * Static factory designed to expose `scroll` events to event
1088 * handlers that are not necessarily instances of [ElementInstance].
1089 *
1090 * See [EventStreamProvider] for usage information.
1091 */
1092 @DomName('SVGElementInstance.scrollEvent')
1093 @DocsEditable()
1094 static const EventStreamProvider<Event> scrollEvent = const EventStreamProvide r<Event>('scroll');
1095
1096 /**
1097 * Static factory designed to expose `search` events to event
1098 * handlers that are not necessarily instances of [ElementInstance].
1099 *
1100 * See [EventStreamProvider] for usage information.
1101 */
1102 @DomName('SVGElementInstance.searchEvent')
1103 @DocsEditable()
1104 // http://www.w3.org/TR/html-markup/input.search.html
1105 @Experimental()
1106 static const EventStreamProvider<Event> searchEvent = const EventStreamProvide r<Event>('search');
1107
1108 /**
1109 * Static factory designed to expose `select` events to event
1110 * handlers that are not necessarily instances of [ElementInstance].
1111 *
1112 * See [EventStreamProvider] for usage information.
1113 */
1114 @DomName('SVGElementInstance.selectEvent')
1115 @DocsEditable()
1116 static const EventStreamProvider<Event> selectEvent = const EventStreamProvide r<Event>('select');
1117
1118 /**
1119 * Static factory designed to expose `selectstart` events to event
1120 * handlers that are not necessarily instances of [ElementInstance].
1121 *
1122 * See [EventStreamProvider] for usage information.
1123 */
1124 @DomName('SVGElementInstance.selectstartEvent')
1125 @DocsEditable()
1126 static const EventStreamProvider<Event> selectStartEvent = const EventStreamPr ovider<Event>('selectstart');
1127
1128 /**
1129 * Static factory designed to expose `submit` events to event
1130 * handlers that are not necessarily instances of [ElementInstance].
1131 *
1132 * See [EventStreamProvider] for usage information.
1133 */
1134 @DomName('SVGElementInstance.submitEvent')
1135 @DocsEditable()
1136 static const EventStreamProvider<Event> submitEvent = const EventStreamProvide r<Event>('submit');
1137
1138 /**
1139 * Static factory designed to expose `unload` events to event
1140 * handlers that are not necessarily instances of [ElementInstance].
1141 *
1142 * See [EventStreamProvider] for usage information.
1143 */
1144 @DomName('SVGElementInstance.unloadEvent')
1145 @DocsEditable()
1146 static const EventStreamProvider<Event> unloadEvent = const EventStreamProvide r<Event>('unload');
1147
1148 @DomName('SVGElementInstance.correspondingElement')
1149 @DocsEditable()
1150 final SvgElement correspondingElement;
1151
1152 @DomName('SVGElementInstance.correspondingUseElement')
1153 @DocsEditable()
1154 final UseElement correspondingUseElement;
1155
1156 @DomName('SVGElementInstance.firstChild')
1157 @DocsEditable()
1158 final ElementInstance firstChild;
1159
1160 @DomName('SVGElementInstance.lastChild')
1161 @DocsEditable()
1162 final ElementInstance lastChild;
1163
1164 @DomName('SVGElementInstance.nextSibling')
1165 @DocsEditable()
1166 final ElementInstance nextSibling;
1167
1168 @DomName('SVGElementInstance.parentNode')
1169 @DocsEditable()
1170 final ElementInstance parentNode;
1171
1172 @DomName('SVGElementInstance.previousSibling')
1173 @DocsEditable()
1174 final ElementInstance previousSibling;
1175
1176 /// Stream of `abort` events handled by this [ElementInstance].
1177 @DomName('SVGElementInstance.onabort')
1178 @DocsEditable()
1179 Stream<Event> get onAbort => abortEvent.forTarget(this);
1180
1181 /// Stream of `beforecopy` events handled by this [ElementInstance].
1182 @DomName('SVGElementInstance.onbeforecopy')
1183 @DocsEditable()
1184 Stream<Event> get onBeforeCopy => beforeCopyEvent.forTarget(this);
1185
1186 /// Stream of `beforecut` events handled by this [ElementInstance].
1187 @DomName('SVGElementInstance.onbeforecut')
1188 @DocsEditable()
1189 Stream<Event> get onBeforeCut => beforeCutEvent.forTarget(this);
1190
1191 /// Stream of `beforepaste` events handled by this [ElementInstance].
1192 @DomName('SVGElementInstance.onbeforepaste')
1193 @DocsEditable()
1194 Stream<Event> get onBeforePaste => beforePasteEvent.forTarget(this);
1195
1196 /// Stream of `blur` events handled by this [ElementInstance].
1197 @DomName('SVGElementInstance.onblur')
1198 @DocsEditable()
1199 Stream<Event> get onBlur => blurEvent.forTarget(this);
1200
1201 /// Stream of `change` events handled by this [ElementInstance].
1202 @DomName('SVGElementInstance.onchange')
1203 @DocsEditable()
1204 Stream<Event> get onChange => changeEvent.forTarget(this);
1205
1206 /// Stream of `click` events handled by this [ElementInstance].
1207 @DomName('SVGElementInstance.onclick')
1208 @DocsEditable()
1209 Stream<MouseEvent> get onClick => clickEvent.forTarget(this);
1210
1211 /// Stream of `contextmenu` events handled by this [ElementInstance].
1212 @DomName('SVGElementInstance.oncontextmenu')
1213 @DocsEditable()
1214 Stream<MouseEvent> get onContextMenu => contextMenuEvent.forTarget(this);
1215
1216 /// Stream of `copy` events handled by this [ElementInstance].
1217 @DomName('SVGElementInstance.oncopy')
1218 @DocsEditable()
1219 Stream<Event> get onCopy => copyEvent.forTarget(this);
1220
1221 /// Stream of `cut` events handled by this [ElementInstance].
1222 @DomName('SVGElementInstance.oncut')
1223 @DocsEditable()
1224 Stream<Event> get onCut => cutEvent.forTarget(this);
1225
1226 /// Stream of `doubleclick` events handled by this [ElementInstance].
1227 @DomName('SVGElementInstance.ondblclick')
1228 @DocsEditable()
1229 Stream<Event> get onDoubleClick => doubleClickEvent.forTarget(this);
1230
1231 /// Stream of `drag` events handled by this [ElementInstance].
1232 @DomName('SVGElementInstance.ondrag')
1233 @DocsEditable()
1234 Stream<MouseEvent> get onDrag => dragEvent.forTarget(this);
1235
1236 /// Stream of `dragend` events handled by this [ElementInstance].
1237 @DomName('SVGElementInstance.ondragend')
1238 @DocsEditable()
1239 Stream<MouseEvent> get onDragEnd => dragEndEvent.forTarget(this);
1240
1241 /// Stream of `dragenter` events handled by this [ElementInstance].
1242 @DomName('SVGElementInstance.ondragenter')
1243 @DocsEditable()
1244 Stream<MouseEvent> get onDragEnter => dragEnterEvent.forTarget(this);
1245
1246 /// Stream of `dragleave` events handled by this [ElementInstance].
1247 @DomName('SVGElementInstance.ondragleave')
1248 @DocsEditable()
1249 Stream<MouseEvent> get onDragLeave => dragLeaveEvent.forTarget(this);
1250
1251 /// Stream of `dragover` events handled by this [ElementInstance].
1252 @DomName('SVGElementInstance.ondragover')
1253 @DocsEditable()
1254 Stream<MouseEvent> get onDragOver => dragOverEvent.forTarget(this);
1255
1256 /// Stream of `dragstart` events handled by this [ElementInstance].
1257 @DomName('SVGElementInstance.ondragstart')
1258 @DocsEditable()
1259 Stream<MouseEvent> get onDragStart => dragStartEvent.forTarget(this);
1260
1261 /// Stream of `drop` events handled by this [ElementInstance].
1262 @DomName('SVGElementInstance.ondrop')
1263 @DocsEditable()
1264 Stream<MouseEvent> get onDrop => dropEvent.forTarget(this);
1265
1266 /// Stream of `error` events handled by this [ElementInstance].
1267 @DomName('SVGElementInstance.onerror')
1268 @DocsEditable()
1269 Stream<Event> get onError => errorEvent.forTarget(this);
1270
1271 /// Stream of `focus` events handled by this [ElementInstance].
1272 @DomName('SVGElementInstance.onfocus')
1273 @DocsEditable()
1274 Stream<Event> get onFocus => focusEvent.forTarget(this);
1275
1276 /// Stream of `input` events handled by this [ElementInstance].
1277 @DomName('SVGElementInstance.oninput')
1278 @DocsEditable()
1279 Stream<Event> get onInput => inputEvent.forTarget(this);
1280
1281 /// Stream of `keydown` events handled by this [ElementInstance].
1282 @DomName('SVGElementInstance.onkeydown')
1283 @DocsEditable()
1284 Stream<KeyboardEvent> get onKeyDown => keyDownEvent.forTarget(this);
1285
1286 /// Stream of `keypress` events handled by this [ElementInstance].
1287 @DomName('SVGElementInstance.onkeypress')
1288 @DocsEditable()
1289 Stream<KeyboardEvent> get onKeyPress => keyPressEvent.forTarget(this);
1290
1291 /// Stream of `keyup` events handled by this [ElementInstance].
1292 @DomName('SVGElementInstance.onkeyup')
1293 @DocsEditable()
1294 Stream<KeyboardEvent> get onKeyUp => keyUpEvent.forTarget(this);
1295
1296 /// Stream of `load` events handled by this [ElementInstance].
1297 @DomName('SVGElementInstance.onload')
1298 @DocsEditable()
1299 Stream<Event> get onLoad => loadEvent.forTarget(this);
1300
1301 /// Stream of `mousedown` events handled by this [ElementInstance].
1302 @DomName('SVGElementInstance.onmousedown')
1303 @DocsEditable()
1304 Stream<MouseEvent> get onMouseDown => mouseDownEvent.forTarget(this);
1305
1306 /// Stream of `mouseenter` events handled by this [ElementInstance].
1307 @DomName('SVGElementInstance.onmouseenter')
1308 @DocsEditable()
1309 @Experimental() // untriaged
1310 Stream<MouseEvent> get onMouseEnter => mouseEnterEvent.forTarget(this);
1311
1312 /// Stream of `mouseleave` events handled by this [ElementInstance].
1313 @DomName('SVGElementInstance.onmouseleave')
1314 @DocsEditable()
1315 @Experimental() // untriaged
1316 Stream<MouseEvent> get onMouseLeave => mouseLeaveEvent.forTarget(this);
1317
1318 /// Stream of `mousemove` events handled by this [ElementInstance].
1319 @DomName('SVGElementInstance.onmousemove')
1320 @DocsEditable()
1321 Stream<MouseEvent> get onMouseMove => mouseMoveEvent.forTarget(this);
1322
1323 /// Stream of `mouseout` events handled by this [ElementInstance].
1324 @DomName('SVGElementInstance.onmouseout')
1325 @DocsEditable()
1326 Stream<MouseEvent> get onMouseOut => mouseOutEvent.forTarget(this);
1327
1328 /// Stream of `mouseover` events handled by this [ElementInstance].
1329 @DomName('SVGElementInstance.onmouseover')
1330 @DocsEditable()
1331 Stream<MouseEvent> get onMouseOver => mouseOverEvent.forTarget(this);
1332
1333 /// Stream of `mouseup` events handled by this [ElementInstance].
1334 @DomName('SVGElementInstance.onmouseup')
1335 @DocsEditable()
1336 Stream<MouseEvent> get onMouseUp => mouseUpEvent.forTarget(this);
1337
1338 /// Stream of `mousewheel` events handled by this [ElementInstance].
1339 @DomName('SVGElementInstance.onmousewheel')
1340 @DocsEditable()
1341 Stream<WheelEvent> get onMouseWheel => mouseWheelEvent.forTarget(this);
1342
1343 /// Stream of `paste` events handled by this [ElementInstance].
1344 @DomName('SVGElementInstance.onpaste')
1345 @DocsEditable()
1346 Stream<Event> get onPaste => pasteEvent.forTarget(this);
1347
1348 /// Stream of `reset` events handled by this [ElementInstance].
1349 @DomName('SVGElementInstance.onreset')
1350 @DocsEditable()
1351 Stream<Event> get onReset => resetEvent.forTarget(this);
1352
1353 /// Stream of `resize` events handled by this [ElementInstance].
1354 @DomName('SVGElementInstance.onresize')
1355 @DocsEditable()
1356 Stream<Event> get onResize => resizeEvent.forTarget(this);
1357
1358 /// Stream of `scroll` events handled by this [ElementInstance].
1359 @DomName('SVGElementInstance.onscroll')
1360 @DocsEditable()
1361 Stream<Event> get onScroll => scrollEvent.forTarget(this);
1362
1363 /// Stream of `search` events handled by this [ElementInstance].
1364 @DomName('SVGElementInstance.onsearch')
1365 @DocsEditable()
1366 // http://www.w3.org/TR/html-markup/input.search.html
1367 @Experimental()
1368 Stream<Event> get onSearch => searchEvent.forTarget(this);
1369
1370 /// Stream of `select` events handled by this [ElementInstance].
1371 @DomName('SVGElementInstance.onselect')
1372 @DocsEditable()
1373 Stream<Event> get onSelect => selectEvent.forTarget(this);
1374
1375 /// Stream of `selectstart` events handled by this [ElementInstance].
1376 @DomName('SVGElementInstance.onselectstart')
1377 @DocsEditable()
1378 Stream<Event> get onSelectStart => selectStartEvent.forTarget(this);
1379
1380 /// Stream of `submit` events handled by this [ElementInstance].
1381 @DomName('SVGElementInstance.onsubmit')
1382 @DocsEditable()
1383 Stream<Event> get onSubmit => submitEvent.forTarget(this);
1384
1385 /// Stream of `unload` events handled by this [ElementInstance].
1386 @DomName('SVGElementInstance.onunload')
1387 @DocsEditable()
1388 Stream<Event> get onUnload => unloadEvent.forTarget(this);
1389 }
1390 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
1391 // for details. All rights reserved. Use of this source code is governed by a
1392 // BSD-style license that can be found in the LICENSE file.
1393
1394
1395 @DocsEditable()
1396 @DomName('SVGEllipseElement') 717 @DomName('SVGEllipseElement')
1397 @Unstable() 718 @Unstable()
1398 @Native("SVGEllipseElement") 719 @Native("SVGEllipseElement")
1399 class EllipseElement extends GeometryElement { 720 class EllipseElement extends GeometryElement {
1400 // To suppress missing implicit constructor warnings. 721 // To suppress missing implicit constructor warnings.
1401 factory EllipseElement._() { throw new UnsupportedError("Not supported"); } 722 factory EllipseElement._() { throw new UnsupportedError("Not supported"); }
1402 723
1403 @DomName('SVGEllipseElement.SVGEllipseElement') 724 @DomName('SVGEllipseElement.SVGEllipseElement')
1404 @DocsEditable() 725 @DocsEditable()
1405 factory EllipseElement() => _SvgElementFactoryProvider.createSvgElement_tag("e llipse"); 726 factory EllipseElement() => _SvgElementFactoryProvider.createSvgElement_tag("e llipse");
(...skipping 1941 matching lines...) Expand 10 before | Expand all | Expand 10 after
3347 2668
3348 2669
3349 @DocsEditable() 2670 @DocsEditable()
3350 @DomName('SVGLengthList') 2671 @DomName('SVGLengthList')
3351 @Unstable() 2672 @Unstable()
3352 @Native("SVGLengthList") 2673 @Native("SVGLengthList")
3353 class LengthList extends Interceptor with ListMixin<Length>, ImmutableListMixin< Length> implements List<Length> { 2674 class LengthList extends Interceptor with ListMixin<Length>, ImmutableListMixin< Length> implements List<Length> {
3354 // To suppress missing implicit constructor warnings. 2675 // To suppress missing implicit constructor warnings.
3355 factory LengthList._() { throw new UnsupportedError("Not supported"); } 2676 factory LengthList._() { throw new UnsupportedError("Not supported"); }
3356 2677
2678 @DomName('SVGLengthList.length')
2679 @DocsEditable()
2680 @Experimental() // untriaged
2681 int get length => JS("int", "#.length", this);
2682
3357 @DomName('SVGLengthList.numberOfItems') 2683 @DomName('SVGLengthList.numberOfItems')
3358 @DocsEditable() 2684 @DocsEditable()
3359 final int numberOfItems; 2685 final int numberOfItems;
3360 2686
3361 Length operator[](int index) { 2687 Length operator[](int index) {
3362 if (JS("bool", "# >>> 0 !== # || # >= #", index, 2688 if (JS("bool", "# >>> 0 !== # || # >= #", index,
3363 index, index, length)) 2689 index, index, length))
3364 throw new RangeError.range(index, 0, length); 2690 throw new RangeError.range(index, 0, length);
3365 return this.getItem(index); 2691 return this.getItem(index);
3366 } 2692 }
3367 void operator[]=(int index, Length value) { 2693 void operator[]=(int index, Length value) {
3368 throw new UnsupportedError("Cannot assign element of immutable List."); 2694 throw new UnsupportedError("Cannot assign element of immutable List.");
3369 } 2695 }
3370 // -- start List<Length> mixins. 2696 // -- start List<Length> mixins.
3371 // Length is the element type. 2697 // Length is the element type.
3372 2698
3373 // SVG Collections expose numberOfItems rather than length.
3374 int get length => numberOfItems;
3375 2699
3376 void set length(int value) { 2700 void set length(int value) {
3377 throw new UnsupportedError("Cannot resize immutable List."); 2701 throw new UnsupportedError("Cannot resize immutable List.");
3378 } 2702 }
3379 2703
3380 Length get first { 2704 Length get first {
3381 if (this.length > 0) { 2705 if (this.length > 0) {
3382 return JS('Length', '#[0]', this); 2706 return JS('Length', '#[0]', this);
3383 } 2707 }
3384 throw new StateError("No elements"); 2708 throw new StateError("No elements");
(...skipping 12 matching lines...) Expand all
3397 if (len == 1) { 2721 if (len == 1) {
3398 return JS('Length', '#[0]', this); 2722 return JS('Length', '#[0]', this);
3399 } 2723 }
3400 if (len == 0) throw new StateError("No elements"); 2724 if (len == 0) throw new StateError("No elements");
3401 throw new StateError("More than one element"); 2725 throw new StateError("More than one element");
3402 } 2726 }
3403 2727
3404 Length elementAt(int index) => this[index]; 2728 Length elementAt(int index) => this[index];
3405 // -- end List<Length> mixins. 2729 // -- end List<Length> mixins.
3406 2730
2731 @DomName('SVGLengthList.__setter__')
2732 @DocsEditable()
2733 @Experimental() // untriaged
2734 void __setter__(int index, Length value) native;
2735
3407 @DomName('SVGLengthList.appendItem') 2736 @DomName('SVGLengthList.appendItem')
3408 @DocsEditable() 2737 @DocsEditable()
3409 Length appendItem(Length item) native; 2738 Length appendItem(Length item) native;
3410 2739
3411 @DomName('SVGLengthList.clear') 2740 @DomName('SVGLengthList.clear')
3412 @DocsEditable() 2741 @DocsEditable()
3413 void clear() native; 2742 void clear() native;
3414 2743
3415 @DomName('SVGLengthList.getItem') 2744 @DomName('SVGLengthList.getItem')
3416 @DocsEditable() 2745 @DocsEditable()
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
3791 3120
3792 3121
3793 @DocsEditable() 3122 @DocsEditable()
3794 @DomName('SVGNumberList') 3123 @DomName('SVGNumberList')
3795 @Unstable() 3124 @Unstable()
3796 @Native("SVGNumberList") 3125 @Native("SVGNumberList")
3797 class NumberList extends Interceptor with ListMixin<Number>, ImmutableListMixin< Number> implements List<Number> { 3126 class NumberList extends Interceptor with ListMixin<Number>, ImmutableListMixin< Number> implements List<Number> {
3798 // To suppress missing implicit constructor warnings. 3127 // To suppress missing implicit constructor warnings.
3799 factory NumberList._() { throw new UnsupportedError("Not supported"); } 3128 factory NumberList._() { throw new UnsupportedError("Not supported"); }
3800 3129
3130 @DomName('SVGNumberList.length')
3131 @DocsEditable()
3132 @Experimental() // untriaged
3133 int get length => JS("int", "#.length", this);
3134
3801 @DomName('SVGNumberList.numberOfItems') 3135 @DomName('SVGNumberList.numberOfItems')
3802 @DocsEditable() 3136 @DocsEditable()
3803 final int numberOfItems; 3137 final int numberOfItems;
3804 3138
3805 Number operator[](int index) { 3139 Number operator[](int index) {
3806 if (JS("bool", "# >>> 0 !== # || # >= #", index, 3140 if (JS("bool", "# >>> 0 !== # || # >= #", index,
3807 index, index, length)) 3141 index, index, length))
3808 throw new RangeError.range(index, 0, length); 3142 throw new RangeError.range(index, 0, length);
3809 return this.getItem(index); 3143 return this.getItem(index);
3810 } 3144 }
3811 void operator[]=(int index, Number value) { 3145 void operator[]=(int index, Number value) {
3812 throw new UnsupportedError("Cannot assign element of immutable List."); 3146 throw new UnsupportedError("Cannot assign element of immutable List.");
3813 } 3147 }
3814 // -- start List<Number> mixins. 3148 // -- start List<Number> mixins.
3815 // Number is the element type. 3149 // Number is the element type.
3816 3150
3817 // SVG Collections expose numberOfItems rather than length.
3818 int get length => numberOfItems;
3819 3151
3820 void set length(int value) { 3152 void set length(int value) {
3821 throw new UnsupportedError("Cannot resize immutable List."); 3153 throw new UnsupportedError("Cannot resize immutable List.");
3822 } 3154 }
3823 3155
3824 Number get first { 3156 Number get first {
3825 if (this.length > 0) { 3157 if (this.length > 0) {
3826 return JS('Number', '#[0]', this); 3158 return JS('Number', '#[0]', this);
3827 } 3159 }
3828 throw new StateError("No elements"); 3160 throw new StateError("No elements");
(...skipping 12 matching lines...) Expand all
3841 if (len == 1) { 3173 if (len == 1) {
3842 return JS('Number', '#[0]', this); 3174 return JS('Number', '#[0]', this);
3843 } 3175 }
3844 if (len == 0) throw new StateError("No elements"); 3176 if (len == 0) throw new StateError("No elements");
3845 throw new StateError("More than one element"); 3177 throw new StateError("More than one element");
3846 } 3178 }
3847 3179
3848 Number elementAt(int index) => this[index]; 3180 Number elementAt(int index) => this[index];
3849 // -- end List<Number> mixins. 3181 // -- end List<Number> mixins.
3850 3182
3183 @DomName('SVGNumberList.__setter__')
3184 @DocsEditable()
3185 @Experimental() // untriaged
3186 void __setter__(int index, Number value) native;
3187
3851 @DomName('SVGNumberList.appendItem') 3188 @DomName('SVGNumberList.appendItem')
3852 @DocsEditable() 3189 @DocsEditable()
3853 Number appendItem(Number item) native; 3190 Number appendItem(Number item) native;
3854 3191
3855 @DomName('SVGNumberList.clear') 3192 @DomName('SVGNumberList.clear')
3856 @DocsEditable() 3193 @DocsEditable()
3857 void clear() native; 3194 void clear() native;
3858 3195
3859 @DomName('SVGNumberList.getItem') 3196 @DomName('SVGNumberList.getItem')
3860 @DocsEditable() 3197 @DocsEditable()
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after
4570 3907
4571 3908
4572 @DocsEditable() 3909 @DocsEditable()
4573 @DomName('SVGPathSegList') 3910 @DomName('SVGPathSegList')
4574 @Unstable() 3911 @Unstable()
4575 @Native("SVGPathSegList") 3912 @Native("SVGPathSegList")
4576 class PathSegList extends Interceptor with ListMixin<PathSeg>, ImmutableListMixi n<PathSeg> implements List<PathSeg> { 3913 class PathSegList extends Interceptor with ListMixin<PathSeg>, ImmutableListMixi n<PathSeg> implements List<PathSeg> {
4577 // To suppress missing implicit constructor warnings. 3914 // To suppress missing implicit constructor warnings.
4578 factory PathSegList._() { throw new UnsupportedError("Not supported"); } 3915 factory PathSegList._() { throw new UnsupportedError("Not supported"); }
4579 3916
3917 @DomName('SVGPathSegList.length')
3918 @DocsEditable()
3919 @Experimental() // untriaged
3920 int get length => JS("int", "#.length", this);
3921
4580 @DomName('SVGPathSegList.numberOfItems') 3922 @DomName('SVGPathSegList.numberOfItems')
4581 @DocsEditable() 3923 @DocsEditable()
4582 final int numberOfItems; 3924 final int numberOfItems;
4583 3925
4584 PathSeg operator[](int index) { 3926 PathSeg operator[](int index) {
4585 if (JS("bool", "# >>> 0 !== # || # >= #", index, 3927 if (JS("bool", "# >>> 0 !== # || # >= #", index,
4586 index, index, length)) 3928 index, index, length))
4587 throw new RangeError.range(index, 0, length); 3929 throw new RangeError.range(index, 0, length);
4588 return this.getItem(index); 3930 return this.getItem(index);
4589 } 3931 }
4590 void operator[]=(int index, PathSeg value) { 3932 void operator[]=(int index, PathSeg value) {
4591 throw new UnsupportedError("Cannot assign element of immutable List."); 3933 throw new UnsupportedError("Cannot assign element of immutable List.");
4592 } 3934 }
4593 // -- start List<PathSeg> mixins. 3935 // -- start List<PathSeg> mixins.
4594 // PathSeg is the element type. 3936 // PathSeg is the element type.
4595 3937
4596 // SVG Collections expose numberOfItems rather than length.
4597 int get length => numberOfItems;
4598 3938
4599 void set length(int value) { 3939 void set length(int value) {
4600 throw new UnsupportedError("Cannot resize immutable List."); 3940 throw new UnsupportedError("Cannot resize immutable List.");
4601 } 3941 }
4602 3942
4603 PathSeg get first { 3943 PathSeg get first {
4604 if (this.length > 0) { 3944 if (this.length > 0) {
4605 return JS('PathSeg', '#[0]', this); 3945 return JS('PathSeg', '#[0]', this);
4606 } 3946 }
4607 throw new StateError("No elements"); 3947 throw new StateError("No elements");
(...skipping 12 matching lines...) Expand all
4620 if (len == 1) { 3960 if (len == 1) {
4621 return JS('PathSeg', '#[0]', this); 3961 return JS('PathSeg', '#[0]', this);
4622 } 3962 }
4623 if (len == 0) throw new StateError("No elements"); 3963 if (len == 0) throw new StateError("No elements");
4624 throw new StateError("More than one element"); 3964 throw new StateError("More than one element");
4625 } 3965 }
4626 3966
4627 PathSeg elementAt(int index) => this[index]; 3967 PathSeg elementAt(int index) => this[index];
4628 // -- end List<PathSeg> mixins. 3968 // -- end List<PathSeg> mixins.
4629 3969
3970 @DomName('SVGPathSegList.__setter__')
3971 @DocsEditable()
3972 @Experimental() // untriaged
3973 void __setter__(int index, PathSeg value) native;
3974
4630 @DomName('SVGPathSegList.appendItem') 3975 @DomName('SVGPathSegList.appendItem')
4631 @DocsEditable() 3976 @DocsEditable()
4632 PathSeg appendItem(PathSeg newItem) native; 3977 PathSeg appendItem(PathSeg newItem) native;
4633 3978
4634 @DomName('SVGPathSegList.clear') 3979 @DomName('SVGPathSegList.clear')
4635 @DocsEditable() 3980 @DocsEditable()
4636 void clear() native; 3981 void clear() native;
4637 3982
4638 @DomName('SVGPathSegList.getItem') 3983 @DomName('SVGPathSegList.getItem')
4639 @DocsEditable() 3984 @DocsEditable()
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
4813 4158
4814 4159
4815 @DocsEditable() 4160 @DocsEditable()
4816 @DomName('SVGPointList') 4161 @DomName('SVGPointList')
4817 @Unstable() 4162 @Unstable()
4818 @Native("SVGPointList") 4163 @Native("SVGPointList")
4819 class PointList extends Interceptor { 4164 class PointList extends Interceptor {
4820 // To suppress missing implicit constructor warnings. 4165 // To suppress missing implicit constructor warnings.
4821 factory PointList._() { throw new UnsupportedError("Not supported"); } 4166 factory PointList._() { throw new UnsupportedError("Not supported"); }
4822 4167
4168 @DomName('SVGPointList.length')
4169 @DocsEditable()
4170 @Experimental() // untriaged
4171 final int length;
4172
4823 @DomName('SVGPointList.numberOfItems') 4173 @DomName('SVGPointList.numberOfItems')
4824 @DocsEditable() 4174 @DocsEditable()
4825 final int numberOfItems; 4175 final int numberOfItems;
4826 4176
4177 @DomName('SVGPointList.__setter__')
4178 @DocsEditable()
4179 @Experimental() // untriaged
4180 void __setter__(int index, Point value) native;
4181
4827 @DomName('SVGPointList.appendItem') 4182 @DomName('SVGPointList.appendItem')
4828 @DocsEditable() 4183 @DocsEditable()
4829 Point appendItem(Point item) native; 4184 Point appendItem(Point item) native;
4830 4185
4831 @DomName('SVGPointList.clear') 4186 @DomName('SVGPointList.clear')
4832 @DocsEditable() 4187 @DocsEditable()
4833 void clear() native; 4188 void clear() native;
4834 4189
4835 @DomName('SVGPointList.getItem') 4190 @DomName('SVGPointList.getItem')
4836 @DocsEditable() 4191 @DocsEditable()
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
5247 4602
5248 4603
5249 @DocsEditable() 4604 @DocsEditable()
5250 @DomName('SVGStringList') 4605 @DomName('SVGStringList')
5251 @Unstable() 4606 @Unstable()
5252 @Native("SVGStringList") 4607 @Native("SVGStringList")
5253 class StringList extends Interceptor with ListMixin<String>, ImmutableListMixin< String> implements List<String> { 4608 class StringList extends Interceptor with ListMixin<String>, ImmutableListMixin< String> implements List<String> {
5254 // To suppress missing implicit constructor warnings. 4609 // To suppress missing implicit constructor warnings.
5255 factory StringList._() { throw new UnsupportedError("Not supported"); } 4610 factory StringList._() { throw new UnsupportedError("Not supported"); }
5256 4611
4612 @DomName('SVGStringList.length')
4613 @DocsEditable()
4614 @Experimental() // untriaged
4615 int get length => JS("int", "#.length", this);
4616
5257 @DomName('SVGStringList.numberOfItems') 4617 @DomName('SVGStringList.numberOfItems')
5258 @DocsEditable() 4618 @DocsEditable()
5259 final int numberOfItems; 4619 final int numberOfItems;
5260 4620
5261 String operator[](int index) { 4621 String operator[](int index) {
5262 if (JS("bool", "# >>> 0 !== # || # >= #", index, 4622 if (JS("bool", "# >>> 0 !== # || # >= #", index,
5263 index, index, length)) 4623 index, index, length))
5264 throw new RangeError.range(index, 0, length); 4624 throw new RangeError.range(index, 0, length);
5265 return this.getItem(index); 4625 return this.getItem(index);
5266 } 4626 }
5267 void operator[]=(int index, String value) { 4627 void operator[]=(int index, String value) {
5268 throw new UnsupportedError("Cannot assign element of immutable List."); 4628 throw new UnsupportedError("Cannot assign element of immutable List.");
5269 } 4629 }
5270 // -- start List<String> mixins. 4630 // -- start List<String> mixins.
5271 // String is the element type. 4631 // String is the element type.
5272 4632
5273 // SVG Collections expose numberOfItems rather than length.
5274 int get length => numberOfItems;
5275 4633
5276 void set length(int value) { 4634 void set length(int value) {
5277 throw new UnsupportedError("Cannot resize immutable List."); 4635 throw new UnsupportedError("Cannot resize immutable List.");
5278 } 4636 }
5279 4637
5280 String get first { 4638 String get first {
5281 if (this.length > 0) { 4639 if (this.length > 0) {
5282 return JS('String', '#[0]', this); 4640 return JS('String', '#[0]', this);
5283 } 4641 }
5284 throw new StateError("No elements"); 4642 throw new StateError("No elements");
(...skipping 12 matching lines...) Expand all
5297 if (len == 1) { 4655 if (len == 1) {
5298 return JS('String', '#[0]', this); 4656 return JS('String', '#[0]', this);
5299 } 4657 }
5300 if (len == 0) throw new StateError("No elements"); 4658 if (len == 0) throw new StateError("No elements");
5301 throw new StateError("More than one element"); 4659 throw new StateError("More than one element");
5302 } 4660 }
5303 4661
5304 String elementAt(int index) => this[index]; 4662 String elementAt(int index) => this[index];
5305 // -- end List<String> mixins. 4663 // -- end List<String> mixins.
5306 4664
4665 @DomName('SVGStringList.__setter__')
4666 @DocsEditable()
4667 @Experimental() // untriaged
4668 void __setter__(int index, String value) native;
4669
5307 @DomName('SVGStringList.appendItem') 4670 @DomName('SVGStringList.appendItem')
5308 @DocsEditable() 4671 @DocsEditable()
5309 String appendItem(String item) native; 4672 String appendItem(String item) native;
5310 4673
5311 @DomName('SVGStringList.clear') 4674 @DomName('SVGStringList.clear')
5312 @DocsEditable() 4675 @DocsEditable()
5313 void clear() native; 4676 void clear() native;
5314 4677
5315 @DomName('SVGStringList.getItem') 4678 @DomName('SVGStringList.getItem')
5316 @DocsEditable() 4679 @DocsEditable()
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
5800 AnimatedString get _svgClassName => JS("AnimatedString", "#.className", this); 5163 AnimatedString get _svgClassName => JS("AnimatedString", "#.className", this);
5801 5164
5802 @JSName('ownerSVGElement') 5165 @JSName('ownerSVGElement')
5803 @DomName('SVGElement.ownerSVGElement') 5166 @DomName('SVGElement.ownerSVGElement')
5804 @DocsEditable() 5167 @DocsEditable()
5805 final SvgSvgElement ownerSvgElement; 5168 final SvgSvgElement ownerSvgElement;
5806 5169
5807 // Use implementation from Element. 5170 // Use implementation from Element.
5808 // final CssStyleDeclaration style; 5171 // final CssStyleDeclaration style;
5809 5172
5173 // Shadowing definition.
5174 int get tabIndex => JS("int", "#.tabIndex", this);
5175
5176 void set tabIndex(int value) {
5177 JS("void", "#.tabIndex = #", this, value);
5178 }
5179
5810 @DomName('SVGElement.viewportElement') 5180 @DomName('SVGElement.viewportElement')
5811 @DocsEditable() 5181 @DocsEditable()
5812 final SvgElement viewportElement; 5182 final SvgElement viewportElement;
5813 5183
5814 @DomName('SVGElement.xmlbase') 5184 @DomName('SVGElement.xmlbase')
5815 @DocsEditable() 5185 @DocsEditable()
5816 String xmlbase; 5186 String xmlbase;
5817 5187
5818 @DomName('SVGElement.xmllang') 5188 @DomName('SVGElement.xmllang')
5819 @DocsEditable() 5189 @DocsEditable()
(...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after
6687 6057
6688 6058
6689 @DocsEditable() 6059 @DocsEditable()
6690 @DomName('SVGTransformList') 6060 @DomName('SVGTransformList')
6691 @Unstable() 6061 @Unstable()
6692 @Native("SVGTransformList") 6062 @Native("SVGTransformList")
6693 class TransformList extends Interceptor with ListMixin<Transform>, ImmutableList Mixin<Transform> implements List<Transform> { 6063 class TransformList extends Interceptor with ListMixin<Transform>, ImmutableList Mixin<Transform> implements List<Transform> {
6694 // To suppress missing implicit constructor warnings. 6064 // To suppress missing implicit constructor warnings.
6695 factory TransformList._() { throw new UnsupportedError("Not supported"); } 6065 factory TransformList._() { throw new UnsupportedError("Not supported"); }
6696 6066
6067 @DomName('SVGTransformList.length')
6068 @DocsEditable()
6069 @Experimental() // untriaged
6070 int get length => JS("int", "#.length", this);
6071
6697 @DomName('SVGTransformList.numberOfItems') 6072 @DomName('SVGTransformList.numberOfItems')
6698 @DocsEditable() 6073 @DocsEditable()
6699 final int numberOfItems; 6074 final int numberOfItems;
6700 6075
6701 Transform operator[](int index) { 6076 Transform operator[](int index) {
6702 if (JS("bool", "# >>> 0 !== # || # >= #", index, 6077 if (JS("bool", "# >>> 0 !== # || # >= #", index,
6703 index, index, length)) 6078 index, index, length))
6704 throw new RangeError.range(index, 0, length); 6079 throw new RangeError.range(index, 0, length);
6705 return this.getItem(index); 6080 return this.getItem(index);
6706 } 6081 }
6707 void operator[]=(int index, Transform value) { 6082 void operator[]=(int index, Transform value) {
6708 throw new UnsupportedError("Cannot assign element of immutable List."); 6083 throw new UnsupportedError("Cannot assign element of immutable List.");
6709 } 6084 }
6710 // -- start List<Transform> mixins. 6085 // -- start List<Transform> mixins.
6711 // Transform is the element type. 6086 // Transform is the element type.
6712 6087
6713 // SVG Collections expose numberOfItems rather than length.
6714 int get length => numberOfItems;
6715 6088
6716 void set length(int value) { 6089 void set length(int value) {
6717 throw new UnsupportedError("Cannot resize immutable List."); 6090 throw new UnsupportedError("Cannot resize immutable List.");
6718 } 6091 }
6719 6092
6720 Transform get first { 6093 Transform get first {
6721 if (this.length > 0) { 6094 if (this.length > 0) {
6722 return JS('Transform', '#[0]', this); 6095 return JS('Transform', '#[0]', this);
6723 } 6096 }
6724 throw new StateError("No elements"); 6097 throw new StateError("No elements");
(...skipping 12 matching lines...) Expand all
6737 if (len == 1) { 6110 if (len == 1) {
6738 return JS('Transform', '#[0]', this); 6111 return JS('Transform', '#[0]', this);
6739 } 6112 }
6740 if (len == 0) throw new StateError("No elements"); 6113 if (len == 0) throw new StateError("No elements");
6741 throw new StateError("More than one element"); 6114 throw new StateError("More than one element");
6742 } 6115 }
6743 6116
6744 Transform elementAt(int index) => this[index]; 6117 Transform elementAt(int index) => this[index];
6745 // -- end List<Transform> mixins. 6118 // -- end List<Transform> mixins.
6746 6119
6120 @DomName('SVGTransformList.__setter__')
6121 @DocsEditable()
6122 @Experimental() // untriaged
6123 void __setter__(int index, Transform value) native;
6124
6747 @DomName('SVGTransformList.appendItem') 6125 @DomName('SVGTransformList.appendItem')
6748 @DocsEditable() 6126 @DocsEditable()
6749 Transform appendItem(Transform item) native; 6127 Transform appendItem(Transform item) native;
6750 6128
6751 @DomName('SVGTransformList.clear') 6129 @DomName('SVGTransformList.clear')
6752 @DocsEditable() 6130 @DocsEditable()
6753 void clear() native; 6131 void clear() native;
6754 6132
6755 @DomName('SVGTransformList.consolidate') 6133 @DomName('SVGTransformList.consolidate')
6756 @DocsEditable() 6134 @DocsEditable()
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
6822 } 6200 }
6823 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 6201 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
6824 // for details. All rights reserved. Use of this source code is governed by a 6202 // for details. All rights reserved. Use of this source code is governed by a
6825 // BSD-style license that can be found in the LICENSE file. 6203 // BSD-style license that can be found in the LICENSE file.
6826 6204
6827 6205
6828 @DocsEditable() 6206 @DocsEditable()
6829 @DomName('SVGUseElement') 6207 @DomName('SVGUseElement')
6830 @Unstable() 6208 @Unstable()
6831 @Native("SVGUseElement") 6209 @Native("SVGUseElement")
6832 class UseElement extends GraphicsElement implements UriReference, Tests { 6210 class UseElement extends GraphicsElement implements UriReference {
6833 // To suppress missing implicit constructor warnings. 6211 // To suppress missing implicit constructor warnings.
6834 factory UseElement._() { throw new UnsupportedError("Not supported"); } 6212 factory UseElement._() { throw new UnsupportedError("Not supported"); }
6835 6213
6836 @DomName('SVGUseElement.SVGUseElement') 6214 @DomName('SVGUseElement.SVGUseElement')
6837 @DocsEditable() 6215 @DocsEditable()
6838 factory UseElement() => _SvgElementFactoryProvider.createSvgElement_tag("use") ; 6216 factory UseElement() => _SvgElementFactoryProvider.createSvgElement_tag("use") ;
6839 /** 6217 /**
6840 * Constructor instantiated by the DOM when a custom element has been created. 6218 * Constructor instantiated by the DOM when a custom element has been created.
6841 * 6219 *
6842 * This can only be called by subclasses from their created constructor. 6220 * This can only be called by subclasses from their created constructor.
6843 */ 6221 */
6844 UseElement.created() : super.created(); 6222 UseElement.created() : super.created();
6845 6223
6846 @DomName('SVGUseElement.animatedInstanceRoot')
6847 @DocsEditable()
6848 final ElementInstance animatedInstanceRoot;
6849
6850 @DomName('SVGUseElement.height') 6224 @DomName('SVGUseElement.height')
6851 @DocsEditable() 6225 @DocsEditable()
6852 final AnimatedLength height; 6226 final AnimatedLength height;
6853 6227
6854 @DomName('SVGUseElement.instanceRoot')
6855 @DocsEditable()
6856 final ElementInstance instanceRoot;
6857
6858 @DomName('SVGUseElement.width') 6228 @DomName('SVGUseElement.width')
6859 @DocsEditable() 6229 @DocsEditable()
6860 final AnimatedLength width; 6230 final AnimatedLength width;
6861 6231
6862 @DomName('SVGUseElement.x') 6232 @DomName('SVGUseElement.x')
6863 @DocsEditable() 6233 @DocsEditable()
6864 final AnimatedLength x; 6234 final AnimatedLength x;
6865 6235
6866 @DomName('SVGUseElement.y') 6236 @DomName('SVGUseElement.y')
6867 @DocsEditable() 6237 @DocsEditable()
6868 final AnimatedLength y; 6238 final AnimatedLength y;
6869 6239
6870 // From SVGTests
6871
6872 @DomName('SVGUseElement.requiredExtensions')
6873 @DocsEditable()
6874 final StringList requiredExtensions;
6875
6876 @DomName('SVGUseElement.requiredFeatures')
6877 @DocsEditable()
6878 final StringList requiredFeatures;
6879
6880 @DomName('SVGUseElement.systemLanguage')
6881 @DocsEditable()
6882 final StringList systemLanguage;
6883
6884 @DomName('SVGUseElement.hasExtension')
6885 @DocsEditable()
6886 bool hasExtension(String extension) native;
6887
6888 // From SVGURIReference 6240 // From SVGURIReference
6889 6241
6890 @DomName('SVGUseElement.href') 6242 @DomName('SVGUseElement.href')
6891 @DocsEditable() 6243 @DocsEditable()
6892 final AnimatedString href; 6244 final AnimatedString href;
6893 } 6245 }
6894 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 6246 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
6895 // for details. All rights reserved. Use of this source code is governed by a 6247 // for details. All rights reserved. Use of this source code is governed by a
6896 // BSD-style license that can be found in the LICENSE file. 6248 // BSD-style license that can be found in the LICENSE file.
6897 6249
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
7048 @DomName('SVGZoomEvent.zoomRectScreen') 6400 @DomName('SVGZoomEvent.zoomRectScreen')
7049 @DocsEditable() 6401 @DocsEditable()
7050 final Rect zoomRectScreen; 6402 final Rect zoomRectScreen;
7051 } 6403 }
7052 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 6404 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
7053 // for details. All rights reserved. Use of this source code is governed by a 6405 // for details. All rights reserved. Use of this source code is governed by a
7054 // BSD-style license that can be found in the LICENSE file. 6406 // BSD-style license that can be found in the LICENSE file.
7055 6407
7056 6408
7057 @DocsEditable() 6409 @DocsEditable()
7058 @DomName('SVGElementInstanceList')
7059 @Unstable()
7060 @Native("SVGElementInstanceList")
7061 class _ElementInstanceList extends Interceptor with ListMixin<ElementInstance>, ImmutableListMixin<ElementInstance> implements List<ElementInstance> {
7062 // To suppress missing implicit constructor warnings.
7063 factory _ElementInstanceList._() { throw new UnsupportedError("Not supported") ; }
7064
7065 @DomName('SVGElementInstanceList.length')
7066 @DocsEditable()
7067 int get length => JS("int", "#.length", this);
7068
7069 ElementInstance operator[](int index) {
7070 if (JS("bool", "# >>> 0 !== # || # >= #", index,
7071 index, index, length))
7072 throw new RangeError.range(index, 0, length);
7073 return this.item(index);
7074 }
7075 void operator[]=(int index, ElementInstance value) {
7076 throw new UnsupportedError("Cannot assign element of immutable List.");
7077 }
7078 // -- start List<ElementInstance> mixins.
7079 // ElementInstance is the element type.
7080
7081
7082 void set length(int value) {
7083 throw new UnsupportedError("Cannot resize immutable List.");
7084 }
7085
7086 ElementInstance get first {
7087 if (this.length > 0) {
7088 return JS('ElementInstance', '#[0]', this);
7089 }
7090 throw new StateError("No elements");
7091 }
7092
7093 ElementInstance get last {
7094 int len = this.length;
7095 if (len > 0) {
7096 return JS('ElementInstance', '#[#]', this, len - 1);
7097 }
7098 throw new StateError("No elements");
7099 }
7100
7101 ElementInstance get single {
7102 int len = this.length;
7103 if (len == 1) {
7104 return JS('ElementInstance', '#[0]', this);
7105 }
7106 if (len == 0) throw new StateError("No elements");
7107 throw new StateError("More than one element");
7108 }
7109
7110 ElementInstance elementAt(int index) => this[index];
7111 // -- end List<ElementInstance> mixins.
7112
7113 @DomName('SVGElementInstanceList.item')
7114 @DocsEditable()
7115 ElementInstance item(int index) native;
7116 }
7117 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
7118 // for details. All rights reserved. Use of this source code is governed by a
7119 // BSD-style license that can be found in the LICENSE file.
7120
7121
7122 @DocsEditable()
7123 @DomName('SVGGradientElement') 6410 @DomName('SVGGradientElement')
7124 @Unstable() 6411 @Unstable()
7125 @Native("SVGGradientElement") 6412 @Native("SVGGradientElement")
7126 class _GradientElement extends SvgElement implements UriReference { 6413 class _GradientElement extends SvgElement implements UriReference {
7127 // To suppress missing implicit constructor warnings. 6414 // To suppress missing implicit constructor warnings.
7128 factory _GradientElement._() { throw new UnsupportedError("Not supported"); } 6415 factory _GradientElement._() { throw new UnsupportedError("Not supported"); }
7129 /** 6416 /**
7130 * Constructor instantiated by the DOM when a custom element has been created. 6417 * Constructor instantiated by the DOM when a custom element has been created.
7131 * 6418 *
7132 * This can only be called by subclasses from their created constructor. 6419 * This can only be called by subclasses from their created constructor.
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
7515 @DomName('SVGVKernElement.SVGVKernElement') 6802 @DomName('SVGVKernElement.SVGVKernElement')
7516 @DocsEditable() 6803 @DocsEditable()
7517 factory _SVGVKernElement() => _SvgElementFactoryProvider.createSvgElement_tag( "vkern"); 6804 factory _SVGVKernElement() => _SvgElementFactoryProvider.createSvgElement_tag( "vkern");
7518 /** 6805 /**
7519 * Constructor instantiated by the DOM when a custom element has been created. 6806 * Constructor instantiated by the DOM when a custom element has been created.
7520 * 6807 *
7521 * This can only be called by subclasses from their created constructor. 6808 * This can only be called by subclasses from their created constructor.
7522 */ 6809 */
7523 _SVGVKernElement.created() : super.created(); 6810 _SVGVKernElement.created() : super.created();
7524 } 6811 }
OLDNEW
« no previous file with comments | « sdk/lib/indexed_db/dartium/indexed_db_dartium.dart ('k') | sdk/lib/svg/dartium/svg_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698