Chromium Code Reviews| Index: pkg/custom_element/lib/custom-elements.debug.js |
| diff --git a/pkg/custom_element/lib/custom-elements.debug.js b/pkg/custom_element/lib/custom-elements.debug.js |
| index befb1a929029e8b6959a1443ccf3992c002922cb..423ed53dbca5118af786d78b63033510db06d502 100644 |
| --- a/pkg/custom_element/lib/custom-elements.debug.js |
| +++ b/pkg/custom_element/lib/custom-elements.debug.js |
| @@ -1464,4 +1464,14 @@ if (document.readyState === 'complete') { |
| window.addEventListener(loadEvent, bootstrap); |
| } |
| +// Patch to allow custom element and shadow dom to work together, from: |
|
blois
2013/09/19 23:07:11
Not sure what the best way is to put this in here.
Jennifer Messerly
2013/09/20 17:58:35
it seems reasonable, but maybe should have feature
blois
2013/09/20 21:39:38
Done.
|
| +// https://github.com/Polymer/platform/blob/master/src/patches-shadowdom-polyfill.js |
| +// include .host reference |
| +var originalCreateShadowRoot = HTMLElement.prototype.createShadowRoot; |
| +HTMLElement.prototype.createShadowRoot = function() { |
| + var root = originalCreateShadowRoot.call(this); |
| + root.host = this; |
| + return root; |
| +} |
| + |
| })(); |