dart-archive / web-components

Dart package providing the web components platform polyfills
https://pub.dartlang.org/packages/web_components
BSD 3-Clause "New" or "Revised" License
18 stars 10 forks source link

interop_support.js breaks unknown HTML elements #2

Closed jmesserly closed 9 years ago

jmesserly commented 9 years ago

The bug is on line 117 -- it should be outside the if block. It looks like that "hook" breaks the handling of unknown HTML elements, which would explain the change in behavior for . This patch fixes the issue:

diff --git a/pkg/web_components/lib/interop_support.js b/pkg/web_components/lib/interop_support.js
index 790f828..4299c37 100644
--- a/pkg/web_components/lib/interop_support.js
+++ b/pkg/web_components/lib/interop_support.js
@@ -114,8 +114,8 @@
           if (match) {
             return match[1];
           }
-          return originalGetUnknownTag(o, tag);
         }
+        return originalGetUnknownTag(o, tag);
       };
     });
   }

I'll upload a CL with a test to reproduce.

jakemac53 commented 9 years ago

@jmesserly friendly post-break ping