Sha256: cc3b391ea6ba1daf3cf8b23a823e3854a1883e6d90ad3b94563c9455fa3b3b19

Contents?: true

Size: 899 Bytes

Versions: 9

Compression:

Stored size: 899 Bytes

Contents

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;
};

Version data entries

9 entries across 9 versions & 3 rubygems

Version Path
easycomments-1.0.5 public/bower_components/core-focusable/polymer-mixin.js
easycomments-1.0.4 public/bower_components/core-focusable/polymer-mixin.js
polymer-paper-rails-0.2.6 app/assets/components/core-focusable/polymer-mixin.js
easycomments-1.0.3 public/bower_components/core-focusable/polymer-mixin.js
easycomments-1.0.2 public/bower_components/core-focusable/polymer-mixin.js
easycomments-1.0.1 public/bower_components/core-focusable/polymer-mixin.js
polymer-core-rails-0.2.6 app/assets/components/core-focusable/polymer-mixin.js
polymer-paper-rails-0.2.5 app/assets/components/core-focusable/polymer-mixin.js
polymer-core-rails-0.2.5 app/assets/components/core-focusable/polymer-mixin.js