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; }
© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/2.0.0/dart-html/DomException/name.html