name property

String name

Implementation

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 as String;
}

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dart.dev/stable/2.13.0/dart-html/DomException/name.html