Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Polymer Authors. All rights reserved. | 1 // Copyright (c) 2012 The Polymer Authors. All rights reserved. |
| 2 // | 2 // |
| 3 // Redistribution and use in source and binary forms, with or without | 3 // Redistribution and use in source and binary forms, with or without |
| 4 // modification, are permitted provided that the following conditions are | 4 // modification, are permitted provided that the following conditions are |
| 5 // met: | 5 // met: |
| 6 // | 6 // |
| 7 // * Redistributions of source code must retain the above copyright | 7 // * Redistributions of source code must retain the above copyright |
| 8 // notice, this list of conditions and the following disclaimer. | 8 // notice, this list of conditions and the following disclaimer. |
| 9 // * Redistributions in binary form must reproduce the above | 9 // * Redistributions in binary form must reproduce the above |
| 10 // copyright notice, this list of conditions and the following disclaimer | 10 // copyright notice, this list of conditions and the following disclaimer |
| (...skipping 1446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1457 }; | 1457 }; |
| 1458 } | 1458 } |
| 1459 | 1459 |
| 1460 if (document.readyState === 'complete') { | 1460 if (document.readyState === 'complete') { |
| 1461 bootstrap(); | 1461 bootstrap(); |
| 1462 } else { | 1462 } else { |
| 1463 var loadEvent = window.HTMLImports ? 'HTMLImportsLoaded' : 'DOMContentLoaded'; | 1463 var loadEvent = window.HTMLImports ? 'HTMLImportsLoaded' : 'DOMContentLoaded'; |
| 1464 window.addEventListener(loadEvent, bootstrap); | 1464 window.addEventListener(loadEvent, bootstrap); |
| 1465 } | 1465 } |
| 1466 | 1466 |
| 1467 // 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.
| |
| 1468 // https://github.com/Polymer/platform/blob/master/src/patches-shadowdom-polyfil l.js | |
| 1469 // include .host reference | |
| 1470 var originalCreateShadowRoot = HTMLElement.prototype.createShadowRoot; | |
| 1471 HTMLElement.prototype.createShadowRoot = function() { | |
| 1472 var root = originalCreateShadowRoot.call(this); | |
| 1473 root.host = this; | |
| 1474 return root; | |
| 1475 } | |
| 1476 | |
| 1467 })(); | 1477 })(); |
| OLD | NEW |