| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 part of $LIBRARYNAME; | 5 part of $LIBRARYNAME; |
| 6 | 6 |
| 7 $(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { | 7 $(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { |
| 8 | 8 |
| 9 static const String INDEX_SIZE = 'IndexSizeError'; | 9 static const String INDEX_SIZE = 'IndexSizeError'; |
| 10 static const String HIERARCHY_REQUEST = 'HierarchyRequestError'; | 10 static const String HIERARCHY_REQUEST = 'HierarchyRequestError'; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 static const String QUOTA_EXCEEDED = 'QuotaExceededError'; | 26 static const String QUOTA_EXCEEDED = 'QuotaExceededError'; |
| 27 static const String TIMEOUT = 'TimeoutError'; | 27 static const String TIMEOUT = 'TimeoutError'; |
| 28 static const String INVALID_NODE_TYPE = 'InvalidNodeTypeError'; | 28 static const String INVALID_NODE_TYPE = 'InvalidNodeTypeError'; |
| 29 static const String DATA_CLONE = 'DataCloneError'; | 29 static const String DATA_CLONE = 'DataCloneError'; |
| 30 | 30 |
| 31 $if DART2JS | 31 $if DART2JS |
| 32 String get name { | 32 String get name { |
| 33 var errorName = JS('String', '#.name', this); | 33 var errorName = JS('String', '#.name', this); |
| 34 // Although Safari nightly has updated the name to SecurityError, Safari 5 | 34 // Although Safari nightly has updated the name to SecurityError, Safari 5 |
| 35 // and 6 still return SECURITY_ERR. | 35 // and 6 still return SECURITY_ERR. |
| 36 if (_Device.isWebKit && errorName == 'SECURITY_ERR') return 'SecurityError'; | 36 if (Device.isWebKit && errorName == 'SECURITY_ERR') return 'SecurityError'; |
| 37 // Chrome release still uses old string, remove this line when Chrome stable | 37 // Chrome release still uses old string, remove this line when Chrome stable |
| 38 // also prints out SyntaxError. | 38 // also prints out SyntaxError. |
| 39 if (_Device.isWebKit && errorName == 'SYNTAX_ERR') return 'SyntaxError'; | 39 if (Device.isWebKit && errorName == 'SYNTAX_ERR') return 'SyntaxError'; |
| 40 return errorName; | 40 return errorName; |
| 41 } | 41 } |
| 42 $endif | 42 $endif |
| 43 $!MEMBERS | 43 $!MEMBERS |
| 44 } | 44 } |
| OLD | NEW |