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

Unified Diff: polymer_0.5.0/bower_components/core-focusable/polymer-mixin.js

Issue 786953007: npm_modules: Fork bower_components into Polymer 0.4.0 and 0.5.0 versions (Closed) Base URL: https://chromium.googlesource.com/infra/third_party/npm_modules.git@master
Patch Set: Created 5 years, 12 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 side-by-side diff with in-line comments
Download patch
Index: polymer_0.5.0/bower_components/core-focusable/polymer-mixin.js
diff --git a/polymer_0.5.0/bower_components/core-focusable/polymer-mixin.js b/polymer_0.5.0/bower_components/core-focusable/polymer-mixin.js
new file mode 100644
index 0000000000000000000000000000000000000000..2ee1d668bed5bfe2288c1463099b4e3dfbd1d7ab
--- /dev/null
+++ b/polymer_0.5.0/bower_components/core-focusable/polymer-mixin.js
@@ -0,0 +1,35 @@
+Polymer.mixin2 = function(prototype, mixin) {
+
+ // adds a single mixin to prototype
+
+ if (mixin.mixinPublish) {
+ prototype.publish = prototype.publish || {};
+ Polymer.mixin(prototype.publish, mixin.mixinPublish);
+ }
+
+ if (mixin.mixinDelegates) {
+ prototype.eventDelegates = prototype.eventDelegates || {};
+ for (var e in mixin.mixinDelegates) {
+ if (!prototype.eventDelegates[e]) {
+ prototype.eventDelegates[e] = mixin.mixinDelegates[e];
+ }
+ }
+ }
+
+ if (mixin.mixinObserve) {
+ prototype.observe = prototype.observe || {};
+ for (var o in mixin.mixinObserve) {
+ if (!prototype.observe[o] && !prototype[o + 'Changed']) {
+ prototype.observe[o] = mixin.mixinObserve[o];
+ }
+ }
+ }
+
+ Polymer.mixin(prototype, mixin);
+
+ delete prototype.mixinPublish;
+ delete prototype.mixinDelegates;
+ delete prototype.mixinObserve;
+
+ return prototype;
+};
« no previous file with comments | « polymer_0.5.0/bower_components/core-focusable/demo.html ('k') | polymer_0.5.0/bower_components/core-header-panel/.bower.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698