Index: pkg/shadow_dom/lib/src/platform/patches-shadowdom-polyfill-before.js |
diff --git a/pkg/shadow_dom/lib/src/platform/patches-shadowdom-polyfill-before.js b/pkg/shadow_dom/lib/src/platform/patches-shadowdom-polyfill-before.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..fe15015bdc9fb3188437619a398b0fc3529220e8 |
--- /dev/null |
+++ b/pkg/shadow_dom/lib/src/platform/patches-shadowdom-polyfill-before.js |
@@ -0,0 +1,13 @@ |
+/* |
+ * Copyright 2013 The Polymer Authors. All rights reserved. |
+ * Use of this source code is governed by a BSD-style |
+ * license that can be found in the LICENSE file. |
+ */ |
+(function() { |
+ // TODO(jmesserly): fix dart:html to use unprefixed name |
+ if (Element.prototype.webkitCreateShadowRoot) { |
+ Element.prototype.webkitCreateShadowRoot = function() { |
+ return window.ShadowDOMPolyfill.wrapIfNeeded(this).createShadowRoot(); |
+ }; |
+ } |
+})(); |