name属性

String name

实现

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