Add method to html_dartium utils to check for NSM errors

BUG=
R=vsm@google.com

Review URL: https://codereview.chromium.org//21676003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25741 260f80e4-7a28-3924-810f-c04153c831b5
diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart
index 647928e..3b3637e 100644
--- a/sdk/lib/html/dartium/html_dartium.dart
+++ b/sdk/lib/html/dartium/html_dartium.dart
@@ -32037,6 +32037,8 @@
   // TODO(jacobr): we need a failsafe way to determine that a Node is really a
   // DOM node rather than just a class that extends Node.
   static bool isNode(obj) => obj is Node;
+
+  static bool isNoSuchMethodError(obj) => obj is NoSuchMethodError;
 }
 
 class _NPObject extends NativeFieldWrapperClass1 {
diff --git a/tools/dom/src/native_DOMImplementation.dart b/tools/dom/src/native_DOMImplementation.dart
index eae77bd..ad04f3f 100644
--- a/tools/dom/src/native_DOMImplementation.dart
+++ b/tools/dom/src/native_DOMImplementation.dart
@@ -189,6 +189,8 @@
 
   static String addTrailingDot(String str) => '${str}.';
 
+  static bool isNoSuchMethodError(obj) => obj is NoSuchMethodError;
+
   // TODO(jacobr): we need a failsafe way to determine that a Node is really a
   // DOM node rather than just a class that extends Node.
   static bool isNode(obj) => obj is Node;