OLD | NEW |
1 #library('dom'); | 1 #library('dom'); |
2 | 2 |
3 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 3 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
4 // for details. All rights reserved. Use of this source code is governed by a | 4 // for details. All rights reserved. Use of this source code is governed by a |
5 // BSD-style license that can be found in the LICENSE file. | 5 // BSD-style license that can be found in the LICENSE file. |
6 | 6 |
7 // DO NOT EDIT | 7 // DO NOT EDIT |
8 // Auto-generated Dart DOM library. | 8 // Auto-generated Dart DOM library. |
9 | 9 |
10 | 10 |
(...skipping 2303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2314 | 2314 |
2315 void seek(int position) native; | 2315 void seek(int position) native; |
2316 | 2316 |
2317 void truncate(int size) native; | 2317 void truncate(int size) native; |
2318 | 2318 |
2319 void write(_BlobJs data) native; | 2319 void write(_BlobJs data) native; |
2320 } | 2320 } |
2321 | 2321 |
2322 class _Float32ArrayJs extends _ArrayBufferViewJs implements Float32Array, List<n
um> native "*Float32Array" { | 2322 class _Float32ArrayJs extends _ArrayBufferViewJs implements Float32Array, List<n
um> native "*Float32Array" { |
2323 | 2323 |
2324 factory Float32Array(int length) => _construct_Float32Array(length); | |
2325 | |
2326 factory Float32Array.fromList(List<num> list) => _construct_Float32Array(list)
; | |
2327 | |
2328 factory Float32Array.fromBuffer(ArrayBuffer buffer) => _construct_Float32Array
(buffer); | |
2329 | |
2330 static _construct_Float32Array(arg) native 'return new Float32Array(arg);'; | |
2331 | |
2332 static final int BYTES_PER_ELEMENT = 4; | 2324 static final int BYTES_PER_ELEMENT = 4; |
2333 | 2325 |
2334 final int length; | 2326 final int length; |
2335 | 2327 |
2336 num operator[](int index) native "return this[index];"; | 2328 num operator[](int index) native "return this[index];"; |
2337 | 2329 |
2338 void operator[]=(int index, num value) native "this[index] = value"; | 2330 void operator[]=(int index, num value) native "this[index] = value"; |
2339 // -- start List<num> mixins. | 2331 // -- start List<num> mixins. |
2340 // num is the element type. | 2332 // num is the element type. |
2341 | 2333 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2397 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis
t."); | 2389 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis
t."); |
2398 } | 2390 } |
2399 void insertRange(int start, int length, [num initialValue]) { | 2391 void insertRange(int start, int length, [num initialValue]) { |
2400 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis
t."); | 2392 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis
t."); |
2401 } | 2393 } |
2402 List<num> getRange(int start, int length) => | 2394 List<num> getRange(int start, int length) => |
2403 _Lists.getRange(this, start, length, <num>[]); | 2395 _Lists.getRange(this, start, length, <num>[]); |
2404 | 2396 |
2405 // -- end List<num> mixins. | 2397 // -- end List<num> mixins. |
2406 | 2398 |
2407 void setElements(Object array, [int offset = null]) native ''' | 2399 void setElements(Object array, [int offset = null]) native 'set'; |
2408 if (offset == null) return this.set(array); | |
2409 return this.set(array, offset);'''; | |
2410 | 2400 |
2411 _Float32ArrayJs subarray(int start, [int end = null]) native; | 2401 _Float32ArrayJs subarray(int start, [int end = null]) native; |
2412 } | 2402 } |
2413 | 2403 |
2414 class _Float64ArrayJs extends _ArrayBufferViewJs implements Float64Array, List<n
um> native "*Float64Array" { | 2404 class _Float64ArrayJs extends _ArrayBufferViewJs implements Float64Array, List<n
um> native "*Float64Array" { |
2415 | 2405 |
2416 factory Float64Array(int length) => _construct_Float64Array(length); | |
2417 | |
2418 factory Float64Array.fromList(List<num> list) => _construct_Float64Array(list)
; | |
2419 | |
2420 factory Float64Array.fromBuffer(ArrayBuffer buffer) => _construct_Float64Array
(buffer); | |
2421 | |
2422 static _construct_Float64Array(arg) native 'return new Float64Array(arg);'; | |
2423 | |
2424 static final int BYTES_PER_ELEMENT = 8; | 2406 static final int BYTES_PER_ELEMENT = 8; |
2425 | 2407 |
2426 final int length; | 2408 final int length; |
2427 | 2409 |
2428 num operator[](int index) native "return this[index];"; | 2410 num operator[](int index) native "return this[index];"; |
2429 | 2411 |
2430 void operator[]=(int index, num value) native "this[index] = value"; | 2412 void operator[]=(int index, num value) native "this[index] = value"; |
2431 // -- start List<num> mixins. | 2413 // -- start List<num> mixins. |
2432 // num is the element type. | 2414 // num is the element type. |
2433 | 2415 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2489 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis
t."); | 2471 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis
t."); |
2490 } | 2472 } |
2491 void insertRange(int start, int length, [num initialValue]) { | 2473 void insertRange(int start, int length, [num initialValue]) { |
2492 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis
t."); | 2474 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis
t."); |
2493 } | 2475 } |
2494 List<num> getRange(int start, int length) => | 2476 List<num> getRange(int start, int length) => |
2495 _Lists.getRange(this, start, length, <num>[]); | 2477 _Lists.getRange(this, start, length, <num>[]); |
2496 | 2478 |
2497 // -- end List<num> mixins. | 2479 // -- end List<num> mixins. |
2498 | 2480 |
2499 void setElements(Object array, [int offset = null]) native ''' | 2481 void setElements(Object array, [int offset = null]) native 'set'; |
2500 if (offset == null) return this.set(array); | |
2501 return this.set(array, offset);'''; | |
2502 | 2482 |
2503 _Float64ArrayJs subarray(int start, [int end = null]) native; | 2483 _Float64ArrayJs subarray(int start, [int end = null]) native; |
2504 } | 2484 } |
2505 | 2485 |
2506 class _GeolocationJs extends _DOMTypeJs implements Geolocation native "*Geolocat
ion" { | 2486 class _GeolocationJs extends _DOMTypeJs implements Geolocation native "*Geolocat
ion" { |
2507 | 2487 |
2508 void clearWatch(int watchId) native; | 2488 void clearWatch(int watchId) native; |
2509 | 2489 |
2510 void getCurrentPosition(PositionCallback successCallback, [PositionErrorCallba
ck errorCallback = null]) native; | 2490 void getCurrentPosition(PositionCallback successCallback, [PositionErrorCallba
ck errorCallback = null]) native; |
2511 | 2491 |
(...skipping 1588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4100 | 4080 |
4101 final int direction; | 4081 final int direction; |
4102 | 4082 |
4103 final _IDBKeyJs key; | 4083 final _IDBKeyJs key; |
4104 | 4084 |
4105 final _IDBKeyJs primaryKey; | 4085 final _IDBKeyJs primaryKey; |
4106 | 4086 |
4107 final _IDBAnyJs source; | 4087 final _IDBAnyJs source; |
4108 | 4088 |
4109 void continueFunction([_IDBKeyJs key = null]) native ''' | 4089 void continueFunction([_IDBKeyJs key = null]) native ''' |
4110 if (key == null) return this['continue'](); | 4090 if (key == null) return this['continue'](); |
4111 return this['continue'](key); | 4091 return this['continue'](key); |
4112 '''; | 4092 '''; |
4113 | 4093 |
4114 _IDBRequestJs delete() native; | 4094 _IDBRequestJs delete() native; |
4115 | 4095 |
4116 _IDBRequestJs update(Dynamic value) native; | 4096 _IDBRequestJs update(Dynamic value) native; |
4117 } | 4097 } |
4118 | 4098 |
4119 class _IDBCursorWithValueJs extends _IDBCursorJs implements IDBCursorWithValue n
ative "*IDBCursorWithValue" { | 4099 class _IDBCursorWithValueJs extends _IDBCursorJs implements IDBCursorWithValue n
ative "*IDBCursorWithValue" { |
4120 | 4100 |
4121 final _IDBAnyJs value; | 4101 final _IDBAnyJs value; |
4122 } | 4102 } |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4214 final bool multiEntry; | 4194 final bool multiEntry; |
4215 | 4195 |
4216 final String name; | 4196 final String name; |
4217 | 4197 |
4218 final _IDBObjectStoreJs objectStore; | 4198 final _IDBObjectStoreJs objectStore; |
4219 | 4199 |
4220 final bool unique; | 4200 final bool unique; |
4221 | 4201 |
4222 _IDBRequestJs count([var key_OR_range = null]) native; | 4202 _IDBRequestJs count([var key_OR_range = null]) native; |
4223 | 4203 |
4224 _IDBRequestJs getObject(_IDBKeyJs key) native '''return this.get(key);'''; | 4204 _IDBRequestJs getObject(_IDBKeyJs key) native 'get'; |
4225 | 4205 |
4226 _IDBRequestJs getKey(_IDBKeyJs key) native; | 4206 _IDBRequestJs getKey(_IDBKeyJs key) native; |
4227 | 4207 |
4228 _IDBRequestJs openCursor([_IDBKeyRangeJs range = null, int direction = null])
native; | 4208 _IDBRequestJs openCursor([_IDBKeyRangeJs range = null, int direction = null])
native; |
4229 | 4209 |
4230 _IDBRequestJs openKeyCursor([_IDBKeyRangeJs range = null, int direction = null
]) native; | 4210 _IDBRequestJs openKeyCursor([_IDBKeyRangeJs range = null, int direction = null
]) native; |
4231 } | 4211 } |
4232 | 4212 |
4233 class _IDBKeyJs extends _DOMTypeJs implements IDBKey native "*IDBKey" { | 4213 class _IDBKeyJs extends _DOMTypeJs implements IDBKey native "*IDBKey" { |
4234 } | 4214 } |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4267 _IDBRequestJs clear() native; | 4247 _IDBRequestJs clear() native; |
4268 | 4248 |
4269 _IDBRequestJs count([var key_OR_range = null]) native; | 4249 _IDBRequestJs count([var key_OR_range = null]) native; |
4270 | 4250 |
4271 _IDBIndexJs createIndex(String name, String keyPath) native; | 4251 _IDBIndexJs createIndex(String name, String keyPath) native; |
4272 | 4252 |
4273 _IDBRequestJs delete(var key_OR_keyRange) native; | 4253 _IDBRequestJs delete(var key_OR_keyRange) native; |
4274 | 4254 |
4275 void deleteIndex(String name) native; | 4255 void deleteIndex(String name) native; |
4276 | 4256 |
4277 _IDBRequestJs getObject(_IDBKeyJs key) native '''return this.get(key);'''; | 4257 _IDBRequestJs getObject(_IDBKeyJs key) native 'get'; |
4278 | 4258 |
4279 _IDBIndexJs index(String name) native; | 4259 _IDBIndexJs index(String name) native; |
4280 | 4260 |
4281 _IDBRequestJs openCursor([_IDBKeyRangeJs range = null, int direction = null])
native; | 4261 _IDBRequestJs openCursor([_IDBKeyRangeJs range = null, int direction = null])
native; |
4282 | 4262 |
4283 _IDBRequestJs put(Dynamic value, [_IDBKeyJs key = null]) native; | 4263 _IDBRequestJs put(Dynamic value, [_IDBKeyJs key = null]) native; |
4284 } | 4264 } |
4285 | 4265 |
4286 class _IDBRequestJs extends _DOMTypeJs implements IDBRequest native "*IDBRequest
" { | 4266 class _IDBRequestJs extends _DOMTypeJs implements IDBRequest native "*IDBRequest
" { |
4287 | 4267 |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4362 | 4342 |
4363 final _CanvasPixelArrayJs data; | 4343 final _CanvasPixelArrayJs data; |
4364 | 4344 |
4365 final int height; | 4345 final int height; |
4366 | 4346 |
4367 final int width; | 4347 final int width; |
4368 } | 4348 } |
4369 | 4349 |
4370 class _Int16ArrayJs extends _ArrayBufferViewJs implements Int16Array, List<int>
native "*Int16Array" { | 4350 class _Int16ArrayJs extends _ArrayBufferViewJs implements Int16Array, List<int>
native "*Int16Array" { |
4371 | 4351 |
4372 factory Int16Array(int length) => _construct_Int16Array(length); | |
4373 | |
4374 factory Int16Array.fromList(List<int> list) => _construct_Int16Array(list); | |
4375 | |
4376 factory Int16Array.fromBuffer(ArrayBuffer buffer) => _construct_Int16Array(buf
fer); | |
4377 | |
4378 static _construct_Int16Array(arg) native 'return new Int16Array(arg);'; | |
4379 | |
4380 static final int BYTES_PER_ELEMENT = 2; | 4352 static final int BYTES_PER_ELEMENT = 2; |
4381 | 4353 |
4382 final int length; | 4354 final int length; |
4383 | 4355 |
4384 int operator[](int index) native "return this[index];"; | 4356 int operator[](int index) native "return this[index];"; |
4385 | 4357 |
4386 void operator[]=(int index, int value) native "this[index] = value"; | 4358 void operator[]=(int index, int value) native "this[index] = value"; |
4387 // -- start List<int> mixins. | 4359 // -- start List<int> mixins. |
4388 // int is the element type. | 4360 // int is the element type. |
4389 | 4361 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4445 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis
t."); | 4417 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis
t."); |
4446 } | 4418 } |
4447 void insertRange(int start, int length, [int initialValue]) { | 4419 void insertRange(int start, int length, [int initialValue]) { |
4448 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis
t."); | 4420 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis
t."); |
4449 } | 4421 } |
4450 List<int> getRange(int start, int length) => | 4422 List<int> getRange(int start, int length) => |
4451 _Lists.getRange(this, start, length, <int>[]); | 4423 _Lists.getRange(this, start, length, <int>[]); |
4452 | 4424 |
4453 // -- end List<int> mixins. | 4425 // -- end List<int> mixins. |
4454 | 4426 |
4455 void setElements(Object array, [int offset = null]) native ''' | 4427 void setElements(Object array, [int offset = null]) native 'set'; |
4456 if (offset == null) return this.set(array); | |
4457 return this.set(array, offset);'''; | |
4458 | 4428 |
4459 _Int16ArrayJs subarray(int start, [int end = null]) native; | 4429 _Int16ArrayJs subarray(int start, [int end = null]) native; |
4460 } | 4430 } |
4461 | 4431 |
4462 class _Int32ArrayJs extends _ArrayBufferViewJs implements Int32Array, List<int>
native "*Int32Array" { | 4432 class _Int32ArrayJs extends _ArrayBufferViewJs implements Int32Array, List<int>
native "*Int32Array" { |
4463 | 4433 |
4464 factory Int32Array(int length) => _construct_Int32Array(length); | |
4465 | |
4466 factory Int32Array.fromList(List<int> list) => _construct_Int32Array(list); | |
4467 | |
4468 factory Int32Array.fromBuffer(ArrayBuffer buffer) => _construct_Int32Array(buf
fer); | |
4469 | |
4470 static _construct_Int32Array(arg) native 'return new Int32Array(arg);'; | |
4471 | |
4472 static final int BYTES_PER_ELEMENT = 4; | 4434 static final int BYTES_PER_ELEMENT = 4; |
4473 | 4435 |
4474 final int length; | 4436 final int length; |
4475 | 4437 |
4476 int operator[](int index) native "return this[index];"; | 4438 int operator[](int index) native "return this[index];"; |
4477 | 4439 |
4478 void operator[]=(int index, int value) native "this[index] = value"; | 4440 void operator[]=(int index, int value) native "this[index] = value"; |
4479 // -- start List<int> mixins. | 4441 // -- start List<int> mixins. |
4480 // int is the element type. | 4442 // int is the element type. |
4481 | 4443 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4537 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis
t."); | 4499 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis
t."); |
4538 } | 4500 } |
4539 void insertRange(int start, int length, [int initialValue]) { | 4501 void insertRange(int start, int length, [int initialValue]) { |
4540 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis
t."); | 4502 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis
t."); |
4541 } | 4503 } |
4542 List<int> getRange(int start, int length) => | 4504 List<int> getRange(int start, int length) => |
4543 _Lists.getRange(this, start, length, <int>[]); | 4505 _Lists.getRange(this, start, length, <int>[]); |
4544 | 4506 |
4545 // -- end List<int> mixins. | 4507 // -- end List<int> mixins. |
4546 | 4508 |
4547 void setElements(Object array, [int offset = null]) native ''' | 4509 void setElements(Object array, [int offset = null]) native 'set'; |
4548 if (offset == null) return this.set(array); | |
4549 return this.set(array, offset);'''; | |
4550 | 4510 |
4551 _Int32ArrayJs subarray(int start, [int end = null]) native; | 4511 _Int32ArrayJs subarray(int start, [int end = null]) native; |
4552 } | 4512 } |
4553 | 4513 |
4554 class _Int8ArrayJs extends _ArrayBufferViewJs implements Int8Array, List<int> na
tive "*Int8Array" { | 4514 class _Int8ArrayJs extends _ArrayBufferViewJs implements Int8Array, List<int> na
tive "*Int8Array" { |
4555 | 4515 |
4556 factory Int8Array(int length) => _construct_Int8Array(length); | |
4557 | |
4558 factory Int8Array.fromList(List<int> list) => _construct_Int8Array(list); | |
4559 | |
4560 factory Int8Array.fromBuffer(ArrayBuffer buffer) => _construct_Int8Array(buffe
r); | |
4561 | |
4562 static _construct_Int8Array(arg) native 'return new Int8Array(arg);'; | |
4563 | |
4564 static final int BYTES_PER_ELEMENT = 1; | 4516 static final int BYTES_PER_ELEMENT = 1; |
4565 | 4517 |
4566 final int length; | 4518 final int length; |
4567 | 4519 |
4568 int operator[](int index) native "return this[index];"; | 4520 int operator[](int index) native "return this[index];"; |
4569 | 4521 |
4570 void operator[]=(int index, int value) native "this[index] = value"; | 4522 void operator[]=(int index, int value) native "this[index] = value"; |
4571 // -- start List<int> mixins. | 4523 // -- start List<int> mixins. |
4572 // int is the element type. | 4524 // int is the element type. |
4573 | 4525 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4629 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis
t."); | 4581 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis
t."); |
4630 } | 4582 } |
4631 void insertRange(int start, int length, [int initialValue]) { | 4583 void insertRange(int start, int length, [int initialValue]) { |
4632 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis
t."); | 4584 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis
t."); |
4633 } | 4585 } |
4634 List<int> getRange(int start, int length) => | 4586 List<int> getRange(int start, int length) => |
4635 _Lists.getRange(this, start, length, <int>[]); | 4587 _Lists.getRange(this, start, length, <int>[]); |
4636 | 4588 |
4637 // -- end List<int> mixins. | 4589 // -- end List<int> mixins. |
4638 | 4590 |
4639 void setElements(Object array, [int offset = null]) native ''' | 4591 void setElements(Object array, [int offset = null]) native 'set'; |
4640 if (offset == null) return this.set(array); | |
4641 return this.set(array, offset);'''; | |
4642 | 4592 |
4643 _Int8ArrayJs subarray(int start, [int end = null]) native; | 4593 _Int8ArrayJs subarray(int start, [int end = null]) native; |
4644 } | 4594 } |
4645 | 4595 |
4646 class _JavaScriptAudioNodeJs extends _AudioNodeJs implements JavaScriptAudioNode
native "*JavaScriptAudioNode" { | 4596 class _JavaScriptAudioNodeJs extends _AudioNodeJs implements JavaScriptAudioNode
native "*JavaScriptAudioNode" { |
4647 | 4597 |
4648 final int bufferSize; | 4598 final int bufferSize; |
4649 | 4599 |
4650 EventListener onaudioprocess; | 4600 EventListener onaudioprocess; |
4651 } | 4601 } |
(...skipping 5270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9922 | 9872 |
9923 final _DOMWindowJs view; | 9873 final _DOMWindowJs view; |
9924 | 9874 |
9925 final int which; | 9875 final int which; |
9926 | 9876 |
9927 void initUIEvent(String type, bool canBubble, bool cancelable, _DOMWindowJs vi
ew, int detail) native; | 9877 void initUIEvent(String type, bool canBubble, bool cancelable, _DOMWindowJs vi
ew, int detail) native; |
9928 } | 9878 } |
9929 | 9879 |
9930 class _Uint16ArrayJs extends _ArrayBufferViewJs implements Uint16Array, List<int
> native "*Uint16Array" { | 9880 class _Uint16ArrayJs extends _ArrayBufferViewJs implements Uint16Array, List<int
> native "*Uint16Array" { |
9931 | 9881 |
9932 factory Uint16Array(int length) => _construct_Uint16Array(length); | |
9933 | |
9934 factory Uint16Array.fromList(List<int> list) => _construct_Uint16Array(list); | |
9935 | |
9936 factory Uint16Array.fromBuffer(ArrayBuffer buffer) => _construct_Uint16Array(b
uffer); | |
9937 | |
9938 static _construct_Uint16Array(arg) native 'return new Uint16Array(arg);'; | |
9939 | |
9940 static final int BYTES_PER_ELEMENT = 2; | 9882 static final int BYTES_PER_ELEMENT = 2; |
9941 | 9883 |
9942 final int length; | 9884 final int length; |
9943 | 9885 |
9944 int operator[](int index) native "return this[index];"; | 9886 int operator[](int index) native "return this[index];"; |
9945 | 9887 |
9946 void operator[]=(int index, int value) native "this[index] = value"; | 9888 void operator[]=(int index, int value) native "this[index] = value"; |
9947 // -- start List<int> mixins. | 9889 // -- start List<int> mixins. |
9948 // int is the element type. | 9890 // int is the element type. |
9949 | 9891 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10005 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis
t."); | 9947 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis
t."); |
10006 } | 9948 } |
10007 void insertRange(int start, int length, [int initialValue]) { | 9949 void insertRange(int start, int length, [int initialValue]) { |
10008 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis
t."); | 9950 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis
t."); |
10009 } | 9951 } |
10010 List<int> getRange(int start, int length) => | 9952 List<int> getRange(int start, int length) => |
10011 _Lists.getRange(this, start, length, <int>[]); | 9953 _Lists.getRange(this, start, length, <int>[]); |
10012 | 9954 |
10013 // -- end List<int> mixins. | 9955 // -- end List<int> mixins. |
10014 | 9956 |
10015 void setElements(Object array, [int offset = null]) native ''' | 9957 void setElements(Object array, [int offset = null]) native 'set'; |
10016 if (offset == null) return this.set(array); | |
10017 return this.set(array, offset);'''; | |
10018 | 9958 |
10019 _Uint16ArrayJs subarray(int start, [int end = null]) native; | 9959 _Uint16ArrayJs subarray(int start, [int end = null]) native; |
10020 } | 9960 } |
10021 | 9961 |
10022 class _Uint32ArrayJs extends _ArrayBufferViewJs implements Uint32Array, List<int
> native "*Uint32Array" { | 9962 class _Uint32ArrayJs extends _ArrayBufferViewJs implements Uint32Array, List<int
> native "*Uint32Array" { |
10023 | 9963 |
10024 factory Uint32Array(int length) => _construct_Uint32Array(length); | |
10025 | |
10026 factory Uint32Array.fromList(List<int> list) => _construct_Uint32Array(list); | |
10027 | |
10028 factory Uint32Array.fromBuffer(ArrayBuffer buffer) => _construct_Uint32Array(b
uffer); | |
10029 | |
10030 static _construct_Uint32Array(arg) native 'return new Uint32Array(arg);'; | |
10031 | |
10032 static final int BYTES_PER_ELEMENT = 4; | 9964 static final int BYTES_PER_ELEMENT = 4; |
10033 | 9965 |
10034 final int length; | 9966 final int length; |
10035 | 9967 |
10036 int operator[](int index) native "return this[index];"; | 9968 int operator[](int index) native "return this[index];"; |
10037 | 9969 |
10038 void operator[]=(int index, int value) native "this[index] = value"; | 9970 void operator[]=(int index, int value) native "this[index] = value"; |
10039 // -- start List<int> mixins. | 9971 // -- start List<int> mixins. |
10040 // int is the element type. | 9972 // int is the element type. |
10041 | 9973 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10097 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis
t."); | 10029 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis
t."); |
10098 } | 10030 } |
10099 void insertRange(int start, int length, [int initialValue]) { | 10031 void insertRange(int start, int length, [int initialValue]) { |
10100 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis
t."); | 10032 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis
t."); |
10101 } | 10033 } |
10102 List<int> getRange(int start, int length) => | 10034 List<int> getRange(int start, int length) => |
10103 _Lists.getRange(this, start, length, <int>[]); | 10035 _Lists.getRange(this, start, length, <int>[]); |
10104 | 10036 |
10105 // -- end List<int> mixins. | 10037 // -- end List<int> mixins. |
10106 | 10038 |
10107 void setElements(Object array, [int offset = null]) native ''' | 10039 void setElements(Object array, [int offset = null]) native 'set'; |
10108 if (offset == null) return this.set(array); | |
10109 return this.set(array, offset);'''; | |
10110 | 10040 |
10111 _Uint32ArrayJs subarray(int start, [int end = null]) native; | 10041 _Uint32ArrayJs subarray(int start, [int end = null]) native; |
10112 } | 10042 } |
10113 | 10043 |
10114 class _Uint8ArrayJs extends _ArrayBufferViewJs implements Uint8Array, List<int>
native "*Uint8Array" { | 10044 class _Uint8ArrayJs extends _ArrayBufferViewJs implements Uint8Array, List<int>
native "*Uint8Array" { |
10115 | 10045 |
10116 factory Uint8Array(int length) => _construct_Uint8Array(length); | |
10117 | |
10118 factory Uint8Array.fromList(List<int> list) => _construct_Uint8Array(list); | |
10119 | |
10120 factory Uint8Array.fromBuffer(ArrayBuffer buffer) => _construct_Uint8Array(buf
fer); | |
10121 | |
10122 static _construct_Uint8Array(arg) native 'return new Uint8Array(arg);'; | |
10123 | |
10124 static final int BYTES_PER_ELEMENT = 1; | 10046 static final int BYTES_PER_ELEMENT = 1; |
10125 | 10047 |
10126 final int length; | 10048 final int length; |
10127 | 10049 |
10128 int operator[](int index) native "return this[index];"; | 10050 int operator[](int index) native "return this[index];"; |
10129 | 10051 |
10130 void operator[]=(int index, int value) native "this[index] = value"; | 10052 void operator[]=(int index, int value) native "this[index] = value"; |
10131 // -- start List<int> mixins. | 10053 // -- start List<int> mixins. |
10132 // int is the element type. | 10054 // int is the element type. |
10133 | 10055 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10189 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis
t."); | 10111 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis
t."); |
10190 } | 10112 } |
10191 void insertRange(int start, int length, [int initialValue]) { | 10113 void insertRange(int start, int length, [int initialValue]) { |
10192 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis
t."); | 10114 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis
t."); |
10193 } | 10115 } |
10194 List<int> getRange(int start, int length) => | 10116 List<int> getRange(int start, int length) => |
10195 _Lists.getRange(this, start, length, <int>[]); | 10117 _Lists.getRange(this, start, length, <int>[]); |
10196 | 10118 |
10197 // -- end List<int> mixins. | 10119 // -- end List<int> mixins. |
10198 | 10120 |
10199 void setElements(Object array, [int offset = null]) native ''' | 10121 void setElements(Object array, [int offset = null]) native 'set'; |
10200 if (offset == null) return this.set(array); | |
10201 return this.set(array, offset);'''; | |
10202 | 10122 |
10203 _Uint8ArrayJs subarray(int start, [int end = null]) native; | 10123 _Uint8ArrayJs subarray(int start, [int end = null]) native; |
10204 } | 10124 } |
10205 | 10125 |
10206 class _Uint8ClampedArrayJs extends _Uint8ArrayJs implements Uint8ClampedArray, L
ist<int> native "*Uint8ClampedArray" { | 10126 class _Uint8ClampedArrayJs extends _Uint8ArrayJs implements Uint8ClampedArray, L
ist<int> native "*Uint8ClampedArray" { |
10207 | 10127 |
10208 factory Uint8ClampedArray(int length) => _construct_Uint8ClampedArray(length)
; | |
10209 | |
10210 factory Uint8ClampedArray.fromList(List<int> list) => _construct_Uint8ClampedA
rray(list); | |
10211 | |
10212 factory Uint8ClampedArray.fromBuffer(ArrayBuffer buffer) => _construct_Uint8Cl
ampedArray(buffer); | |
10213 | |
10214 static _construct_Uint8ClampedArray(arg) native 'return new Uint8ClampedArray(
arg);'; | |
10215 | |
10216 // Use implementation from Uint8Array. | 10128 // Use implementation from Uint8Array. |
10217 // final int length; | 10129 // final int length; |
10218 | 10130 |
10219 void setElements(Object array, [int offset = null]) native ''' | 10131 void setElements(Object array, [int offset = null]) native 'set'; |
10220 if (offset == null) return this.set(array); | |
10221 return this.set(array, offset);'''; | |
10222 | 10132 |
10223 _Uint8ClampedArrayJs subarray(int start, [int end = null]) native; | 10133 _Uint8ClampedArrayJs subarray(int start, [int end = null]) native; |
10224 } | 10134 } |
10225 | 10135 |
10226 class _ValidityStateJs extends _DOMTypeJs implements ValidityState native "*Vali
dityState" { | 10136 class _ValidityStateJs extends _DOMTypeJs implements ValidityState native "*Vali
dityState" { |
10227 | 10137 |
10228 final bool customError; | 10138 final bool customError; |
10229 | 10139 |
10230 final bool patternMismatch; | 10140 final bool patternMismatch; |
10231 | 10141 |
(...skipping 14630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
24862 if (length < 0) throw new IllegalArgumentException('length'); | 24772 if (length < 0) throw new IllegalArgumentException('length'); |
24863 if (start < 0) throw new IndexOutOfRangeException(start); | 24773 if (start < 0) throw new IndexOutOfRangeException(start); |
24864 int end = start + length; | 24774 int end = start + length; |
24865 if (end > a.length) throw new IndexOutOfRangeException(end); | 24775 if (end > a.length) throw new IndexOutOfRangeException(end); |
24866 for (int i = start; i < end; i++) { | 24776 for (int i = start; i < end; i++) { |
24867 accumulator.add(a[i]); | 24777 accumulator.add(a[i]); |
24868 } | 24778 } |
24869 return accumulator; | 24779 return accumulator; |
24870 } | 24780 } |
24871 } | 24781 } |
OLD | NEW |