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 1219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1230 String createObjectURL(blob_OR_stream) native; | 1230 String createObjectURL(blob_OR_stream) native; |
1231 | 1231 |
1232 void revokeObjectURL(String url) native; | 1232 void revokeObjectURL(String url) native; |
1233 } | 1233 } |
1234 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1234 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
1235 // for details. All rights reserved. Use of this source code is governed by a | 1235 // for details. All rights reserved. Use of this source code is governed by a |
1236 // BSD-style license that can be found in the LICENSE file. | 1236 // BSD-style license that can be found in the LICENSE file. |
1237 | 1237 |
1238 class _DOMWindowJs extends _EventTargetJs implements DOMWindow native "@*DOMWind ow" { | 1238 class _DOMWindowJs extends _EventTargetJs implements DOMWindow native "@*DOMWind ow" { |
1239 | 1239 |
1240 Window get _top() native "return this.top;"; | |
1241 | |
1242 // Override top to return secure wrapper. | |
1243 Window get top() => _DOMWindowCrossFrameImpl._createSafe(_top); | |
1244 | |
1245 int requestAnimationFrame(RequestAnimationFrameCallback callback) native ''' | |
1246 if (!window.requestAnimationFrame) { | |
1247 window.requestAnimationFrame = | |
1248 window.webkitRequestAnimationFrame || | |
1249 window.mozRequestAnimationFrame || | |
1250 window.msRequestAnimationFrame || | |
1251 window.oRequestAnimationFrame || | |
1252 function (callback) { window.setTimeout(callback, 1000/60); }; | |
dgrove
2012/04/21 04:47:49
did you consider something more like http://paulir
sra1
2012/04/24 18:57:09
tl;dr: yes.
This 'is' the first version at that p
| |
1253 } | |
1254 return window.requestAnimationFrame(callback); | |
1255 '''; | |
1256 | |
1257 // Protect member 'requestAnimationFrame'. | |
1258 _requestAnimationFrame() native 'requestAnimationFrame'; | |
1259 | |
1260 | |
1240 static final int PERSISTENT = 1; | 1261 static final int PERSISTENT = 1; |
1241 | 1262 |
1242 static final int TEMPORARY = 0; | 1263 static final int TEMPORARY = 0; |
1243 | 1264 |
1244 final _DOMApplicationCacheJs applicationCache; | 1265 final _DOMApplicationCacheJs applicationCache; |
1245 | 1266 |
1246 final _NavigatorJs clientInformation; | 1267 final _NavigatorJs clientInformation; |
1247 | 1268 |
1248 final bool closed; | 1269 final bool closed; |
1249 | 1270 |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1416 _WebKitPointJs webkitConvertPointFromPageToNode(_NodeJs node, _WebKitPointJs p ) native; | 1437 _WebKitPointJs webkitConvertPointFromPageToNode(_NodeJs node, _WebKitPointJs p ) native; |
1417 | 1438 |
1418 void webkitPostMessage(message, String targetOrigin, [List transferList = null ]) native; | 1439 void webkitPostMessage(message, String targetOrigin, [List transferList = null ]) native; |
1419 | 1440 |
1420 int webkitRequestAnimationFrame(RequestAnimationFrameCallback callback) native ; | 1441 int webkitRequestAnimationFrame(RequestAnimationFrameCallback callback) native ; |
1421 | 1442 |
1422 void webkitRequestFileSystem(int type, int size, FileSystemCallback successCal lback, [ErrorCallback errorCallback = null]) native; | 1443 void webkitRequestFileSystem(int type, int size, FileSystemCallback successCal lback, [ErrorCallback errorCallback = null]) native; |
1423 | 1444 |
1424 void webkitResolveLocalFileSystemURL(String url, [EntryCallback successCallbac k = null, ErrorCallback errorCallback = null]) native; | 1445 void webkitResolveLocalFileSystemURL(String url, [EntryCallback successCallbac k = null, ErrorCallback errorCallback = null]) native; |
1425 | 1446 |
1426 | |
1427 Window get _top() native "return this.top;"; | |
1428 | |
1429 // Override top to return secure wrapper. | |
1430 Window get top() => _DOMWindowCrossFrameImpl._createSafe(_top); | |
1431 } | 1447 } |
1432 | 1448 |
1433 class _DataTransferItemJs extends _DOMTypeJs implements DataTransferItem native "*DataTransferItem" { | 1449 class _DataTransferItemJs extends _DOMTypeJs implements DataTransferItem native "*DataTransferItem" { |
1434 | 1450 |
1435 final String kind; | 1451 final String kind; |
1436 | 1452 |
1437 final String type; | 1453 final String type; |
1438 | 1454 |
1439 _BlobJs getAsFile() native; | 1455 _BlobJs getAsFile() native; |
1440 | 1456 |
(...skipping 23745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
25186 if (length < 0) throw new IllegalArgumentException('length'); | 25202 if (length < 0) throw new IllegalArgumentException('length'); |
25187 if (start < 0) throw new IndexOutOfRangeException(start); | 25203 if (start < 0) throw new IndexOutOfRangeException(start); |
25188 int end = start + length; | 25204 int end = start + length; |
25189 if (end > a.length) throw new IndexOutOfRangeException(end); | 25205 if (end > a.length) throw new IndexOutOfRangeException(end); |
25190 for (int i = start; i < end; i++) { | 25206 for (int i = start; i < end; i++) { |
25191 accumulator.add(a[i]); | 25207 accumulator.add(a[i]); |
25192 } | 25208 } |
25193 return accumulator; | 25209 return accumulator; |
25194 } | 25210 } |
25195 } | 25211 } |
OLD | NEW |