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

Side by Side 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, 11 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
OLDNEW
(Empty)
1 Polymer.mixin2 = function(prototype, mixin) {
2
3 // adds a single mixin to prototype
4
5 if (mixin.mixinPublish) {
6 prototype.publish = prototype.publish || {};
7 Polymer.mixin(prototype.publish, mixin.mixinPublish);
8 }
9
10 if (mixin.mixinDelegates) {
11 prototype.eventDelegates = prototype.eventDelegates || {};
12 for (var e in mixin.mixinDelegates) {
13 if (!prototype.eventDelegates[e]) {
14 prototype.eventDelegates[e] = mixin.mixinDelegates[e];
15 }
16 }
17 }
18
19 if (mixin.mixinObserve) {
20 prototype.observe = prototype.observe || {};
21 for (var o in mixin.mixinObserve) {
22 if (!prototype.observe[o] && !prototype[o + 'Changed']) {
23 prototype.observe[o] = mixin.mixinObserve[o];
24 }
25 }
26 }
27
28 Polymer.mixin(prototype, mixin);
29
30 delete prototype.mixinPublish;
31 delete prototype.mixinDelegates;
32 delete prototype.mixinObserve;
33
34 return prototype;
35 };
OLDNEW
« 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