Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Side by Side Diff: pkg/custom_element/lib/custom-elements.debug.js

Issue 24096027: Dart2js support for custom element lifecycle events (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 })();
OLDNEW
« no previous file with comments | « no previous file | pkg/shadow_dom/lib/shadow_dom.debug.js » ('j') | pkg/shadow_dom/lib/shadow_dom.debug.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698