Skip to content

Commit

Permalink
1.6.1-rc1
Browse files Browse the repository at this point in the history
  • Loading branch information
dfreedm committed Jul 29, 2016
1 parent 8715c83 commit 16e9d56
Show file tree
Hide file tree
Showing 3 changed files with 211 additions and 66 deletions.
41 changes: 29 additions & 12 deletions polymer-micro.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--><script>(function () {
-->



<script>(function () {
function resolve() {
document.body.removeAttribute('unresolved');
}
Expand All @@ -22,11 +26,13 @@
}());window.Polymer = {
Settings: function () {
var settings = window.Polymer || {};
if (!settings.noUrlSettings) {
var parts = location.search.slice(1).split('&');
for (var i = 0, o; i < parts.length && (o = parts[i]); i++) {
o = o.split('=');
o[0] && (settings[o[0]] = o[1] || true);
}
}
settings.wantShadow = settings.dom === 'shadow';
settings.hasShadow = Boolean(Element.prototype.createShadowRoot);
settings.nativeShadow = settings.hasShadow && !window.ShadowDOMPolyfill;
Expand Down Expand Up @@ -173,8 +179,14 @@
this.extend(this, feature);
},
registerCallback: function () {
if (settings.lazyRegister === 'max') {
if (this.beforeRegister) {
this.beforeRegister();
}
} else {
this._desugarBehaviors();
this._doBehavior('beforeRegister');
}
this._registerFeatures();
if (!settings.lazyRegister) {
this.ensureRegisterFinished();
Expand All @@ -193,7 +205,11 @@
this._ensureRegisterFinished(this);
},
_ensureRegisterFinished: function (proto) {
if (proto.__hasRegisterFinished !== proto.is) {
if (proto.__hasRegisterFinished !== proto.is || !proto.is) {
if (settings.lazyRegister === 'max') {
proto._desugarBehaviors();
proto._doBehaviorOnly('beforeRegister');
}
proto.__hasRegisterFinished = proto.is;
if (proto._finishRegisterFeatures) {
proto._finishRegisterFeatures();
Expand Down Expand Up @@ -229,14 +245,14 @@
_attributeChangedImpl: function (name) {
this._setAttributeToProperty(this, name);
},
extend: function (prototype, api) {
if (prototype && api) {
var n$ = Object.getOwnPropertyNames(api);
extend: function (target, source) {
if (target && source) {
var n$ = Object.getOwnPropertyNames(source);
for (var i = 0, n; i < n$.length && (n = n$[i]); i++) {
this.copyOwnProperty(n, api, prototype);
this.copyOwnProperty(n, source, target);
}
}
return prototype || api;
return target || source;
},
mixin: function (target, source) {
for (var i in source) {
Expand Down Expand Up @@ -428,6 +444,11 @@
}
this._invokeBehavior(this, name, args);
},
_doBehaviorOnly: function (name, args) {
for (var i = 0; i < this.behaviors.length; i++) {
this._invokeBehavior(this.behaviors[i], name, args);
}
},
_invokeBehavior: function (b, name, args) {
var fn = b[name];
if (fn) {
Expand Down Expand Up @@ -679,7 +700,7 @@
return value != null ? value : undefined;
}
}
});Polymer.version = '1.6.0';Polymer.Base._addFeature({
});Polymer.version = "1.6.0";Polymer.Base._addFeature({
_registerFeatures: function () {
this._prepIs();
this._prepBehaviors();
Expand Down Expand Up @@ -709,7 +730,3 @@







4 changes: 2 additions & 2 deletions polymer-mini.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--><link rel="import" href="polymer-micro.html">



<script>Polymer.Base._addFeature({
_prepTemplate: function () {
if (this._template === undefined) {
Expand Down Expand Up @@ -2160,5 +2162,3 @@





Loading

0 comments on commit 16e9d56

Please sign in to comment.