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

Side by Side Diff: sdk/lib/html/dart2js/html_dart2js.dart

Issue 16494002: Expand overloaded methods and optional parameters in the html library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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 /// The Dart HTML library. 1 /// The Dart HTML library.
2 library dart.dom.html; 2 library dart.dom.html;
3 3
4 import 'dart:async'; 4 import 'dart:async';
5 import 'dart:collection'; 5 import 'dart:collection';
6 import 'dart:_collection-dev' hide Symbol; 6 import 'dart:_collection-dev' hide Symbol;
7 import 'dart:html_common'; 7 import 'dart:html_common';
8 import 'dart:indexed_db'; 8 import 'dart:indexed_db';
9 import 'dart:isolate'; 9 import 'dart:isolate';
10 import 'dart:json' as json; 10 import 'dart:json' as json;
(...skipping 1158 matching lines...) Expand 10 before | Expand all | Expand 10 after
1169 _createImageDataFromImageData_1(imagedata) native; 1169 _createImageDataFromImageData_1(imagedata) native;
1170 1170
1171 @DomName('CanvasRenderingContext2D.createLinearGradient') 1171 @DomName('CanvasRenderingContext2D.createLinearGradient')
1172 @DocsEditable 1172 @DocsEditable
1173 CanvasGradient createLinearGradient(num x0, num y0, num x1, num y1) native; 1173 CanvasGradient createLinearGradient(num x0, num y0, num x1, num y1) native;
1174 1174
1175 @DomName('CanvasRenderingContext2D.createPattern') 1175 @DomName('CanvasRenderingContext2D.createPattern')
1176 @DocsEditable 1176 @DocsEditable
1177 CanvasPattern createPattern(canvas_OR_image, String repetitionType) native; 1177 CanvasPattern createPattern(canvas_OR_image, String repetitionType) native;
1178 1178
1179 @JSName('createPattern')
1180 @DomName('CanvasRenderingContext2D.createPattern')
1181 @DocsEditable
1182 CanvasPattern createPatternFromCanvas(CanvasElement canvas, String repetitionT ype) native;
1183
1184 @JSName('createPattern')
1185 @DomName('CanvasRenderingContext2D.createPattern')
1186 @DocsEditable
1187 CanvasPattern createPatternFromImage(ImageElement image, String repetitionType ) native;
1188
1179 @DomName('CanvasRenderingContext2D.createRadialGradient') 1189 @DomName('CanvasRenderingContext2D.createRadialGradient')
1180 @DocsEditable 1190 @DocsEditable
1181 CanvasGradient createRadialGradient(num x0, num y0, num r0, num x1, num y1, nu m r1) native; 1191 CanvasGradient createRadialGradient(num x0, num y0, num r0, num x1, num y1, nu m r1) native;
1182 1192
1183 @DomName('CanvasRenderingContext2D.fill') 1193 @DomName('CanvasRenderingContext2D.fill')
1184 @DocsEditable 1194 @DocsEditable
1185 void fill([String winding]) native; 1195 void fill([String winding]) native;
1186 1196
1187 @DomName('CanvasRenderingContext2D.fillRect') 1197 @DomName('CanvasRenderingContext2D.fillRect')
1188 @DocsEditable 1198 @DocsEditable
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
1275 void rotate(num angle) native; 1285 void rotate(num angle) native;
1276 1286
1277 @DomName('CanvasRenderingContext2D.save') 1287 @DomName('CanvasRenderingContext2D.save')
1278 @DocsEditable 1288 @DocsEditable
1279 void save() native; 1289 void save() native;
1280 1290
1281 @DomName('CanvasRenderingContext2D.scale') 1291 @DomName('CanvasRenderingContext2D.scale')
1282 @DocsEditable 1292 @DocsEditable
1283 void scale(num sx, num sy) native; 1293 void scale(num sx, num sy) native;
1284 1294
1295 @JSName('setFillColor')
1296 @DomName('CanvasRenderingContext2D.setFillColor')
1297 @DocsEditable
1298 @Experimental // non-standard
1299 void setFillColorCmyk(num c, num m, num y, num k, num a) native;
1300
1301 @JSName('setFillColor')
1302 @DomName('CanvasRenderingContext2D.setFillColor')
1303 @DocsEditable
1304 @Experimental // non-standard
1305 void setFillColorGrayLevel(num grayLevel, [num alpha]) native;
1306
1307 @JSName('setFillColor')
1308 @DomName('CanvasRenderingContext2D.setFillColor')
1309 @DocsEditable
1310 @Experimental // non-standard
1311 void setFillColorRgb(num r, num g, num b, num a) native;
1312
1313 @JSName('setFillColor')
1314 @DomName('CanvasRenderingContext2D.setFillColor')
1315 @DocsEditable
1316 @Experimental // non-standard
1317 void setFillColorString(String color, [num alpha]) native;
1318
1285 @DomName('CanvasRenderingContext2D.setLineDash') 1319 @DomName('CanvasRenderingContext2D.setLineDash')
1286 @DocsEditable 1320 @DocsEditable
1287 void setLineDash(List<num> dash) native; 1321 void setLineDash(List<num> dash) native;
1288 1322
1323 @JSName('setShadow')
1324 @DomName('CanvasRenderingContext2D.setShadow')
1325 @DocsEditable
1326 @Experimental // non-standard
1327 void setShadowCmyk(num width, num height, num blur, num c, num m, num y, num k , num a) native;
1328
1329 @JSName('setShadow')
1330 @DomName('CanvasRenderingContext2D.setShadow')
1331 @DocsEditable
1332 @Experimental // non-standard
1333 void setShadowGrayLevel(num width, num height, num blur, num grayLevel, [num a lpha]) native;
1334
1335 @JSName('setShadow')
1336 @DomName('CanvasRenderingContext2D.setShadow')
1337 @DocsEditable
1338 @Experimental // non-standard
1339 void setShadowRgb(num width, num height, num blur, num r, num g, num b, num a) native;
1340
1341 @JSName('setShadow')
1342 @DomName('CanvasRenderingContext2D.setShadow')
1343 @DocsEditable
1344 @Experimental // non-standard
1345 void setShadowString(num width, num height, num blur, [String color, num alpha ]) native;
1346
1347 @JSName('setStrokeColor')
1348 @DomName('CanvasRenderingContext2D.setStrokeColor')
1349 @DocsEditable
1350 @Experimental // non-standard
1351 void setStrokeColorCmyk(num c, num m, num y, num k, num a) native;
1352
1353 @JSName('setStrokeColor')
1354 @DomName('CanvasRenderingContext2D.setStrokeColor')
1355 @DocsEditable
1356 @Experimental // non-standard
1357 void setStrokeColorGrayLevel(num grayLevel, [num alpha]) native;
1358
1359 @JSName('setStrokeColor')
1360 @DomName('CanvasRenderingContext2D.setStrokeColor')
1361 @DocsEditable
1362 @Experimental // non-standard
1363 void setStrokeColorRgb(num r, num g, num b, num a) native;
1364
1365 @JSName('setStrokeColor')
1366 @DomName('CanvasRenderingContext2D.setStrokeColor')
1367 @DocsEditable
1368 @Experimental // non-standard
1369 void setStrokeColorString(String color, [num alpha]) native;
1370
1289 @DomName('CanvasRenderingContext2D.setTransform') 1371 @DomName('CanvasRenderingContext2D.setTransform')
1290 @DocsEditable 1372 @DocsEditable
1291 void setTransform(num m11, num m12, num m21, num m22, num dx, num dy) native; 1373 void setTransform(num m11, num m12, num m21, num m22, num dx, num dy) native;
1292 1374
1293 @DomName('CanvasRenderingContext2D.stroke') 1375 @DomName('CanvasRenderingContext2D.stroke')
1294 @DocsEditable 1376 @DocsEditable
1295 void stroke() native; 1377 void stroke() native;
1296 1378
1297 @DomName('CanvasRenderingContext2D.strokeRect') 1379 @DomName('CanvasRenderingContext2D.strokeRect')
1298 @DocsEditable 1380 @DocsEditable
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
1912 1994
1913 @DocsEditable 1995 @DocsEditable
1914 @DomName('CSS') 1996 @DomName('CSS')
1915 // http://www.w3.org/TR/css3-conditional/#the-css-interface 1997 // http://www.w3.org/TR/css3-conditional/#the-css-interface
1916 @Experimental // None 1998 @Experimental // None
1917 class Css native "CSS" { 1999 class Css native "CSS" {
1918 2000
1919 @DomName('CSS.supports') 2001 @DomName('CSS.supports')
1920 @DocsEditable 2002 @DocsEditable
1921 bool supports(String conditionText_OR_property, [String value]) native; 2003 bool supports(String conditionText_OR_property, [String value]) native;
2004
2005 @JSName('supports')
2006 @DomName('CSS.supports')
2007 @DocsEditable
2008 bool supportsCondition(String conditionText) native;
2009
2010 @JSName('supports')
2011 @DomName('CSS.supports')
2012 @DocsEditable
2013 bool supportsProperty(String property, String value) native;
1922 } 2014 }
1923 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 2015 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
1924 // for details. All rights reserved. Use of this source code is governed by a 2016 // for details. All rights reserved. Use of this source code is governed by a
1925 // BSD-style license that can be found in the LICENSE file. 2017 // BSD-style license that can be found in the LICENSE file.
1926 2018
1927 2019
1928 @DocsEditable 2020 @DocsEditable
1929 @DomName('CSSCharsetRule') 2021 @DomName('CSSCharsetRule')
1930 // http://dev.w3.org/csswg/cssom/#the-csscharsetrule-interface 2022 // http://dev.w3.org/csswg/cssom/#the-csscharsetrule-interface
1931 @Experimental 2023 @Experimental
(...skipping 4199 matching lines...) Expand 10 before | Expand all | Expand 10 after
6131 class DataTransferItemList native "DataTransferItemList" { 6223 class DataTransferItemList native "DataTransferItemList" {
6132 6224
6133 @DomName('DataTransferItemList.length') 6225 @DomName('DataTransferItemList.length')
6134 @DocsEditable 6226 @DocsEditable
6135 final int length; 6227 final int length;
6136 6228
6137 @DomName('DataTransferItemList.add') 6229 @DomName('DataTransferItemList.add')
6138 @DocsEditable 6230 @DocsEditable
6139 void add(data_OR_file, [String type]) native; 6231 void add(data_OR_file, [String type]) native;
6140 6232
6233 @JSName('add')
6234 @DomName('DataTransferItemList.add')
6235 @DocsEditable
6236 void addData(String data, String type) native;
6237
6238 @JSName('add')
6239 @DomName('DataTransferItemList.add')
6240 @DocsEditable
6241 void addFile(File file) native;
6242
6141 @DomName('DataTransferItemList.clear') 6243 @DomName('DataTransferItemList.clear')
6142 @DocsEditable 6244 @DocsEditable
6143 void clear() native; 6245 void clear() native;
6144 6246
6145 @DomName('DataTransferItemList.item') 6247 @DomName('DataTransferItemList.item')
6146 @DocsEditable 6248 @DocsEditable
6147 DataTransferItem item(int index) native; 6249 DataTransferItem item(int index) native;
6148 } 6250 }
6149 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 6251 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
6150 // for details. All rights reserved. Use of this source code is governed by a 6252 // for details. All rights reserved. Use of this source code is governed by a
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
6370 6472
6371 @DomName('DirectoryEntry.createReader') 6473 @DomName('DirectoryEntry.createReader')
6372 @DocsEditable 6474 @DocsEditable
6373 DirectoryReader createReader() native; 6475 DirectoryReader createReader() native;
6374 6476
6375 @DomName('DirectoryEntry.getDirectory') 6477 @DomName('DirectoryEntry.getDirectory')
6376 @DocsEditable 6478 @DocsEditable
6377 void __getDirectory(String path, {Map options, _EntryCallback successCallback, _ErrorCallback errorCallback}) { 6479 void __getDirectory(String path, {Map options, _EntryCallback successCallback, _ErrorCallback errorCallback}) {
6378 if (errorCallback != null) { 6480 if (errorCallback != null) {
6379 var options_1 = convertDartToNative_Dictionary(options); 6481 var options_1 = convertDartToNative_Dictionary(options);
6380 ___getDirectory_1(path, options_1, successCallback, errorCallback); 6482 __getDirectory_1(path, options_1, successCallback, errorCallback);
6381 return; 6483 return;
6382 } 6484 }
6383 if (successCallback != null) { 6485 if (successCallback != null) {
6384 var options_2 = convertDartToNative_Dictionary(options); 6486 var options_2 = convertDartToNative_Dictionary(options);
6385 ___getDirectory_2(path, options_2, successCallback); 6487 __getDirectory_2(path, options_2, successCallback);
6386 return; 6488 return;
6387 } 6489 }
6388 if (options != null) { 6490 if (options != null) {
6389 var options_3 = convertDartToNative_Dictionary(options); 6491 var options_3 = convertDartToNative_Dictionary(options);
6390 ___getDirectory_3(path, options_3); 6492 __getDirectory_3(path, options_3);
6391 return; 6493 return;
6392 } 6494 }
6393 ___getDirectory_4(path); 6495 __getDirectory_4(path);
6394 return; 6496 return;
6395 } 6497 }
6396 @JSName('getDirectory') 6498 @JSName('getDirectory')
6397 @DomName('DirectoryEntry.getDirectory') 6499 @DomName('DirectoryEntry.getDirectory')
6398 @DocsEditable 6500 @DocsEditable
6399 void ___getDirectory_1(path, options, _EntryCallback successCallback, _ErrorCa llback errorCallback) native; 6501 void __getDirectory_1(path, options, _EntryCallback successCallback, _ErrorCal lback errorCallback) native;
6400 @JSName('getDirectory') 6502 @JSName('getDirectory')
6401 @DomName('DirectoryEntry.getDirectory') 6503 @DomName('DirectoryEntry.getDirectory')
6402 @DocsEditable 6504 @DocsEditable
6403 void ___getDirectory_2(path, options, _EntryCallback successCallback) native; 6505 void __getDirectory_2(path, options, _EntryCallback successCallback) native;
6404 @JSName('getDirectory') 6506 @JSName('getDirectory')
6405 @DomName('DirectoryEntry.getDirectory') 6507 @DomName('DirectoryEntry.getDirectory')
6406 @DocsEditable 6508 @DocsEditable
6407 void ___getDirectory_3(path, options) native; 6509 void __getDirectory_3(path, options) native;
6408 @JSName('getDirectory') 6510 @JSName('getDirectory')
6409 @DomName('DirectoryEntry.getDirectory') 6511 @DomName('DirectoryEntry.getDirectory')
6410 @DocsEditable 6512 @DocsEditable
6411 void ___getDirectory_4(path) native; 6513 void __getDirectory_4(path) native;
6412 6514
6413 @JSName('getDirectory') 6515 @JSName('getDirectory')
6414 @DomName('DirectoryEntry.getDirectory') 6516 @DomName('DirectoryEntry.getDirectory')
6415 @DocsEditable 6517 @DocsEditable
6416 Future<Entry> _getDirectory(String path, {Map options}) { 6518 Future<Entry> _getDirectory(String path, {Map options}) {
6417 var completer = new Completer<Entry>(); 6519 var completer = new Completer<Entry>();
6418 __getDirectory(path, options : options, 6520 __getDirectory(path, options : options,
6419 successCallback : (value) { completer.complete(value); }, 6521 successCallback : (value) { completer.complete(value); },
6420 errorCallback : (error) { completer.completeError(error); }); 6522 errorCallback : (error) { completer.completeError(error); });
6421 return completer.future; 6523 return completer.future;
6422 } 6524 }
6423 6525
6424 @DomName('DirectoryEntry.getFile') 6526 @DomName('DirectoryEntry.getFile')
6425 @DocsEditable 6527 @DocsEditable
6426 void __getFile(String path, {Map options, _EntryCallback successCallback, _Err orCallback errorCallback}) { 6528 void __getFile(String path, {Map options, _EntryCallback successCallback, _Err orCallback errorCallback}) {
6427 if (errorCallback != null) { 6529 if (errorCallback != null) {
6428 var options_1 = convertDartToNative_Dictionary(options); 6530 var options_1 = convertDartToNative_Dictionary(options);
6429 ___getFile_1(path, options_1, successCallback, errorCallback); 6531 __getFile_1(path, options_1, successCallback, errorCallback);
6430 return; 6532 return;
6431 } 6533 }
6432 if (successCallback != null) { 6534 if (successCallback != null) {
6433 var options_2 = convertDartToNative_Dictionary(options); 6535 var options_2 = convertDartToNative_Dictionary(options);
6434 ___getFile_2(path, options_2, successCallback); 6536 __getFile_2(path, options_2, successCallback);
6435 return; 6537 return;
6436 } 6538 }
6437 if (options != null) { 6539 if (options != null) {
6438 var options_3 = convertDartToNative_Dictionary(options); 6540 var options_3 = convertDartToNative_Dictionary(options);
6439 ___getFile_3(path, options_3); 6541 __getFile_3(path, options_3);
6440 return; 6542 return;
6441 } 6543 }
6442 ___getFile_4(path); 6544 __getFile_4(path);
6443 return; 6545 return;
6444 } 6546 }
6445 @JSName('getFile') 6547 @JSName('getFile')
6446 @DomName('DirectoryEntry.getFile') 6548 @DomName('DirectoryEntry.getFile')
6447 @DocsEditable 6549 @DocsEditable
6448 void ___getFile_1(path, options, _EntryCallback successCallback, _ErrorCallbac k errorCallback) native; 6550 void __getFile_1(path, options, _EntryCallback successCallback, _ErrorCallback errorCallback) native;
6449 @JSName('getFile') 6551 @JSName('getFile')
6450 @DomName('DirectoryEntry.getFile') 6552 @DomName('DirectoryEntry.getFile')
6451 @DocsEditable 6553 @DocsEditable
6452 void ___getFile_2(path, options, _EntryCallback successCallback) native; 6554 void __getFile_2(path, options, _EntryCallback successCallback) native;
6453 @JSName('getFile') 6555 @JSName('getFile')
6454 @DomName('DirectoryEntry.getFile') 6556 @DomName('DirectoryEntry.getFile')
6455 @DocsEditable 6557 @DocsEditable
6456 void ___getFile_3(path, options) native; 6558 void __getFile_3(path, options) native;
6457 @JSName('getFile') 6559 @JSName('getFile')
6458 @DomName('DirectoryEntry.getFile') 6560 @DomName('DirectoryEntry.getFile')
6459 @DocsEditable 6561 @DocsEditable
6460 void ___getFile_4(path) native; 6562 void __getFile_4(path) native;
6461 6563
6462 @JSName('getFile') 6564 @JSName('getFile')
6463 @DomName('DirectoryEntry.getFile') 6565 @DomName('DirectoryEntry.getFile')
6464 @DocsEditable 6566 @DocsEditable
6465 Future<Entry> _getFile(String path, {Map options}) { 6567 Future<Entry> _getFile(String path, {Map options}) {
6466 var completer = new Completer<Entry>(); 6568 var completer = new Completer<Entry>();
6467 __getFile(path, options : options, 6569 __getFile(path, options : options,
6468 successCallback : (value) { completer.complete(value); }, 6570 successCallback : (value) { completer.complete(value); },
6469 errorCallback : (error) { completer.completeError(error); }); 6571 errorCallback : (error) { completer.completeError(error); });
6470 return completer.future; 6572 return completer.future;
(...skipping 4443 matching lines...) Expand 10 before | Expand all | Expand 10 after
10914 } 11016 }
10915 static FormData _create_1(form) => JS('FormData', 'new FormData(#)', form); 11017 static FormData _create_1(form) => JS('FormData', 'new FormData(#)', form);
10916 static FormData _create_2() => JS('FormData', 'new FormData()'); 11018 static FormData _create_2() => JS('FormData', 'new FormData()');
10917 11019
10918 /// Checks if this type is supported on the current platform. 11020 /// Checks if this type is supported on the current platform.
10919 static bool get supported => JS('bool', '!!(window.FormData)'); 11021 static bool get supported => JS('bool', '!!(window.FormData)');
10920 11022
10921 @DomName('FormData.append') 11023 @DomName('FormData.append')
10922 @DocsEditable 11024 @DocsEditable
10923 void append(String name, value, [String filename]) native; 11025 void append(String name, value, [String filename]) native;
11026
11027 @JSName('append')
11028 @DomName('FormData.append')
11029 @DocsEditable
11030 void appendBlob(String name, Blob value, [String filename]) native;
11031
11032 @JSName('append')
11033 @DomName('FormData.append')
11034 @DocsEditable
11035 void appendString(String name, String value) native;
10924 } 11036 }
10925 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 11037 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
10926 // for details. All rights reserved. Use of this source code is governed by a 11038 // for details. All rights reserved. Use of this source code is governed by a
10927 // BSD-style license that can be found in the LICENSE file. 11039 // BSD-style license that can be found in the LICENSE file.
10928 11040
10929 11041
10930 @DocsEditable 11042 @DocsEditable
10931 @DomName('HTMLFormElement') 11043 @DomName('HTMLFormElement')
10932 class FormElement extends _HTMLElement native "HTMLFormElement" { 11044 class FormElement extends _HTMLElement native "HTMLFormElement" {
10933 11045
(...skipping 4918 matching lines...) Expand 10 before | Expand all | Expand 10 after
15852 class MutationObserver native "MutationObserver,WebKitMutationObserver" { 15964 class MutationObserver native "MutationObserver,WebKitMutationObserver" {
15853 15965
15854 @DomName('MutationObserver.disconnect') 15966 @DomName('MutationObserver.disconnect')
15855 @DocsEditable 15967 @DocsEditable
15856 void disconnect() native; 15968 void disconnect() native;
15857 15969
15858 @DomName('MutationObserver.observe') 15970 @DomName('MutationObserver.observe')
15859 @DocsEditable 15971 @DocsEditable
15860 void _observe(Node target, Map options) { 15972 void _observe(Node target, Map options) {
15861 var options_1 = convertDartToNative_Dictionary(options); 15973 var options_1 = convertDartToNative_Dictionary(options);
15862 __observe_1(target, options_1); 15974 _observe_1(target, options_1);
15863 return; 15975 return;
15864 } 15976 }
15865 @JSName('observe') 15977 @JSName('observe')
15866 @DomName('MutationObserver.observe') 15978 @DomName('MutationObserver.observe')
15867 @DocsEditable 15979 @DocsEditable
15868 void __observe_1(Node target, options) native; 15980 void _observe_1(Node target, options) native;
15869 15981
15870 @DomName('MutationObserver.takeRecords') 15982 @DomName('MutationObserver.takeRecords')
15871 @DocsEditable 15983 @DocsEditable
15872 List<MutationRecord> takeRecords() native; 15984 List<MutationRecord> takeRecords() native;
15873 15985
15874 /** 15986 /**
15875 * Checks to see if the mutation observer API is supported on the current 15987 * Checks to see if the mutation observer API is supported on the current
15876 * platform. 15988 * platform.
15877 */ 15989 */
15878 static bool get supported { 15990 static bool get supported {
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
16090 * 16202 *
16091 * Use [MediaStream.supported] to check if this is supported by the current 16203 * Use [MediaStream.supported] to check if this is supported by the current
16092 * platform. The arguments `audio` and `video` default to `false` (stream does 16204 * platform. The arguments `audio` and `video` default to `false` (stream does
16093 * not use audio or video, respectively). 16205 * not use audio or video, respectively).
16094 * 16206 *
16095 * Simple example usage: 16207 * Simple example usage:
16096 * 16208 *
16097 * window.navigator.getUserMedia(audio: true, video: true).then((stream) { 16209 * window.navigator.getUserMedia(audio: true, video: true).then((stream) {
16098 * var video = new VideoElement() 16210 * var video = new VideoElement()
16099 * ..autoplay = true 16211 * ..autoplay = true
16100 * ..src = Url.createObjectUrl(stream); 16212 * ..src = Url.createObjectUrlFromStream(stream);
16101 * document.body.append(video); 16213 * document.body.append(video);
16102 * }); 16214 * });
16103 * 16215 *
16104 * The user can also pass in Maps to the audio or video parameters to specify 16216 * The user can also pass in Maps to the audio or video parameters to specify
16105 * mandatory and optional constraints for the media stream. Not passing in a 16217 * mandatory and optional constraints for the media stream. Not passing in a
16106 * map, but passing in `true` will provide a MediaStream with audio or 16218 * map, but passing in `true` will provide a MediaStream with audio or
16107 * video capabilities, but without any additional constraints. The particular 16219 * video capabilities, but without any additional constraints. The particular
16108 * constraint names for audio and video are still in flux, but as of this 16220 * constraint names for audio and video are still in flux, but as of this
16109 * writing, here is an example providing more constraints. 16221 * writing, here is an example providing more constraints.
16110 * 16222 *
(...skipping 2396 matching lines...) Expand 10 before | Expand all | Expand 10 after
18507 18619
18508 @JSName('removeEventListener') 18620 @JSName('removeEventListener')
18509 @DomName('RTCDataChannel.removeEventListener') 18621 @DomName('RTCDataChannel.removeEventListener')
18510 @DocsEditable 18622 @DocsEditable
18511 void $dom_removeEventListener(String type, EventListener listener, [bool useCa pture]) native; 18623 void $dom_removeEventListener(String type, EventListener listener, [bool useCa pture]) native;
18512 18624
18513 @DomName('RTCDataChannel.send') 18625 @DomName('RTCDataChannel.send')
18514 @DocsEditable 18626 @DocsEditable
18515 void send(data) native; 18627 void send(data) native;
18516 18628
18629 @JSName('send')
18630 @DomName('RTCDataChannel.send')
18631 @DocsEditable
18632 void sendBlob(Blob data) native;
18633
18634 @JSName('send')
18635 @DomName('RTCDataChannel.send')
18636 @DocsEditable
18637 void sendByteBuffer(ByteBuffer data) native;
18638
18639 @JSName('send')
18640 @DomName('RTCDataChannel.send')
18641 @DocsEditable
18642 void sendString(String data) native;
18643
18644 @JSName('send')
18645 @DomName('RTCDataChannel.send')
18646 @DocsEditable
18647 void sendTypedData(TypedData data) native;
18648
18517 @DomName('RTCDataChannel.onclose') 18649 @DomName('RTCDataChannel.onclose')
18518 @DocsEditable 18650 @DocsEditable
18519 Stream<Event> get onClose => closeEvent.forTarget(this); 18651 Stream<Event> get onClose => closeEvent.forTarget(this);
18520 18652
18521 @DomName('RTCDataChannel.onerror') 18653 @DomName('RTCDataChannel.onerror')
18522 @DocsEditable 18654 @DocsEditable
18523 Stream<Event> get onError => errorEvent.forTarget(this); 18655 Stream<Event> get onError => errorEvent.forTarget(this);
18524 18656
18525 @DomName('RTCDataChannel.onmessage') 18657 @DomName('RTCDataChannel.onmessage')
18526 @DocsEditable 18658 @DocsEditable
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
18802 18934
18803 @DomName('RTCPeerConnection.close') 18935 @DomName('RTCPeerConnection.close')
18804 @DocsEditable 18936 @DocsEditable
18805 void close() native; 18937 void close() native;
18806 18938
18807 @DomName('RTCPeerConnection.createAnswer') 18939 @DomName('RTCPeerConnection.createAnswer')
18808 @DocsEditable 18940 @DocsEditable
18809 void _createAnswer(_RtcSessionDescriptionCallback successCallback, [_RtcErrorC allback failureCallback, Map mediaConstraints]) { 18941 void _createAnswer(_RtcSessionDescriptionCallback successCallback, [_RtcErrorC allback failureCallback, Map mediaConstraints]) {
18810 if (mediaConstraints != null) { 18942 if (mediaConstraints != null) {
18811 var mediaConstraints_1 = convertDartToNative_Dictionary(mediaConstraints); 18943 var mediaConstraints_1 = convertDartToNative_Dictionary(mediaConstraints);
18812 __createAnswer_1(successCallback, failureCallback, mediaConstraints_1); 18944 _createAnswer_1(successCallback, failureCallback, mediaConstraints_1);
18813 return; 18945 return;
18814 } 18946 }
18815 __createAnswer_2(successCallback, failureCallback); 18947 _createAnswer_2(successCallback, failureCallback);
18816 return; 18948 return;
18817 } 18949 }
18818 @JSName('createAnswer') 18950 @JSName('createAnswer')
18819 @DomName('RTCPeerConnection.createAnswer') 18951 @DomName('RTCPeerConnection.createAnswer')
18820 @DocsEditable 18952 @DocsEditable
18821 void __createAnswer_1(_RtcSessionDescriptionCallback successCallback, _RtcErro rCallback failureCallback, mediaConstraints) native; 18953 void _createAnswer_1(_RtcSessionDescriptionCallback successCallback, _RtcError Callback failureCallback, mediaConstraints) native;
18822 @JSName('createAnswer') 18954 @JSName('createAnswer')
18823 @DomName('RTCPeerConnection.createAnswer') 18955 @DomName('RTCPeerConnection.createAnswer')
18824 @DocsEditable 18956 @DocsEditable
18825 void __createAnswer_2(_RtcSessionDescriptionCallback successCallback, _RtcErro rCallback failureCallback) native; 18957 void _createAnswer_2(_RtcSessionDescriptionCallback successCallback, _RtcError Callback failureCallback) native;
18826 18958
18827 @JSName('createDTMFSender') 18959 @JSName('createDTMFSender')
18828 @DomName('RTCPeerConnection.createDTMFSender') 18960 @DomName('RTCPeerConnection.createDTMFSender')
18829 @DocsEditable 18961 @DocsEditable
18830 RtcDtmfSender createDtmfSender(MediaStreamTrack track) native; 18962 RtcDtmfSender createDtmfSender(MediaStreamTrack track) native;
18831 18963
18832 @DomName('RTCPeerConnection.createDataChannel') 18964 @DomName('RTCPeerConnection.createDataChannel')
18833 @DocsEditable 18965 @DocsEditable
18834 RtcDataChannel createDataChannel(String label, [Map options]) { 18966 RtcDataChannel createDataChannel(String label, [Map options]) {
18835 if (options != null) { 18967 if (options != null) {
18836 var options_1 = convertDartToNative_Dictionary(options); 18968 var options_1 = convertDartToNative_Dictionary(options);
18837 return _createDataChannel_1(label, options_1); 18969 return _createDataChannel_1(label, options_1);
18838 } 18970 }
18839 return _createDataChannel_2(label); 18971 return _createDataChannel_2(label);
18840 } 18972 }
18841 @JSName('createDataChannel') 18973 @JSName('createDataChannel')
18842 @DomName('RTCPeerConnection.createDataChannel') 18974 @DomName('RTCPeerConnection.createDataChannel')
18843 @DocsEditable 18975 @DocsEditable
18844 RtcDataChannel _createDataChannel_1(label, options) native; 18976 RtcDataChannel _createDataChannel_1(label, options) native;
18845 @JSName('createDataChannel') 18977 @JSName('createDataChannel')
18846 @DomName('RTCPeerConnection.createDataChannel') 18978 @DomName('RTCPeerConnection.createDataChannel')
18847 @DocsEditable 18979 @DocsEditable
18848 RtcDataChannel _createDataChannel_2(label) native; 18980 RtcDataChannel _createDataChannel_2(label) native;
18849 18981
18850 @DomName('RTCPeerConnection.createOffer') 18982 @DomName('RTCPeerConnection.createOffer')
18851 @DocsEditable 18983 @DocsEditable
18852 void _createOffer(_RtcSessionDescriptionCallback successCallback, [_RtcErrorCa llback failureCallback, Map mediaConstraints]) { 18984 void _createOffer(_RtcSessionDescriptionCallback successCallback, [_RtcErrorCa llback failureCallback, Map mediaConstraints]) {
18853 if (mediaConstraints != null) { 18985 if (mediaConstraints != null) {
18854 var mediaConstraints_1 = convertDartToNative_Dictionary(mediaConstraints); 18986 var mediaConstraints_1 = convertDartToNative_Dictionary(mediaConstraints);
18855 __createOffer_1(successCallback, failureCallback, mediaConstraints_1); 18987 _createOffer_1(successCallback, failureCallback, mediaConstraints_1);
18856 return; 18988 return;
18857 } 18989 }
18858 __createOffer_2(successCallback, failureCallback); 18990 _createOffer_2(successCallback, failureCallback);
18859 return; 18991 return;
18860 } 18992 }
18861 @JSName('createOffer') 18993 @JSName('createOffer')
18862 @DomName('RTCPeerConnection.createOffer') 18994 @DomName('RTCPeerConnection.createOffer')
18863 @DocsEditable 18995 @DocsEditable
18864 void __createOffer_1(_RtcSessionDescriptionCallback successCallback, _RtcError Callback failureCallback, mediaConstraints) native; 18996 void _createOffer_1(_RtcSessionDescriptionCallback successCallback, _RtcErrorC allback failureCallback, mediaConstraints) native;
18865 @JSName('createOffer') 18997 @JSName('createOffer')
18866 @DomName('RTCPeerConnection.createOffer') 18998 @DomName('RTCPeerConnection.createOffer')
18867 @DocsEditable 18999 @DocsEditable
18868 void __createOffer_2(_RtcSessionDescriptionCallback successCallback, _RtcError Callback failureCallback) native; 19000 void _createOffer_2(_RtcSessionDescriptionCallback successCallback, _RtcErrorC allback failureCallback) native;
18869 19001
18870 @DomName('RTCPeerConnection.dispatchEvent') 19002 @DomName('RTCPeerConnection.dispatchEvent')
18871 @DocsEditable 19003 @DocsEditable
18872 bool dispatchEvent(Event event) native; 19004 bool dispatchEvent(Event event) native;
18873 19005
18874 @DomName('RTCPeerConnection.getLocalStreams') 19006 @DomName('RTCPeerConnection.getLocalStreams')
18875 @DocsEditable 19007 @DocsEditable
18876 List<MediaStream> getLocalStreams() native; 19008 List<MediaStream> getLocalStreams() native;
18877 19009
18878 @DomName('RTCPeerConnection.getRemoteStreams') 19010 @DomName('RTCPeerConnection.getRemoteStreams')
(...skipping 2461 matching lines...) Expand 10 before | Expand all | Expand 10 after
21340 void select() native; 21472 void select() native;
21341 21473
21342 @DomName('HTMLTextAreaElement.setCustomValidity') 21474 @DomName('HTMLTextAreaElement.setCustomValidity')
21343 @DocsEditable 21475 @DocsEditable
21344 void setCustomValidity(String error) native; 21476 void setCustomValidity(String error) native;
21345 21477
21346 @DomName('HTMLTextAreaElement.setRangeText') 21478 @DomName('HTMLTextAreaElement.setRangeText')
21347 @DocsEditable 21479 @DocsEditable
21348 // http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of- controls-and-forms.html#dom-textarea/input-setrangetext 21480 // http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of- controls-and-forms.html#dom-textarea/input-setrangetext
21349 @Experimental 21481 @Experimental
21350 void setRangeText(String replacement, [int start, int end, String selectionMod e]) native; 21482 void setRangeText(String replacement, {int start, int end, String selectionMod e}) native;
21351 21483
21352 @DomName('HTMLTextAreaElement.setSelectionRange') 21484 @DomName('HTMLTextAreaElement.setSelectionRange')
21353 @DocsEditable 21485 @DocsEditable
21354 void setSelectionRange(int start, int end, [String direction]) native; 21486 void setSelectionRange(int start, int end, [String direction]) native;
21355 } 21487 }
21356 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 21488 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
21357 // for details. All rights reserved. Use of this source code is governed by a 21489 // for details. All rights reserved. Use of this source code is governed by a
21358 // BSD-style license that can be found in the LICENSE file. 21490 // BSD-style license that can be found in the LICENSE file.
21359 21491
21360 // WARNING: Do not edit - generated code. 21492 // WARNING: Do not edit - generated code.
(...skipping 945 matching lines...) Expand 10 before | Expand all | Expand 10 after
22306 // for details. All rights reserved. Use of this source code is governed by a 22438 // for details. All rights reserved. Use of this source code is governed by a
22307 // BSD-style license that can be found in the LICENSE file. 22439 // BSD-style license that can be found in the LICENSE file.
22308 22440
22309 22441
22310 @DomName('URL') 22442 @DomName('URL')
22311 class Url native "URL" { 22443 class Url native "URL" {
22312 22444
22313 static String createObjectUrl(blob_OR_source_OR_stream) => 22445 static String createObjectUrl(blob_OR_source_OR_stream) =>
22314 JS('String', 22446 JS('String',
22315 '(self.URL || self.webkitURL).createObjectURL(#)', 22447 '(self.URL || self.webkitURL).createObjectURL(#)',
22316 blob_OR_source_OR_stream); 22448 blob_OR_source_OR_stream);
22449
22450 static String createObjectUrlFromSource(MediaSource source) =>
22451 JS('String', '(self.URL || self.webkitURL).createObjectURL(#)', source);
22452
22453 static String createObjectUrlFromStream(MediaStream stream) =>
22454 JS('String', '(self.URL || self.webkitURL).createObjectURL(#)', stream);
22455
22456 static String createObjectUrlFromBlob(Blob blob) =>
22457 JS('String', '(self.URL || self.webkitURL).createObjectURL(#)', blob);
22317 22458
22318 static void revokeObjectUrl(String url) => 22459 static void revokeObjectUrl(String url) =>
22319 JS('void', 22460 JS('void',
22320 '(self.URL || self.webkitURL).revokeObjectURL(#)', url); 22461 '(self.URL || self.webkitURL).revokeObjectURL(#)', url);
22321 22462
22322 } 22463 }
22323 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 22464 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
22324 // for details. All rights reserved. Use of this source code is governed by a 22465 // for details. All rights reserved. Use of this source code is governed by a
22325 // BSD-style license that can be found in the LICENSE file. 22466 // BSD-style license that can be found in the LICENSE file.
22326 22467
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
22633 22774
22634 @JSName('removeEventListener') 22775 @JSName('removeEventListener')
22635 @DomName('WebSocket.removeEventListener') 22776 @DomName('WebSocket.removeEventListener')
22636 @DocsEditable 22777 @DocsEditable
22637 void $dom_removeEventListener(String type, EventListener listener, [bool useCa pture]) native; 22778 void $dom_removeEventListener(String type, EventListener listener, [bool useCa pture]) native;
22638 22779
22639 @DomName('WebSocket.send') 22780 @DomName('WebSocket.send')
22640 @DocsEditable 22781 @DocsEditable
22641 void send(data) native; 22782 void send(data) native;
22642 22783
22784 @JSName('send')
22785 @DomName('WebSocket.send')
22786 @DocsEditable
22787 void sendBlob(Blob data) native;
22788
22789 @JSName('send')
22790 @DomName('WebSocket.send')
22791 @DocsEditable
22792 void sendByteBuffer(ByteBuffer data) native;
22793
22794 @JSName('send')
22795 @DomName('WebSocket.send')
22796 @DocsEditable
22797 void sendString(String data) native;
22798
22799 @JSName('send')
22800 @DomName('WebSocket.send')
22801 @DocsEditable
22802 void sendTypeData(TypedData data) native;
22803
22643 @DomName('WebSocket.onclose') 22804 @DomName('WebSocket.onclose')
22644 @DocsEditable 22805 @DocsEditable
22645 Stream<CloseEvent> get onClose => closeEvent.forTarget(this); 22806 Stream<CloseEvent> get onClose => closeEvent.forTarget(this);
22646 22807
22647 @DomName('WebSocket.onerror') 22808 @DomName('WebSocket.onerror')
22648 @DocsEditable 22809 @DocsEditable
22649 Stream<Event> get onError => errorEvent.forTarget(this); 22810 Stream<Event> get onError => errorEvent.forTarget(this);
22650 22811
22651 @DomName('WebSocket.onmessage') 22812 @DomName('WebSocket.onmessage')
22652 @DocsEditable 22813 @DocsEditable
(...skipping 811 matching lines...) Expand 10 before | Expand all | Expand 10 after
23464 @Creates('Window|=Object') 23625 @Creates('Window|=Object')
23465 @Returns('Window|=Object') 23626 @Returns('Window|=Object')
23466 final dynamic _get_window; 23627 final dynamic _get_window;
23467 23628
23468 @DomName('Window.__getter__') 23629 @DomName('Window.__getter__')
23469 @DocsEditable 23630 @DocsEditable
23470 @Creates('Window|=Object') 23631 @Creates('Window|=Object')
23471 @Returns('Window|=Object') 23632 @Returns('Window|=Object')
23472 WindowBase __getter__(index_OR_name) { 23633 WindowBase __getter__(index_OR_name) {
23473 if ((index_OR_name is int || index_OR_name == null)) { 23634 if ((index_OR_name is int || index_OR_name == null)) {
23474 return _convertNativeToDart_Window(___getter___1(index_OR_name)); 23635 return _convertNativeToDart_Window(__getter___1(index_OR_name));
23475 } 23636 }
23476 if ((index_OR_name is String || index_OR_name == null)) { 23637 if ((index_OR_name is String || index_OR_name == null)) {
23477 return _convertNativeToDart_Window(___getter___2(index_OR_name)); 23638 return _convertNativeToDart_Window(__getter___2(index_OR_name));
23478 } 23639 }
23479 throw new ArgumentError("Incorrect number or type of arguments"); 23640 throw new ArgumentError("Incorrect number or type of arguments");
23480 } 23641 }
23481 @JSName('__getter__') 23642 @JSName('__getter__')
23482 @DomName('Window.__getter__') 23643 @DomName('Window.__getter__')
23483 @DocsEditable 23644 @DocsEditable
23484 @Creates('Window|=Object') 23645 @Creates('Window|=Object')
23485 @Returns('Window|=Object') 23646 @Returns('Window|=Object')
23486 ___getter___1(int index) native; 23647 __getter___1(int index) native;
23487 @JSName('__getter__') 23648 @JSName('__getter__')
23488 @DomName('Window.__getter__') 23649 @DomName('Window.__getter__')
23489 @DocsEditable 23650 @DocsEditable
23490 @Creates('Window|=Object') 23651 @Creates('Window|=Object')
23491 @Returns('Window|=Object') 23652 @Returns('Window|=Object')
23492 ___getter___2(String name) native; 23653 __getter___2(String name) native;
23493 23654
23494 @JSName('addEventListener') 23655 @JSName('addEventListener')
23495 @DomName('Window.addEventListener') 23656 @DomName('Window.addEventListener')
23496 @DocsEditable 23657 @DocsEditable
23497 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu re]) native; 23658 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu re]) native;
23498 23659
23499 @DomName('Window.alert') 23660 @DomName('Window.alert')
23500 @DocsEditable 23661 @DocsEditable
23501 void alert(String message) native; 23662 void alert(String message) native;
23502 23663
(...skipping 5636 matching lines...) Expand 10 before | Expand all | Expand 10 after
29139 // List APIs 29300 // List APIs
29140 29301
29141 E operator [](int index) => _list[index]; 29302 E operator [](int index) => _list[index];
29142 29303
29143 void operator []=(int index, E value) { _list[index] = value; } 29304 void operator []=(int index, E value) { _list[index] = value; }
29144 29305
29145 void set length(int newLength) { _list.length = newLength; } 29306 void set length(int newLength) { _list.length = newLength; }
29146 29307
29147 void sort([int compare(E a, E b)]) { _list.sort(compare); } 29308 void sort([int compare(E a, E b)]) { _list.sort(compare); }
29148 29309
29149 int indexOf(E element, [int start = 0]) => _list.indexOf(element, start); 29310 int indexOf(Object element, [int start = 0]) => _list.indexOf(element, start);
29150 29311
29151 int lastIndexOf(E element, [int start]) => _list.lastIndexOf(element, start); 29312 int lastIndexOf(Object element, [int start]) => _list.lastIndexOf(element, sta rt);
29152 29313
29153 void insert(int index, E element) => _list.insert(index, element); 29314 void insert(int index, E element) => _list.insert(index, element);
29154 29315
29155 E removeAt(int index) => _list.removeAt(index); 29316 E removeAt(int index) => _list.removeAt(index);
29156 29317
29157 void setRange(int start, int end, Iterable<E> iterable, [int skipCount = 0]) { 29318 void setRange(int start, int end, Iterable<E> iterable, [int skipCount = 0]) {
29158 _list.setRange(start, end, iterable, skipCount); 29319 _list.setRange(start, end, iterable, skipCount);
29159 } 29320 }
29160 29321
29161 void removeRange(int start, int end) { _list.removeRange(start, end); } 29322 void removeRange(int start, int end) { _list.removeRange(start, end); }
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
29597 _position = nextPosition; 29758 _position = nextPosition;
29598 return true; 29759 return true;
29599 } 29760 }
29600 _current = null; 29761 _current = null;
29601 _position = _array.length; 29762 _position = _array.length;
29602 return false; 29763 return false;
29603 } 29764 }
29604 29765
29605 T get current => _current; 29766 T get current => _current;
29606 } 29767 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | tools/dom/scripts/htmldartgenerator.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698