| OLD | NEW |
| 1 library html; | 1 library html; |
| 2 | 2 |
| 3 import 'dart:isolate'; | 3 import 'dart:isolate'; |
| 4 import 'dart:json'; | 4 import 'dart:json'; |
| 5 import 'dart:svg' as svg; | 5 import 'dart:svg' as svg; |
| 6 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 6 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 7 // for details. All rights reserved. Use of this source code is governed by a | 7 // for details. All rights reserved. Use of this source code is governed by a |
| 8 // BSD-style license that can be found in the LICENSE file. | 8 // BSD-style license that can be found in the LICENSE file. |
| 9 | 9 |
| 10 // DO NOT EDIT | 10 // DO NOT EDIT |
| 11 // Auto-generated dart:html library. | 11 // Auto-generated dart:html library. |
| 12 | 12 |
| 13 | 13 |
| 14 | 14 |
| 15 | 15 |
| 16 | 16 |
| 17 | 17 |
| 18 | 18 |
| 19 LocalWindow get window => JS('LocalWindow', 'window'); | 19 LocalWindow get window => JS('LocalWindow', 'window'); |
| 20 | 20 |
| 21 Document get document => JS('Document', 'document'); | 21 HtmlDocument get document => JS('Document', 'document'); |
| 22 | 22 |
| 23 Element query(String selector) => document.query(selector); | 23 Element query(String selector) => document.query(selector); |
| 24 List<Element> queryAll(String selector) => document.queryAll(selector); | 24 List<Element> queryAll(String selector) => document.queryAll(selector); |
| 25 | 25 |
| 26 // Workaround for tags like <cite> that lack their own Element subclass -- | 26 // Workaround for tags like <cite> that lack their own Element subclass -- |
| 27 // Dart issue 1990. | 27 // Dart issue 1990. |
| 28 class HTMLElement extends Element native "*HTMLElement" { | 28 class HTMLElement extends Element native "*HTMLElement" { |
| 29 } | 29 } |
| 30 | 30 |
| 31 // Support for Send/ReceivePortSync. | 31 // Support for Send/ReceivePortSync. |
| (...skipping 5225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5257 /** @domName DOMImplementation.createCSSStyleSheet */ | 5257 /** @domName DOMImplementation.createCSSStyleSheet */ |
| 5258 CSSStyleSheet createCSSStyleSheet(String title, String media) native; | 5258 CSSStyleSheet createCSSStyleSheet(String title, String media) native; |
| 5259 | 5259 |
| 5260 /** @domName DOMImplementation.createDocument */ | 5260 /** @domName DOMImplementation.createDocument */ |
| 5261 Document createDocument(String namespaceURI, String qualifiedName, DocumentTyp
e doctype) native; | 5261 Document createDocument(String namespaceURI, String qualifiedName, DocumentTyp
e doctype) native; |
| 5262 | 5262 |
| 5263 /** @domName DOMImplementation.createDocumentType */ | 5263 /** @domName DOMImplementation.createDocumentType */ |
| 5264 DocumentType createDocumentType(String qualifiedName, String publicId, String
systemId) native; | 5264 DocumentType createDocumentType(String qualifiedName, String publicId, String
systemId) native; |
| 5265 | 5265 |
| 5266 /** @domName DOMImplementation.createHTMLDocument */ | 5266 /** @domName DOMImplementation.createHTMLDocument */ |
| 5267 Document createHTMLDocument(String title) native; | 5267 HtmlDocument createHTMLDocument(String title) native; |
| 5268 | 5268 |
| 5269 /** @domName DOMImplementation.hasFeature */ | 5269 /** @domName DOMImplementation.hasFeature */ |
| 5270 bool hasFeature(String feature, String version) native; | 5270 bool hasFeature(String feature, String version) native; |
| 5271 } | 5271 } |
| 5272 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 5272 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 5273 // for details. All rights reserved. Use of this source code is governed by a | 5273 // for details. All rights reserved. Use of this source code is governed by a |
| 5274 // BSD-style license that can be found in the LICENSE file. | 5274 // BSD-style license that can be found in the LICENSE file. |
| 5275 | 5275 |
| 5276 | 5276 |
| 5277 /// @domName MimeType | 5277 /// @domName MimeType |
| (...skipping 782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6060 factory DivElement() => _Elements.createDivElement(); | 6060 factory DivElement() => _Elements.createDivElement(); |
| 6061 | 6061 |
| 6062 /** @domName HTMLDivElement.align */ | 6062 /** @domName HTMLDivElement.align */ |
| 6063 String align; | 6063 String align; |
| 6064 } | 6064 } |
| 6065 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 6065 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 6066 // for details. All rights reserved. Use of this source code is governed by a | 6066 // for details. All rights reserved. Use of this source code is governed by a |
| 6067 // BSD-style license that can be found in the LICENSE file. | 6067 // BSD-style license that can be found in the LICENSE file. |
| 6068 | 6068 |
| 6069 | 6069 |
| 6070 class Document extends Node | 6070 class Document extends Node native "*Document" |
| 6071 native "*HTMLDocument" | |
| 6072 { | 6071 { |
| 6073 | 6072 |
| 6074 | 6073 |
| 6075 /** | 6074 /** |
| 6076 * @domName EventTarget.addEventListener, EventTarget.removeEventListener, Eve
ntTarget.dispatchEvent | 6075 * @domName EventTarget.addEventListener, EventTarget.removeEventListener, Eve
ntTarget.dispatchEvent |
| 6077 */ | 6076 */ |
| 6078 DocumentEvents get on => | 6077 DocumentEvents get on => |
| 6079 new DocumentEvents(this); | 6078 new DocumentEvents(this); |
| 6080 | 6079 |
| 6081 /** @domName HTMLDocument.activeElement */ | 6080 /** @domName Document.body */ |
| 6082 final Element activeElement; | 6081 Element get $dom_body => JS("Element", "#.body", this); |
| 6083 | 6082 |
| 6084 /** @domName Document.body */ | 6083 /** @domName Document.body */ |
| 6085 Element body; | 6084 void set $dom_body(Element value) { |
| 6085 JS("void", "#.body = #", this, value); |
| 6086 } |
| 6086 | 6087 |
| 6087 /** @domName Document.charset */ | 6088 /** @domName Document.charset */ |
| 6088 String charset; | 6089 String charset; |
| 6089 | 6090 |
| 6090 /** @domName Document.cookie */ | 6091 /** @domName Document.cookie */ |
| 6091 String cookie; | 6092 String cookie; |
| 6092 | 6093 |
| 6093 /** @domName Document.defaultView */ | 6094 /** @domName Document.defaultView */ |
| 6094 Window get window => _convertNativeToDart_Window(this._window); | 6095 Window get window => _convertNativeToDart_Window(this._window); |
| 6095 dynamic get _window => JS("dynamic", "#.defaultView", this); | 6096 dynamic get _window => JS("dynamic", "#.defaultView", this); |
| 6096 | 6097 |
| 6097 /** @domName Document.documentElement */ | 6098 /** @domName Document.documentElement */ |
| 6098 final Element documentElement; | 6099 final Element documentElement; |
| 6099 | 6100 |
| 6100 /** @domName Document.domain */ | 6101 /** @domName Document.domain */ |
| 6101 final String domain; | 6102 final String domain; |
| 6102 | 6103 |
| 6103 /** @domName Document.head */ | 6104 /** @domName Document.head */ |
| 6104 final HeadElement head; | 6105 HeadElement get $dom_head => JS("HeadElement", "#.head", this); |
| 6105 | 6106 |
| 6106 /** @domName Document.implementation */ | 6107 /** @domName Document.implementation */ |
| 6107 final DOMImplementation implementation; | 6108 final DOMImplementation implementation; |
| 6108 | 6109 |
| 6109 /** @domName Document.lastModified */ | 6110 /** @domName Document.lastModified */ |
| 6110 final String lastModified; | 6111 String get $dom_lastModified => JS("String", "#.lastModified", this); |
| 6111 | 6112 |
| 6112 /** @domName Document.preferredStylesheetSet */ | 6113 /** @domName Document.preferredStylesheetSet */ |
| 6113 final String preferredStylesheetSet; | 6114 final String preferredStylesheetSet; |
| 6114 | 6115 |
| 6115 /** @domName Document.readyState */ | 6116 /** @domName Document.readyState */ |
| 6116 final String readyState; | 6117 final String readyState; |
| 6117 | 6118 |
| 6118 /** @domName Document.referrer */ | 6119 /** @domName Document.referrer */ |
| 6119 final String referrer; | 6120 String get $dom_referrer => JS("String", "#.referrer", this); |
| 6120 | 6121 |
| 6121 /** @domName Document.selectedStylesheetSet */ | 6122 /** @domName Document.selectedStylesheetSet */ |
| 6122 String selectedStylesheetSet; | 6123 String selectedStylesheetSet; |
| 6123 | 6124 |
| 6124 /** @domName Document.styleSheets */ | 6125 /** @domName Document.styleSheets */ |
| 6125 final List<StyleSheet> styleSheets; | 6126 List<StyleSheet> get $dom_styleSheets => JS("List<StyleSheet>", "#.styleSheets
", this); |
| 6126 | 6127 |
| 6127 /** @domName Document.title */ | 6128 /** @domName Document.title */ |
| 6128 String title; | 6129 String get $dom_title => JS("String", "#.title", this); |
| 6129 | 6130 |
| 6130 /** @domName Document.webkitCurrentFullScreenElement */ | 6131 /** @domName Document.title */ |
| 6131 final Element webkitCurrentFullScreenElement; | 6132 void set $dom_title(String value) { |
| 6132 | 6133 JS("void", "#.title = #", this, value); |
| 6133 /** @domName Document.webkitFullScreenKeyboardInputAllowed */ | 6134 } |
| 6134 final bool webkitFullScreenKeyboardInputAllowed; | |
| 6135 | 6135 |
| 6136 /** @domName Document.webkitFullscreenElement */ | 6136 /** @domName Document.webkitFullscreenElement */ |
| 6137 final Element webkitFullscreenElement; | 6137 Element get $dom_webkitFullscreenElement => JS("Element", "#.webkitFullscreenE
lement", this); |
| 6138 | 6138 |
| 6139 /** @domName Document.webkitFullscreenEnabled */ | 6139 /** @domName Document.webkitFullscreenEnabled */ |
| 6140 final bool webkitFullscreenEnabled; | 6140 bool get $dom_webkitFullscreenEnabled => JS("bool", "#.webkitFullscreenEnabled
", this); |
| 6141 | 6141 |
| 6142 /** @domName Document.webkitHidden */ | 6142 /** @domName Document.webkitHidden */ |
| 6143 final bool webkitHidden; | 6143 bool get $dom_webkitHidden => JS("bool", "#.webkitHidden", this); |
| 6144 | 6144 |
| 6145 /** @domName Document.webkitIsFullScreen */ | 6145 /** @domName Document.webkitIsFullScreen */ |
| 6146 final bool webkitIsFullScreen; | 6146 bool get $dom_webkitIsFullScreen => JS("bool", "#.webkitIsFullScreen", this); |
| 6147 | 6147 |
| 6148 /** @domName Document.webkitPointerLockElement */ | 6148 /** @domName Document.webkitPointerLockElement */ |
| 6149 final Element webkitPointerLockElement; | 6149 Element get $dom_webkitPointerLockElement => JS("Element", "#.webkitPointerLoc
kElement", this); |
| 6150 | 6150 |
| 6151 /** @domName Document.webkitVisibilityState */ | 6151 /** @domName Document.webkitVisibilityState */ |
| 6152 final String webkitVisibilityState; | 6152 String get $dom_webkitVisibilityState => JS("String", "#.webkitVisibilityState
", this); |
| 6153 | 6153 |
| 6154 /** @domName Document.caretRangeFromPoint */ | 6154 /** @domName Document.caretRangeFromPoint */ |
| 6155 Range caretRangeFromPoint(int x, int y) native; | 6155 Range $dom_caretRangeFromPoint(int x, int y) native "caretRangeFromPoint"; |
| 6156 | 6156 |
| 6157 /** @domName Document.createCDATASection */ | 6157 /** @domName Document.createCDATASection */ |
| 6158 CDATASection createCDATASection(String data) native; | 6158 CDATASection createCDATASection(String data) native; |
| 6159 | 6159 |
| 6160 /** @domName Document.createDocumentFragment */ | 6160 /** @domName Document.createDocumentFragment */ |
| 6161 DocumentFragment createDocumentFragment() native; | 6161 DocumentFragment createDocumentFragment() native; |
| 6162 | 6162 |
| 6163 /** @domName Document.createElement */ | 6163 /** @domName Document.createElement */ |
| 6164 Element $dom_createElement(String tagName) native "createElement"; | 6164 Element $dom_createElement(String tagName) native "createElement"; |
| 6165 | 6165 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 6179 Touch createTouch(LocalWindow window, EventTarget target, int identifier, int
pageX, int pageY, int screenX, int screenY, int webkitRadiusX, int webkitRadiusY
, num webkitRotationAngle, num webkitForce) { | 6179 Touch createTouch(LocalWindow window, EventTarget target, int identifier, int
pageX, int pageY, int screenX, int screenY, int webkitRadiusX, int webkitRadiusY
, num webkitRotationAngle, num webkitForce) { |
| 6180 var target_1 = _convertDartToNative_EventTarget(target); | 6180 var target_1 = _convertDartToNative_EventTarget(target); |
| 6181 return _createTouch_1(window, target_1, identifier, pageX, pageY, screenX, s
creenY, webkitRadiusX, webkitRadiusY, webkitRotationAngle, webkitForce); | 6181 return _createTouch_1(window, target_1, identifier, pageX, pageY, screenX, s
creenY, webkitRadiusX, webkitRadiusY, webkitRotationAngle, webkitForce); |
| 6182 } | 6182 } |
| 6183 Touch _createTouch_1(LocalWindow window, target, identifier, pageX, pageY, scr
eenX, screenY, webkitRadiusX, webkitRadiusY, webkitRotationAngle, webkitForce) n
ative "createTouch"; | 6183 Touch _createTouch_1(LocalWindow window, target, identifier, pageX, pageY, scr
eenX, screenY, webkitRadiusX, webkitRadiusY, webkitRotationAngle, webkitForce) n
ative "createTouch"; |
| 6184 | 6184 |
| 6185 /** @domName Document.createTouchList */ | 6185 /** @domName Document.createTouchList */ |
| 6186 TouchList $dom_createTouchList() native "createTouchList"; | 6186 TouchList $dom_createTouchList() native "createTouchList"; |
| 6187 | 6187 |
| 6188 /** @domName Document.elementFromPoint */ | 6188 /** @domName Document.elementFromPoint */ |
| 6189 Element elementFromPoint(int x, int y) native; | 6189 Element $dom_elementFromPoint(int x, int y) native "elementFromPoint"; |
| 6190 | 6190 |
| 6191 /** @domName Document.execCommand */ | 6191 /** @domName Document.execCommand */ |
| 6192 bool execCommand(String command, bool userInterface, String value) native; | 6192 bool execCommand(String command, bool userInterface, String value) native; |
| 6193 | 6193 |
| 6194 /** @domName Document.getCSSCanvasContext */ | 6194 /** @domName Document.getCSSCanvasContext */ |
| 6195 CanvasRenderingContext getCSSCanvasContext(String contextId, String name, int
width, int height) native; | 6195 CanvasRenderingContext getCSSCanvasContext(String contextId, String name, int
width, int height) native; |
| 6196 | 6196 |
| 6197 /** @domName Document.getElementById */ | 6197 /** @domName Document.getElementById */ |
| 6198 Element $dom_getElementById(String elementId) native "getElementById"; | 6198 Element $dom_getElementById(String elementId) native "getElementById"; |
| 6199 | 6199 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 6221 /** @domName Document.queryCommandValue */ | 6221 /** @domName Document.queryCommandValue */ |
| 6222 String queryCommandValue(String command) native; | 6222 String queryCommandValue(String command) native; |
| 6223 | 6223 |
| 6224 /** @domName Document.querySelector */ | 6224 /** @domName Document.querySelector */ |
| 6225 Element $dom_querySelector(String selectors) native "querySelector"; | 6225 Element $dom_querySelector(String selectors) native "querySelector"; |
| 6226 | 6226 |
| 6227 /** @domName Document.querySelectorAll */ | 6227 /** @domName Document.querySelectorAll */ |
| 6228 List<Node> $dom_querySelectorAll(String selectors) native "querySelectorAll"; | 6228 List<Node> $dom_querySelectorAll(String selectors) native "querySelectorAll"; |
| 6229 | 6229 |
| 6230 /** @domName Document.webkitCancelFullScreen */ | 6230 /** @domName Document.webkitCancelFullScreen */ |
| 6231 void webkitCancelFullScreen() native; | 6231 void $dom_webkitCancelFullScreen() native "webkitCancelFullScreen"; |
| 6232 | 6232 |
| 6233 /** @domName Document.webkitExitFullscreen */ | 6233 /** @domName Document.webkitExitFullscreen */ |
| 6234 void webkitExitFullscreen() native; | 6234 void $dom_webkitExitFullscreen() native "webkitExitFullscreen"; |
| 6235 | 6235 |
| 6236 /** @domName Document.webkitExitPointerLock */ | 6236 /** @domName Document.webkitExitPointerLock */ |
| 6237 void webkitExitPointerLock() native; | 6237 void $dom_webkitExitPointerLock() native "webkitExitPointerLock"; |
| 6238 | 6238 |
| 6239 // TODO(jacobr): implement all Element methods not on Document. | 6239 // TODO(jacobr): implement all Element methods not on Document. |
| 6240 | 6240 |
| 6241 Element query(String selectors) { | 6241 Element query(String selectors) { |
| 6242 // It is fine for our RegExp to detect element id query selectors to have | 6242 // It is fine for our RegExp to detect element id query selectors to have |
| 6243 // false negatives but not false positives. | 6243 // false negatives but not false positives. |
| 6244 if (new RegExp("^#[_a-zA-Z]\\w*\$").hasMatch(selectors)) { | 6244 if (new RegExp("^#[_a-zA-Z]\\w*\$").hasMatch(selectors)) { |
| 6245 return $dom_getElementById(selectors.substring(1)); | 6245 return $dom_getElementById(selectors.substring(1)); |
| 6246 } | 6246 } |
| 6247 return $dom_querySelector(selectors); | 6247 return $dom_querySelector(selectors); |
| (...skipping 3072 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9320 | 9320 |
| 9321 factory HeadingElement.h6() => _Elements.createHeadingElement_h6(); | 9321 factory HeadingElement.h6() => _Elements.createHeadingElement_h6(); |
| 9322 | 9322 |
| 9323 /** @domName HTMLHeadingElement.align */ | 9323 /** @domName HTMLHeadingElement.align */ |
| 9324 String align; | 9324 String align; |
| 9325 } | 9325 } |
| 9326 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 9326 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 9327 // for details. All rights reserved. Use of this source code is governed by a | 9327 // for details. All rights reserved. Use of this source code is governed by a |
| 9328 // BSD-style license that can be found in the LICENSE file. | 9328 // BSD-style license that can be found in the LICENSE file. |
| 9329 | 9329 |
| 9330 // WARNING: Do not edit - generated code. |
| 9331 |
| 9332 |
| 9333 class HtmlDocument extends Document native "*HTMLDocument" { |
| 9334 |
| 9335 /** @domName HTMLDocument.activeElement */ |
| 9336 final Element activeElement; |
| 9337 |
| 9338 /** @domName Document.body */ |
| 9339 BodyElement get body => document.$dom_body; |
| 9340 |
| 9341 /** @domName Document.body */ |
| 9342 void set body(BodyElement value) { |
| 9343 document.$dom_body = value; |
| 9344 } |
| 9345 |
| 9346 /** @domName Document.caretRangeFromPoint */ |
| 9347 Range caretRangeFromPoint(int x, int y) { |
| 9348 return document.$dom_caretRangeFromPoint(x, y); |
| 9349 } |
| 9350 |
| 9351 /** @domName Document.elementFromPoint */ |
| 9352 Element elementFromPoint(int x, int y) { |
| 9353 return document.$dom_elementFromPoint(x, y); |
| 9354 } |
| 9355 |
| 9356 /** @domName Document.head */ |
| 9357 HeadElement get head => document.$dom_head; |
| 9358 |
| 9359 /** @domName Document.lastModified */ |
| 9360 String get lastModified => document.$dom_lastModified; |
| 9361 |
| 9362 /** @domName Document.referrer */ |
| 9363 String get referrer => document.$dom_referrer; |
| 9364 |
| 9365 /** @domName Document.styleSheets */ |
| 9366 List<StyleSheet> get styleSheets => document.$dom_styleSheets; |
| 9367 |
| 9368 /** @domName Document.title */ |
| 9369 String get title => document.$dom_title; |
| 9370 |
| 9371 /** @domName Document.title */ |
| 9372 void set title(String value) { |
| 9373 document.$dom_title = value; |
| 9374 } |
| 9375 |
| 9376 /** @domName Document.webkitCancelFullScreen */ |
| 9377 void webkitCancelFullScreen() { |
| 9378 document.$dom_webkitCancelFullScreen(); |
| 9379 } |
| 9380 |
| 9381 /** @domName Document.webkitExitFullscreen */ |
| 9382 void webkitExitFullscreen() { |
| 9383 document.$dom_webkitExitFullscreen(); |
| 9384 } |
| 9385 |
| 9386 /** @domName Document.webkitExitPointerLock */ |
| 9387 void webkitExitPointerLock() { |
| 9388 document.$dom_webkitExitPointerLock(); |
| 9389 } |
| 9390 |
| 9391 /** @domName Document.webkitFullscreenElement */ |
| 9392 Element get webkitFullscreenElement => document.$dom_webkitFullscreenElement; |
| 9393 |
| 9394 /** @domName Document.webkitFullscreenEnabled */ |
| 9395 bool get webkitFullscreenEnabled => document.$dom_webkitFullscreenEnabled; |
| 9396 |
| 9397 /** @domName Document.webkitHidden */ |
| 9398 bool get webkitHidden => document.$dom_webkitHidden; |
| 9399 |
| 9400 /** @domName Document.webkitIsFullScreen */ |
| 9401 bool get webkitIsFullScreen => document.$dom_webkitIsFullScreen; |
| 9402 |
| 9403 /** @domName Document.webkitPointerLockElement */ |
| 9404 Element get webkitPointerLockElement => |
| 9405 document.$dom_webkitPointerLockElement; |
| 9406 |
| 9407 /** @domName Document.webkitVisibilityState */ |
| 9408 String get webkitVisibilityState => document.$dom_webkitVisibilityState; |
| 9409 } |
| 9410 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 9411 // for details. All rights reserved. Use of this source code is governed by a |
| 9412 // BSD-style license that can be found in the LICENSE file. |
| 9413 |
| 9330 | 9414 |
| 9331 /// @domName HTMLHtmlElement | 9415 /// @domName HTMLHtmlElement |
| 9332 class HtmlElement extends Element implements Element native "*HTMLHtmlElement" { | 9416 class HtmlElement extends Element implements Element native "*HTMLHtmlElement" { |
| 9333 | 9417 |
| 9334 factory HtmlElement() => _Elements.createHtmlElement(); | 9418 factory HtmlElement() => _Elements.createHtmlElement(); |
| 9335 } | 9419 } |
| 9336 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 9420 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 9337 // for details. All rights reserved. Use of this source code is governed by a | 9421 // for details. All rights reserved. Use of this source code is governed by a |
| 9338 // BSD-style license that can be found in the LICENSE file. | 9422 // BSD-style license that can be found in the LICENSE file. |
| 9339 | 9423 |
| (...skipping 15517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 24857 if (length < 0) throw new ArgumentError('length'); | 24941 if (length < 0) throw new ArgumentError('length'); |
| 24858 if (start < 0) throw new RangeError.value(start); | 24942 if (start < 0) throw new RangeError.value(start); |
| 24859 int end = start + length; | 24943 int end = start + length; |
| 24860 if (end > a.length) throw new RangeError.value(end); | 24944 if (end > a.length) throw new RangeError.value(end); |
| 24861 for (int i = start; i < end; i++) { | 24945 for (int i = start; i < end; i++) { |
| 24862 accumulator.add(a[i]); | 24946 accumulator.add(a[i]); |
| 24863 } | 24947 } |
| 24864 return accumulator; | 24948 return accumulator; |
| 24865 } | 24949 } |
| 24866 } | 24950 } |
| OLD | NEW |