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

Unified Diff: third_party/polymer/v1_0/components/polymer/polymer-micro.html

Issue 1221923003: Update bower.json for Polymer elements and add PRESUBMIT.py (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 5 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: third_party/polymer/v1_0/components/polymer/polymer-micro.html
diff --git a/third_party/polymer/v1_0/components/polymer/polymer-micro.html b/third_party/polymer/v1_0/components/polymer/polymer-micro.html
index 8e72da411663b2a0c6280e62cf9455f414f0c721..caad8448e827ce321f424219c927e721136bed5b 100644
--- a/third_party/polymer/v1_0/components/polymer/polymer-micro.html
+++ b/third_party/polymer/v1_0/components/polymer/polymer-micro.html
@@ -59,7 +59,11 @@ document.registerElement(prototype.is, options);
return ctor;
};
var desugar = function (prototype) {
-prototype = Polymer.Base.chainObject(prototype, Polymer.Base);
+var base = Polymer.Base;
+if (prototype.extends) {
+base = Polymer.Base._getExtendedPrototype(prototype.extends);
+}
+prototype = Polymer.Base.chainObject(prototype, base);
prototype.registerCallback();
return prototype.constructor;
};
@@ -92,6 +96,7 @@ return (document._currentScript || document.currentScript).ownerDocument;
}
});
Polymer.Base = {
+__isPolymerInstance__: true,
_addFeature: function (feature) {
this.extend(this, feature);
},
@@ -125,6 +130,12 @@ this.copyOwnProperty(n, api, prototype);
}
return prototype || api;
},
+mixin: function (target, source) {
+for (var i in source) {
+target[i] = source[i];
+}
+return target;
+},
copyOwnProperty: function (name, source, target) {
var pd = Object.getOwnPropertyDescriptor(source, name);
if (pd) {
@@ -155,6 +166,16 @@ object.__proto__ = inherited;
return object;
};
Polymer.Base = Polymer.Base.chainObject(Polymer.Base, HTMLElement.prototype);
+if (window.CustomElements) {
+Polymer.instanceof = CustomElements.instanceof;
+} else {
+Polymer.instanceof = function (obj, ctor) {
+return obj instanceof ctor;
+};
+}
+Polymer.isInstance = function (obj) {
+return Boolean(obj && obj.__isPolymerInstance__);
+};
Polymer.telemetry.instanceCount = 0;
(function () {
var modules = {};
@@ -283,11 +304,6 @@ this._marshalBehavior(this);
}
});
Polymer.Base._addFeature({
-_prepExtends: function () {
-if (this.extends) {
-this.__proto__ = this._getExtendedPrototype(this.extends);
-}
-},
_getExtendedPrototype: function (tag) {
return this._getExtendedNativePrototype(tag);
},
@@ -500,13 +516,12 @@ debouncer.stop();
}
}
});
-Polymer.version = '1.0.3';
+Polymer.version = '1.0.7';
Polymer.Base._addFeature({
_registerFeatures: function () {
this._prepIs();
this._prepAttributes();
this._prepBehaviors();
-this._prepExtends();
this._prepConstructor();
},
_prepBehavior: function (b) {

Powered by Google App Engine
This is Rietveld 408576698