| Index: tools/dom/templates/html/dart2js/impl_DomException.darttemplate
|
| diff --git a/tools/dom/templates/html/dart2js/impl_DomException.darttemplate b/tools/dom/templates/html/dart2js/impl_DomException.darttemplate
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..e7e1519e5a50ce19e0faac00f668cf2383df5ddf
|
| --- /dev/null
|
| +++ b/tools/dom/templates/html/dart2js/impl_DomException.darttemplate
|
| @@ -0,0 +1,43 @@
|
| +// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
|
| +// for details. All rights reserved. Use of this source code is governed by a
|
| +// BSD-style license that can be found in the LICENSE file.
|
| +
|
| +part of html;
|
| +
|
| +/// @domName $DOMNAME
|
| +class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
|
| +
|
| + static const String INDEX_SIZE = 'IndexSizeError';
|
| + static const String HIERARCHY_REQUEST = 'HierarchyRequestError';
|
| + static const String WRONG_DOCUMENT = 'WrongDocumentError';
|
| + static const String INVALID_CHARACTER = 'InvalidCharacterError';
|
| + static const String NO_MODIFICATION_ALLOWED = 'NoModificationAllowedError';
|
| + static const String NOT_FOUND = 'NotFoundError';
|
| + static const String NOT_SUPPORTED = 'NotSupportedError';
|
| + static const String INVALID_STATE = 'InvalidStateError';
|
| + static const String SYNTAX = 'SyntaxError';
|
| + static const String INVALID_MODIFICATION = 'InvalidModificationError';
|
| + static const String NAMESPACE = 'NamespaceError';
|
| + static const String INVALID_ACCESS = 'InvalidAccessError';
|
| + static const String TYPE_MISMATCH = 'TypeMismatchError';
|
| + static const String SECURITY = 'SecurityError';
|
| + static const String NETWORK = 'NetworkError';
|
| + static const String ABORT = 'AbortError';
|
| + static const String URL_MISMATCH = 'URLMismatchError';
|
| + static const String QUOTA_EXCEEDED = 'QuotaExceededError';
|
| + static const String TIMEOUT = 'TimeoutError';
|
| + static const String INVALID_NODE_TYPE = 'InvalidNodeTypeError';
|
| + static const String DATA_CLONE = 'DataCloneError';
|
| +
|
| + String get name {
|
| + var errorName = JS('String', '#.name', this);
|
| + // Although Safari nightly has updated the name to SecurityError, Safari 5
|
| + // and 6 still return SECURITY_ERR.
|
| + if (_Device.isWebKit && errorName == 'SECURITY_ERR') return 'SecurityError';
|
| + // Chrome release still uses old string, remove this line when Chrome stable
|
| + // also prints out SyntaxError.
|
| + if (_Device.isWebKit && errorName == 'SYNTAX_ERR') return 'SyntaxError';
|
| + return errorName;
|
| + }
|
| +$!MEMBERS
|
| +}
|
|
|