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 26382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
26393 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 26393 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
26394 // for details. All rights reserved. Use of this source code is governed by a | 26394 // for details. All rights reserved. Use of this source code is governed by a |
26395 // BSD-style license that can be found in the LICENSE file. | 26395 // BSD-style license that can be found in the LICENSE file. |
26396 | 26396 |
26397 | 26397 |
26398 // These factory methods could all live in one factory provider class but dartc | 26398 // These factory methods could all live in one factory provider class but dartc |
26399 // has a bug (5399939) preventing that. | 26399 // has a bug (5399939) preventing that. |
26400 | 26400 |
26401 class _AudioContextFactoryProvider { | 26401 class _AudioContextFactoryProvider { |
26402 | 26402 |
26403 factory AudioContext() native '''return new AudioContext();'''; | 26403 factory AudioContext() native ''' |
| 26404 var constructor = window.AudioContext || window.webkitAudioContext; |
| 26405 return new constructor(); |
| 26406 '''; |
26404 } | 26407 } |
26405 | 26408 |
26406 class _FileReaderFactoryProvider { | 26409 class _FileReaderFactoryProvider { |
26407 | 26410 |
26408 factory FileReader() native '''return new FileReader();'''; | 26411 factory FileReader() native '''return new FileReader();'''; |
26409 } | 26412 } |
26410 | 26413 |
26411 class _TypedArrayFactoryProvider { | 26414 class _TypedArrayFactoryProvider { |
26412 | 26415 |
26413 factory Float32Array(int length) => _F32(length); | 26416 factory Float32Array(int length) => _F32(length); |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
26550 startIndex = a.length - 1; | 26553 startIndex = a.length - 1; |
26551 } | 26554 } |
26552 for (int i = startIndex; i >= 0; i--) { | 26555 for (int i = startIndex; i >= 0; i--) { |
26553 if (a[i] == element) { | 26556 if (a[i] == element) { |
26554 return i; | 26557 return i; |
26555 } | 26558 } |
26556 } | 26559 } |
26557 return -1; | 26560 return -1; |
26558 } | 26561 } |
26559 } | 26562 } |
OLD | NEW |