| OLD | NEW |
| 1 library html; | 1 library html; |
| 2 | 2 |
| 3 import 'dart:async'; | 3 import 'dart:async'; |
| 4 import 'dart:collection'; | 4 import 'dart:collection'; |
| 5 import 'dart:html_common'; | 5 import 'dart:html_common'; |
| 6 import 'dart:indexed_db'; | 6 import 'dart:indexed_db'; |
| 7 import 'dart:isolate'; | 7 import 'dart:isolate'; |
| 8 import 'dart:json' as json; | 8 import 'dart:json' as json; |
| 9 import 'dart:math'; | 9 import 'dart:math'; |
| 10 import 'dart:svg' as svg; | 10 import 'dart:svg' as svg; |
| (...skipping 6438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6449 // for details. All rights reserved. Use of this source code is governed by a | 6449 // for details. All rights reserved. Use of this source code is governed by a |
| 6450 // BSD-style license that can be found in the LICENSE file. | 6450 // BSD-style license that can be found in the LICENSE file. |
| 6451 | 6451 |
| 6452 | 6452 |
| 6453 /// @domName DOMError; @docsEditable true | 6453 /// @domName DOMError; @docsEditable true |
| 6454 class DomError native "*DOMError" { | 6454 class DomError native "*DOMError" { |
| 6455 | 6455 |
| 6456 /// @domName DOMError.name; @docsEditable true | 6456 /// @domName DOMError.name; @docsEditable true |
| 6457 final String name; | 6457 final String name; |
| 6458 } | 6458 } |
| 6459 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 6459 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 6460 // for details. All rights reserved. Use of this source code is governed by a | 6460 // for details. All rights reserved. Use of this source code is governed by a |
| 6461 // BSD-style license that can be found in the LICENSE file. | 6461 // BSD-style license that can be found in the LICENSE file. |
| 6462 | 6462 |
| 6463 | 6463 |
| 6464 /// @domName DOMException; @docsEditable true | 6464 /// @domName DOMException |
| 6465 class DomException native "*DOMException" { | 6465 class DomException native "*DOMException" { |
| 6466 | 6466 |
| 6467 static const int ABORT_ERR = 20; | 6467 static const String INDEX_SIZE = 'IndexSizeError'; |
| 6468 static const String HIERARCHY_REQUEST = 'HierarchyRequestError'; |
| 6469 static const String WRONG_DOCUMENT = 'WrongDocumentError'; |
| 6470 static const String INVALID_CHARACTER = 'InvalidCharacterError'; |
| 6471 static const String NO_MODIFICATION_ALLOWED = 'NoModificationAllowedError'; |
| 6472 static const String NOT_FOUND = 'NotFoundError'; |
| 6473 static const String NOT_SUPPORTED = 'NotSupportedError'; |
| 6474 static const String INVALID_STATE = 'InvalidStateError'; |
| 6475 static const String SYNTAX = 'SyntaxError'; |
| 6476 static const String INVALID_MODIFICATION = 'InvalidModificationError'; |
| 6477 static const String NAMESPACE = 'NamespaceError'; |
| 6478 static const String INVALID_ACCESS = 'InvalidAccessError'; |
| 6479 static const String TYPE_MISMATCH = 'TypeMismatchError'; |
| 6480 static const String SECURITY = 'SecurityError'; |
| 6481 static const String NETWORK = 'NetworkError'; |
| 6482 static const String ABORT = 'AbortError'; |
| 6483 static const String URL_MISMATCH = 'URLMismatchError'; |
| 6484 static const String QUOTA_EXCEEDED = 'QuotaExceededError'; |
| 6485 static const String TIMEOUT = 'TimeoutError'; |
| 6486 static const String INVALID_NODE_TYPE = 'InvalidNodeTypeError'; |
| 6487 static const String DATA_CLONE = 'DataCloneError'; |
| 6468 | 6488 |
| 6469 static const int DATA_CLONE_ERR = 25; | 6489 String get name { |
| 6470 | 6490 var errorName = JS('String', '#.name', this); |
| 6471 static const int DOMSTRING_SIZE_ERR = 2; | 6491 // Although Safari nightly has updated the name to SecurityError, Safari 5 |
| 6472 | 6492 // and 6 still return SECURITY_ERR. |
| 6473 static const int HIERARCHY_REQUEST_ERR = 3; | 6493 if (_Device.isWebKit && errorName == 'SECURITY_ERR') return 'SecurityError'; |
| 6474 | 6494 // Chrome release still uses old string, remove this line when Chrome stable |
| 6475 static const int INDEX_SIZE_ERR = 1; | 6495 // also prints out SyntaxError. |
| 6476 | 6496 if (_Device.isWebKit && errorName == 'SYNTAX_ERR') return 'SyntaxError'; |
| 6477 static const int INUSE_ATTRIBUTE_ERR = 10; | 6497 return errorName; |
| 6478 | 6498 } |
| 6479 static const int INVALID_ACCESS_ERR = 15; | |
| 6480 | |
| 6481 static const int INVALID_CHARACTER_ERR = 5; | |
| 6482 | |
| 6483 static const int INVALID_MODIFICATION_ERR = 13; | |
| 6484 | |
| 6485 static const int INVALID_NODE_TYPE_ERR = 24; | |
| 6486 | |
| 6487 static const int INVALID_STATE_ERR = 11; | |
| 6488 | |
| 6489 static const int NAMESPACE_ERR = 14; | |
| 6490 | |
| 6491 static const int NETWORK_ERR = 19; | |
| 6492 | |
| 6493 static const int NOT_FOUND_ERR = 8; | |
| 6494 | |
| 6495 static const int NOT_SUPPORTED_ERR = 9; | |
| 6496 | |
| 6497 static const int NO_DATA_ALLOWED_ERR = 6; | |
| 6498 | |
| 6499 static const int NO_MODIFICATION_ALLOWED_ERR = 7; | |
| 6500 | |
| 6501 static const int QUOTA_EXCEEDED_ERR = 22; | |
| 6502 | |
| 6503 static const int SECURITY_ERR = 18; | |
| 6504 | |
| 6505 static const int SYNTAX_ERR = 12; | |
| 6506 | |
| 6507 static const int TIMEOUT_ERR = 23; | |
| 6508 | |
| 6509 static const int TYPE_MISMATCH_ERR = 17; | |
| 6510 | |
| 6511 static const int URL_MISMATCH_ERR = 21; | |
| 6512 | |
| 6513 static const int VALIDATION_ERR = 16; | |
| 6514 | |
| 6515 static const int WRONG_DOCUMENT_ERR = 4; | |
| 6516 | |
| 6517 /// @domName DOMException.code; @docsEditable true | |
| 6518 final int code; | |
| 6519 | 6499 |
| 6520 /// @domName DOMException.message; @docsEditable true | 6500 /// @domName DOMException.message; @docsEditable true |
| 6521 final String message; | 6501 final String message; |
| 6522 | 6502 |
| 6523 /// @domName DOMException.name; @docsEditable true | |
| 6524 final String name; | |
| 6525 | |
| 6526 /// @domName DOMException.toString; @docsEditable true | 6503 /// @domName DOMException.toString; @docsEditable true |
| 6527 String toString() native; | 6504 String toString() native; |
| 6505 |
| 6528 } | 6506 } |
| 6529 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 6507 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 6530 // for details. All rights reserved. Use of this source code is governed by a | 6508 // for details. All rights reserved. Use of this source code is governed by a |
| 6531 // BSD-style license that can be found in the LICENSE file. | 6509 // BSD-style license that can be found in the LICENSE file. |
| 6532 | 6510 |
| 6533 | 6511 |
| 6534 /// @domName DOMImplementation; @docsEditable true | 6512 /// @domName DOMImplementation; @docsEditable true |
| 6535 class DomImplementation native "*DOMImplementation" { | 6513 class DomImplementation native "*DOMImplementation" { |
| 6536 | 6514 |
| 6537 /// @domName DOMImplementation.createCSSStyleSheet; @docsEditable true | 6515 /// @domName DOMImplementation.createCSSStyleSheet; @docsEditable true |
| (...skipping 8952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15490 | 15468 |
| 15491 /// @docsEditable true | 15469 /// @docsEditable true |
| 15492 EventListenerList get show => this['show']; | 15470 EventListenerList get show => this['show']; |
| 15493 } | 15471 } |
| 15494 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 15472 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 15495 // for details. All rights reserved. Use of this source code is governed by a | 15473 // for details. All rights reserved. Use of this source code is governed by a |
| 15496 // BSD-style license that can be found in the LICENSE file. | 15474 // BSD-style license that can be found in the LICENSE file. |
| 15497 | 15475 |
| 15498 | 15476 |
| 15499 /// @domName NotificationCenter; @docsEditable true | 15477 /// @domName NotificationCenter; @docsEditable true |
| 15478 @SupportedBrowser(SupportedBrowser.CHROME) |
| 15479 @SupportedBrowser(SupportedBrowser.SAFARI) |
| 15480 @Experimental() |
| 15500 class NotificationCenter native "*NotificationCenter" { | 15481 class NotificationCenter native "*NotificationCenter" { |
| 15501 | 15482 |
| 15483 /// Checks if this type is supported on the current platform. |
| 15484 static bool get supported => JS('bool', '!!(window.webkitNotifications)'); |
| 15485 |
| 15502 /// @domName NotificationCenter.checkPermission; @docsEditable true | 15486 /// @domName NotificationCenter.checkPermission; @docsEditable true |
| 15503 int checkPermission() native; | 15487 int checkPermission() native; |
| 15504 | 15488 |
| 15505 /// @domName NotificationCenter.createHTMLNotification; @docsEditable true | 15489 /// @domName NotificationCenter.createHTMLNotification; @docsEditable true |
| 15506 @JSName('createHTMLNotification') | 15490 @JSName('createHTMLNotification') |
| 15507 Notification createHtmlNotification(String url) native; | 15491 Notification createHtmlNotification(String url) native; |
| 15508 | 15492 |
| 15509 /// @domName NotificationCenter.createNotification; @docsEditable true | 15493 /// @domName NotificationCenter.createNotification; @docsEditable true |
| 15510 Notification createNotification(String iconUrl, String title, String body) nat
ive; | 15494 Notification createNotification(String iconUrl, String title, String body) nat
ive; |
| 15511 | 15495 |
| (...skipping 6716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 22228 /// @domName Window.toolbar; @docsEditable true | 22212 /// @domName Window.toolbar; @docsEditable true |
| 22229 final BarInfo toolbar; | 22213 final BarInfo toolbar; |
| 22230 | 22214 |
| 22231 /// @domName Window.top; @docsEditable true | 22215 /// @domName Window.top; @docsEditable true |
| 22232 WindowBase get top => _convertNativeToDart_Window(this._top); | 22216 WindowBase get top => _convertNativeToDart_Window(this._top); |
| 22233 @JSName('top') | 22217 @JSName('top') |
| 22234 @Creates('Window|=Object') @Returns('Window|=Object') | 22218 @Creates('Window|=Object') @Returns('Window|=Object') |
| 22235 final dynamic _top; | 22219 final dynamic _top; |
| 22236 | 22220 |
| 22237 /// @domName DOMWindow.webkitNotifications; @docsEditable true | 22221 /// @domName DOMWindow.webkitNotifications; @docsEditable true |
| 22238 final NotificationCenter webkitNotifications; | 22222 @JSName('webkitNotifications') |
| 22223 @SupportedBrowser(SupportedBrowser.CHROME) @SupportedBrowser(SupportedBrowser.
SAFARI) @Experimental() |
| 22224 final NotificationCenter notifications; |
| 22239 | 22225 |
| 22240 /// @domName DOMWindow.webkitStorageInfo; @docsEditable true | 22226 /// @domName DOMWindow.webkitStorageInfo; @docsEditable true |
| 22241 final StorageInfo webkitStorageInfo; | 22227 final StorageInfo webkitStorageInfo; |
| 22242 | 22228 |
| 22243 /// @domName Window.window; @docsEditable true | 22229 /// @domName Window.window; @docsEditable true |
| 22244 WindowBase get window => _convertNativeToDart_Window(this._window); | 22230 WindowBase get window => _convertNativeToDart_Window(this._window); |
| 22245 @JSName('window') | 22231 @JSName('window') |
| 22246 @Creates('Window|=Object') @Returns('Window|=Object') | 22232 @Creates('Window|=Object') @Returns('Window|=Object') |
| 22247 final dynamic _window; | 22233 final dynamic _window; |
| 22248 | 22234 |
| (...skipping 5755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 28004 _position = nextPosition; | 27990 _position = nextPosition; |
| 28005 return true; | 27991 return true; |
| 28006 } | 27992 } |
| 28007 _current = null; | 27993 _current = null; |
| 28008 _position = _array.length; | 27994 _position = _array.length; |
| 28009 return false; | 27995 return false; |
| 28010 } | 27996 } |
| 28011 | 27997 |
| 28012 T get current => _current; | 27998 T get current => _current; |
| 28013 } | 27999 } |
| OLD | NEW |