polymer-rails 1.0.7 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/javascripts/polymer/polymer-micro.html +15 -10
- data/app/assets/javascripts/polymer/polymer-mini.html +58 -16
- data/app/assets/javascripts/polymer/polymer.html +72 -39
- data/app/assets/javascripts/webcomponentsjs/webcomponents-lite.js +16 -7
- data/app/assets/javascripts/webcomponentsjs/webcomponents.js +16 -7
- data/lib/polymer-rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ecf7e71200170aa403fe1be244d174e279a23bde
|
4
|
+
data.tar.gz: a9abb29fbdb4803dff93ef60e0ef55fb928b4198
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3834d8868077d593ce221702f3ff330523a824ba857837858e65aab2202991071a5f77f64b159667a5b8a65861986f9284d10b082d4dea1a96ab2e03a9f12fe9
|
7
|
+
data.tar.gz: b3581feb883322380e1a97d65d3fc68fbc461b5c6d9a345586fc47135103b35d753dac7541455f030d5f02c305122e2cdb49fa8a25d8d8bc47b40329b7d415c1
|
@@ -183,25 +183,30 @@ var DomModule = function () {
|
|
183
183
|
return document.createElement('dom-module');
|
184
184
|
};
|
185
185
|
DomModule.prototype = Object.create(HTMLElement.prototype);
|
186
|
-
DomModule.prototype
|
187
|
-
DomModule
|
188
|
-
|
186
|
+
Polymer.Base.extend(DomModule.prototype, {
|
187
|
+
constructor: DomModule,
|
188
|
+
createdCallback: function () {
|
189
|
+
this.register();
|
190
|
+
},
|
191
|
+
register: function (id) {
|
192
|
+
var id = id || this.id || this.getAttribute('name') || this.getAttribute('is');
|
189
193
|
if (id) {
|
190
194
|
this.id = id;
|
191
195
|
modules[id] = this;
|
192
196
|
}
|
193
|
-
}
|
194
|
-
|
197
|
+
},
|
198
|
+
import: function (id, selector) {
|
195
199
|
var m = modules[id];
|
196
200
|
if (!m) {
|
197
201
|
forceDocumentUpgrade();
|
198
202
|
m = modules[id];
|
199
203
|
}
|
200
|
-
if (m &&
|
201
|
-
m = m.querySelector(
|
204
|
+
if (m && selector) {
|
205
|
+
m = m.querySelector(selector);
|
202
206
|
}
|
203
207
|
return m;
|
204
|
-
}
|
208
|
+
}
|
209
|
+
});
|
205
210
|
var cePolyfill = window.CustomElements && !CustomElements.useNative;
|
206
211
|
if (cePolyfill) {
|
207
212
|
var ready = CustomElements.ready;
|
@@ -497,7 +502,7 @@ _setupDebouncers: function () {
|
|
497
502
|
this._debouncers = {};
|
498
503
|
},
|
499
504
|
debounce: function (jobName, callback, wait) {
|
500
|
-
this._debouncers[jobName] = Polymer.Debounce.call(this, this._debouncers[jobName], callback, wait);
|
505
|
+
return this._debouncers[jobName] = Polymer.Debounce.call(this, this._debouncers[jobName], callback, wait);
|
501
506
|
},
|
502
507
|
isDebouncerActive: function (jobName) {
|
503
508
|
var debouncer = this._debouncers[jobName];
|
@@ -516,7 +521,7 @@ debouncer.stop();
|
|
516
521
|
}
|
517
522
|
}
|
518
523
|
});
|
519
|
-
Polymer.version = '1.0.
|
524
|
+
Polymer.version = '1.0.8';
|
520
525
|
Polymer.Base._addFeature({
|
521
526
|
_registerFeatures: function () {
|
522
527
|
this._prepIs();
|
@@ -428,7 +428,6 @@ var nativeRemoveChild = Element.prototype.removeChild;
|
|
428
428
|
var nativeAppendChild = Element.prototype.appendChild;
|
429
429
|
var nativeCloneNode = Element.prototype.cloneNode;
|
430
430
|
var nativeImportNode = Document.prototype.importNode;
|
431
|
-
var dirtyRoots = [];
|
432
431
|
var DomApi = function (node) {
|
433
432
|
this.node = node;
|
434
433
|
if (this.patch) {
|
@@ -437,17 +436,12 @@ this.patch();
|
|
437
436
|
};
|
438
437
|
DomApi.prototype = {
|
439
438
|
flush: function () {
|
440
|
-
|
441
|
-
host = dirtyRoots[i];
|
442
|
-
host.flushDebouncer('_distribute');
|
443
|
-
}
|
444
|
-
dirtyRoots = [];
|
439
|
+
Polymer.dom.flush();
|
445
440
|
},
|
446
441
|
_lazyDistribute: function (host) {
|
447
442
|
if (host.shadyRoot && host.shadyRoot._distributionClean) {
|
448
443
|
host.shadyRoot._distributionClean = false;
|
449
|
-
host.debounce('_distribute', host._distributeContent);
|
450
|
-
dirtyRoots.push(host);
|
444
|
+
Polymer.dom.addDebouncer(host.debounce('_distribute', host._distributeContent));
|
451
445
|
}
|
452
446
|
},
|
453
447
|
appendChild: function (node) {
|
@@ -883,32 +877,44 @@ configurable: true
|
|
883
877
|
},
|
884
878
|
textContent: {
|
885
879
|
get: function () {
|
886
|
-
|
880
|
+
var nt = this.node.nodeType;
|
881
|
+
if (nt === Node.TEXT_NODE || nt === Node.COMMENT_NODE) {
|
887
882
|
return this.node.textContent;
|
888
883
|
} else {
|
889
|
-
|
890
|
-
|
891
|
-
|
884
|
+
var tc = [];
|
885
|
+
for (var i = 0, cn = this.childNodes, c; c = cn[i]; i++) {
|
886
|
+
if (c.nodeType !== Node.COMMENT_NODE) {
|
887
|
+
tc.push(c.textContent);
|
888
|
+
}
|
889
|
+
}
|
890
|
+
return tc.join('');
|
892
891
|
}
|
893
892
|
},
|
894
893
|
set: function (text) {
|
894
|
+
var nt = this.node.nodeType;
|
895
|
+
if (nt === Node.TEXT_NODE || nt === Node.COMMENT_NODE) {
|
896
|
+
this.node.textContent = text;
|
897
|
+
} else {
|
895
898
|
this._clear();
|
896
899
|
if (text) {
|
897
900
|
this.appendChild(document.createTextNode(text));
|
898
901
|
}
|
902
|
+
}
|
899
903
|
},
|
900
904
|
configurable: true
|
901
905
|
},
|
902
906
|
innerHTML: {
|
903
907
|
get: function () {
|
904
|
-
|
908
|
+
var nt = this.node.nodeType;
|
909
|
+
if (nt === Node.TEXT_NODE || nt === Node.COMMENT_NODE) {
|
905
910
|
return null;
|
906
911
|
} else {
|
907
912
|
return getInnerHTML(this.node);
|
908
913
|
}
|
909
914
|
},
|
910
915
|
set: function (text) {
|
911
|
-
|
916
|
+
var nt = this.node.nodeType;
|
917
|
+
if (nt !== Node.TEXT_NODE || nt !== Node.COMMENT_NODE) {
|
912
918
|
this._clear();
|
913
919
|
var d = document.createElement('div');
|
914
920
|
d.innerHTML = text;
|
@@ -1021,7 +1027,43 @@ return Polymer.EventApi.factory(obj);
|
|
1021
1027
|
return factory(obj, patch);
|
1022
1028
|
}
|
1023
1029
|
};
|
1024
|
-
Polymer.dom
|
1030
|
+
Polymer.Base.extend(Polymer.dom, {
|
1031
|
+
_flushGuard: 0,
|
1032
|
+
_FLUSH_MAX: 100,
|
1033
|
+
_needsTakeRecords: !Polymer.Settings.useNativeCustomElements,
|
1034
|
+
_debouncers: [],
|
1035
|
+
_finishDebouncer: null,
|
1036
|
+
flush: function () {
|
1037
|
+
for (var i = 0; i < this._debouncers.length; i++) {
|
1038
|
+
this._debouncers[i].complete();
|
1039
|
+
}
|
1040
|
+
if (this._finishDebouncer) {
|
1041
|
+
this._finishDebouncer.complete();
|
1042
|
+
}
|
1043
|
+
this._flushPolyfills();
|
1044
|
+
if (this._debouncers.length && this._flushGuard < this._FLUSH_MAX) {
|
1045
|
+
this._flushGuard++;
|
1046
|
+
this.flush();
|
1047
|
+
} else {
|
1048
|
+
if (this._flushGuard >= this._FLUSH_MAX) {
|
1049
|
+
console.warn('Polymer.dom.flush aborted. Flush may not be complete.');
|
1050
|
+
}
|
1051
|
+
this._flushGuard = 0;
|
1052
|
+
}
|
1053
|
+
},
|
1054
|
+
_flushPolyfills: function () {
|
1055
|
+
if (this._needsTakeRecords) {
|
1056
|
+
CustomElements.takeRecords();
|
1057
|
+
}
|
1058
|
+
},
|
1059
|
+
addDebouncer: function (debouncer) {
|
1060
|
+
this._debouncers.push(debouncer);
|
1061
|
+
this._finishDebouncer = Polymer.Debounce(this._finishDebouncer, this._finishFlush);
|
1062
|
+
},
|
1063
|
+
_finishFlush: function () {
|
1064
|
+
Polymer.dom._debouncers = [];
|
1065
|
+
}
|
1066
|
+
});
|
1025
1067
|
function getLightChildren(node) {
|
1026
1068
|
var children = node._lightChildren;
|
1027
1069
|
return children ? children : node.childNodes;
|
@@ -1147,6 +1189,7 @@ this.shadyRoot._dirtyRoots = [];
|
|
1147
1189
|
},
|
1148
1190
|
_finishDistribute: function () {
|
1149
1191
|
if (this._useContent) {
|
1192
|
+
this.shadyRoot._distributionClean = true;
|
1150
1193
|
if (hasInsertionPoint(this.shadyRoot)) {
|
1151
1194
|
this._composeTree();
|
1152
1195
|
} else {
|
@@ -1160,7 +1203,6 @@ this._updateChildNodes(this, children);
|
|
1160
1203
|
}
|
1161
1204
|
}
|
1162
1205
|
this.shadyRoot._hasDistributed = true;
|
1163
|
-
this.shadyRoot._distributionClean = true;
|
1164
1206
|
}
|
1165
1207
|
},
|
1166
1208
|
elementMatches: function (selector, node) {
|
@@ -546,6 +546,16 @@ var recognizers = Gestures.recognizers;
|
|
546
546
|
for (var i = 0, r; i < recognizers.length; i++) {
|
547
547
|
r = recognizers[i];
|
548
548
|
if (gs[r.name] && !handled[r.name]) {
|
549
|
+
if (r.flow && r.flow.start.indexOf(ev.type) > -1) {
|
550
|
+
if (r.reset) {
|
551
|
+
r.reset();
|
552
|
+
}
|
553
|
+
}
|
554
|
+
}
|
555
|
+
}
|
556
|
+
for (var i = 0, r; i < recognizers.length; i++) {
|
557
|
+
r = recognizers[i];
|
558
|
+
if (gs[r.name] && !handled[r.name]) {
|
549
559
|
handled[r.name] = true;
|
550
560
|
r[type](ev);
|
551
561
|
}
|
@@ -577,6 +587,8 @@ prevent = dx > dy;
|
|
577
587
|
}
|
578
588
|
if (prevent) {
|
579
589
|
ev.preventDefault();
|
590
|
+
} else {
|
591
|
+
Gestures.prevent('track');
|
580
592
|
}
|
581
593
|
}
|
582
594
|
},
|
@@ -718,6 +730,16 @@ deps: [
|
|
718
730
|
'touchmove',
|
719
731
|
'touchend'
|
720
732
|
],
|
733
|
+
flow: {
|
734
|
+
start: [
|
735
|
+
'mousedown',
|
736
|
+
'touchstart'
|
737
|
+
],
|
738
|
+
end: [
|
739
|
+
'mouseup',
|
740
|
+
'touchend'
|
741
|
+
]
|
742
|
+
},
|
721
743
|
emits: ['track'],
|
722
744
|
info: {
|
723
745
|
x: 0,
|
@@ -733,7 +755,7 @@ this.moves.push(move);
|
|
733
755
|
},
|
734
756
|
prevent: false
|
735
757
|
},
|
736
|
-
|
758
|
+
reset: function () {
|
737
759
|
this.info.state = 'start';
|
738
760
|
this.info.started = false;
|
739
761
|
this.info.moves = [];
|
@@ -772,7 +794,6 @@ if (self.info.started) {
|
|
772
794
|
Gestures.prevent('tap');
|
773
795
|
movefn(e);
|
774
796
|
}
|
775
|
-
self.clearInfo();
|
776
797
|
document.removeEventListener('mousemove', movefn);
|
777
798
|
document.removeEventListener('mouseup', upfn);
|
778
799
|
};
|
@@ -812,7 +833,6 @@ y: ct.clientY
|
|
812
833
|
});
|
813
834
|
this.fire(t, ct);
|
814
835
|
}
|
815
|
-
this.clearInfo();
|
816
836
|
},
|
817
837
|
fire: function (target, touch) {
|
818
838
|
var secondlast = this.info.moves[this.info.moves.length - 2];
|
@@ -847,6 +867,16 @@ deps: [
|
|
847
867
|
'touchstart',
|
848
868
|
'touchend'
|
849
869
|
],
|
870
|
+
flow: {
|
871
|
+
start: [
|
872
|
+
'mousedown',
|
873
|
+
'touchstart'
|
874
|
+
],
|
875
|
+
end: [
|
876
|
+
'click',
|
877
|
+
'touchend'
|
878
|
+
]
|
879
|
+
},
|
850
880
|
emits: ['tap'],
|
851
881
|
info: {
|
852
882
|
x: NaN,
|
@@ -887,7 +917,6 @@ sourceEvent: e
|
|
887
917
|
});
|
888
918
|
}
|
889
919
|
}
|
890
|
-
this.reset();
|
891
920
|
}
|
892
921
|
});
|
893
922
|
var DIRECTION_MAP = {
|
@@ -1584,7 +1613,12 @@ this._effectEffects('__static__', null, this._propertyEffects.__static__);
|
|
1584
1613
|
});
|
1585
1614
|
Polymer.Base._addFeature({
|
1586
1615
|
_setupConfigure: function (initialConfig) {
|
1587
|
-
this._config =
|
1616
|
+
this._config = {};
|
1617
|
+
for (var i in initialConfig) {
|
1618
|
+
if (initialConfig[i] !== undefined) {
|
1619
|
+
this._config[i] = initialConfig[i];
|
1620
|
+
}
|
1621
|
+
}
|
1588
1622
|
this._handlers = [];
|
1589
1623
|
},
|
1590
1624
|
_marshalAttributes: function () {
|
@@ -1713,8 +1747,9 @@ var array;
|
|
1713
1747
|
var last = parts[parts.length - 1];
|
1714
1748
|
if (parts.length > 1) {
|
1715
1749
|
for (var i = 0; i < parts.length - 1; i++) {
|
1716
|
-
|
1717
|
-
|
1750
|
+
var part = parts[i];
|
1751
|
+
prop = prop[part];
|
1752
|
+
if (array && parseInt(part) == part) {
|
1718
1753
|
parts[i] = Polymer.Collection.get(array).getKey(prop);
|
1719
1754
|
}
|
1720
1755
|
if (!prop) {
|
@@ -1722,15 +1757,13 @@ return;
|
|
1722
1757
|
}
|
1723
1758
|
array = Array.isArray(prop) ? prop : null;
|
1724
1759
|
}
|
1725
|
-
if (array) {
|
1760
|
+
if (array && parseInt(last) == last) {
|
1726
1761
|
var coll = Polymer.Collection.get(array);
|
1727
1762
|
var old = prop[last];
|
1728
1763
|
var key = coll.getKey(old);
|
1729
|
-
if (key) {
|
1730
1764
|
parts[i] = key;
|
1731
1765
|
coll.setItem(key, value);
|
1732
1766
|
}
|
1733
|
-
}
|
1734
1767
|
prop[last] = value;
|
1735
1768
|
if (!root) {
|
1736
1769
|
this.notifyPath(parts.join('.'), value);
|
@@ -2826,6 +2859,7 @@ Polymer.Base._addFeature({
|
|
2826
2859
|
_prepStyleProperties: function () {
|
2827
2860
|
this._ownStylePropertyNames = this._styles ? propertyUtils.decorateStyles(this._styles) : [];
|
2828
2861
|
},
|
2862
|
+
customStyle: {},
|
2829
2863
|
_setupStyleProperties: function () {
|
2830
2864
|
this.customStyle = {};
|
2831
2865
|
},
|
@@ -3057,15 +3091,8 @@ styleTransformer.documentRule(rule);
|
|
3057
3091
|
}());
|
3058
3092
|
Polymer.Templatizer = {
|
3059
3093
|
properties: { __hideTemplateChildren__: { observer: '_showHideChildren' } },
|
3060
|
-
_templatizerStatic: {
|
3061
|
-
count: 0,
|
3062
|
-
callbacks: {},
|
3063
|
-
debouncer: null
|
3064
|
-
},
|
3065
3094
|
_instanceProps: Polymer.nob,
|
3066
|
-
|
3067
|
-
this._templatizerId = this._templatizerStatic.count++;
|
3068
|
-
},
|
3095
|
+
_parentPropPrefix: '_parent_',
|
3069
3096
|
templatize: function (template) {
|
3070
3097
|
if (!template._content) {
|
3071
3098
|
template._content = template.content;
|
@@ -3109,20 +3136,10 @@ n.__hideTemplateChildren__ = hide;
|
|
3109
3136
|
}
|
3110
3137
|
},
|
3111
3138
|
_debounceTemplate: function (fn) {
|
3112
|
-
|
3113
|
-
this._templatizerStatic.debouncer = Polymer.Debounce(this._templatizerStatic.debouncer, this._flushTemplates.bind(this, true));
|
3139
|
+
Polymer.dom.addDebouncer(this.debounce('_debounceTemplate', fn));
|
3114
3140
|
},
|
3115
3141
|
_flushTemplates: function (debouncerExpired) {
|
3116
|
-
|
3117
|
-
while (debouncerExpired || db && db.finish) {
|
3118
|
-
db.stop();
|
3119
|
-
var cbs = this._templatizerStatic.callbacks;
|
3120
|
-
this._templatizerStatic.callbacks = {};
|
3121
|
-
for (var id in cbs) {
|
3122
|
-
cbs[id]();
|
3123
|
-
}
|
3124
|
-
debouncerExpired = false;
|
3125
|
-
}
|
3142
|
+
Polymer.dom.flush();
|
3126
3143
|
},
|
3127
3144
|
_customPrepEffects: function (archetype) {
|
3128
3145
|
var parentProps = archetype._parentProps;
|
@@ -3162,7 +3179,7 @@ if (template != this) {
|
|
3162
3179
|
Polymer.Bind.prepareModel(proto);
|
3163
3180
|
}
|
3164
3181
|
for (prop in parentProps) {
|
3165
|
-
var parentProp =
|
3182
|
+
var parentProp = this._parentPropPrefix + prop;
|
3166
3183
|
var effects = [
|
3167
3184
|
{
|
3168
3185
|
kind: 'function',
|
@@ -3186,8 +3203,9 @@ this._forwardParentProp(prop, value);
|
|
3186
3203
|
};
|
3187
3204
|
},
|
3188
3205
|
_createHostPropEffector: function (prop) {
|
3206
|
+
var prefix = this._parentPropPrefix;
|
3189
3207
|
return function (source, value) {
|
3190
|
-
this.dataHost[
|
3208
|
+
this.dataHost[prefix + prop] = value;
|
3191
3209
|
};
|
3192
3210
|
},
|
3193
3211
|
_createInstancePropEffector: function (prop) {
|
@@ -3219,12 +3237,12 @@ var dot = path.indexOf('.');
|
|
3219
3237
|
var root = dot < 0 ? path : path.slice(0, dot);
|
3220
3238
|
dataHost._forwardInstancePath.call(dataHost, this, path, value);
|
3221
3239
|
if (root in dataHost._parentProps) {
|
3222
|
-
dataHost.notifyPath(
|
3240
|
+
dataHost.notifyPath(dataHost._parentPropPrefix + path, value);
|
3223
3241
|
}
|
3224
3242
|
},
|
3225
3243
|
_pathEffector: function (path, value, fromAbove) {
|
3226
3244
|
if (this._forwardParentPath) {
|
3227
|
-
if (path.indexOf(
|
3245
|
+
if (path.indexOf(this._parentPropPrefix) === 0) {
|
3228
3246
|
this._forwardParentPath(path.substring(8), value);
|
3229
3247
|
}
|
3230
3248
|
}
|
@@ -3272,7 +3290,7 @@ stamp: function (model) {
|
|
3272
3290
|
model = model || {};
|
3273
3291
|
if (this._parentProps) {
|
3274
3292
|
for (var prop in this._parentProps) {
|
3275
|
-
model[prop] = this[
|
3293
|
+
model[prop] = this[this._parentPropPrefix + prop];
|
3276
3294
|
}
|
3277
3295
|
}
|
3278
3296
|
return new this.ctor(model, this);
|
@@ -3988,7 +4006,16 @@ Polymer({
|
|
3988
4006
|
is: 'dom-bind',
|
3989
4007
|
extends: 'template',
|
3990
4008
|
created: function () {
|
3991
|
-
Polymer.ImportStatus.whenLoaded(this.
|
4009
|
+
Polymer.ImportStatus.whenLoaded(this._markImportsReady.bind(this));
|
4010
|
+
},
|
4011
|
+
_ensureReady: function () {
|
4012
|
+
if (!this._readied) {
|
4013
|
+
this._readySelf();
|
4014
|
+
}
|
4015
|
+
},
|
4016
|
+
_markImportsReady: function () {
|
4017
|
+
this._importsReady = true;
|
4018
|
+
this._ensureReady();
|
3992
4019
|
},
|
3993
4020
|
_registerFeatures: function () {
|
3994
4021
|
this._prepConstructor();
|
@@ -4021,6 +4048,15 @@ config[prop] = this[prop];
|
|
4021
4048
|
this._setupConfigure = this._setupConfigure.bind(this, config);
|
4022
4049
|
},
|
4023
4050
|
attached: function () {
|
4051
|
+
if (this._importsReady) {
|
4052
|
+
this.render();
|
4053
|
+
}
|
4054
|
+
},
|
4055
|
+
detached: function () {
|
4056
|
+
this._removeChildren();
|
4057
|
+
},
|
4058
|
+
render: function () {
|
4059
|
+
this._ensureReady();
|
4024
4060
|
if (!this._children) {
|
4025
4061
|
this._template = this;
|
4026
4062
|
this._prepAnnotations();
|
@@ -4033,8 +4069,5 @@ this._children = Array.prototype.slice.call(this.root.childNodes);
|
|
4033
4069
|
}
|
4034
4070
|
this._insertChildren();
|
4035
4071
|
this.fire('dom-change');
|
4036
|
-
},
|
4037
|
-
detached: function () {
|
4038
|
-
this._removeChildren();
|
4039
4072
|
}
|
4040
4073
|
});</script>
|
@@ -7,7 +7,7 @@
|
|
7
7
|
* Code distributed by Google as part of the polymer project is also
|
8
8
|
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
9
9
|
*/
|
10
|
-
// @version 0.7.
|
10
|
+
// @version 0.7.7
|
11
11
|
window.WebComponents = window.WebComponents || {};
|
12
12
|
|
13
13
|
(function(scope) {
|
@@ -2072,17 +2072,23 @@ window.CustomElements.addModule(function(scope) {
|
|
2072
2072
|
var nativePrototype = HTMLElement.prototype;
|
2073
2073
|
if (definition.is) {
|
2074
2074
|
var inst = document.createElement(definition.tag);
|
2075
|
-
|
2076
|
-
if (expectedPrototype === definition.prototype) {
|
2077
|
-
nativePrototype = expectedPrototype;
|
2078
|
-
}
|
2075
|
+
nativePrototype = Object.getPrototypeOf(inst);
|
2079
2076
|
}
|
2080
2077
|
var proto = definition.prototype, ancestor;
|
2081
|
-
|
2078
|
+
var foundPrototype = false;
|
2079
|
+
while (proto) {
|
2080
|
+
if (proto == nativePrototype) {
|
2081
|
+
foundPrototype = true;
|
2082
|
+
}
|
2082
2083
|
ancestor = Object.getPrototypeOf(proto);
|
2083
|
-
|
2084
|
+
if (ancestor) {
|
2085
|
+
proto.__proto__ = ancestor;
|
2086
|
+
}
|
2084
2087
|
proto = ancestor;
|
2085
2088
|
}
|
2089
|
+
if (!foundPrototype) {
|
2090
|
+
console.warn(definition.tag + " prototype not found in prototype chain for " + definition.is);
|
2091
|
+
}
|
2086
2092
|
definition.native = nativePrototype;
|
2087
2093
|
}
|
2088
2094
|
}
|
@@ -2144,6 +2150,9 @@ window.CustomElements.addModule(function(scope) {
|
|
2144
2150
|
var isInstance;
|
2145
2151
|
if (!Object.__proto__ && !useNative) {
|
2146
2152
|
isInstance = function(obj, ctor) {
|
2153
|
+
if (obj instanceof ctor) {
|
2154
|
+
return true;
|
2155
|
+
}
|
2147
2156
|
var p = obj;
|
2148
2157
|
while (p) {
|
2149
2158
|
if (p === ctor.prototype) {
|
@@ -7,7 +7,7 @@
|
|
7
7
|
* Code distributed by Google as part of the polymer project is also
|
8
8
|
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
9
9
|
*/
|
10
|
-
// @version 0.7.
|
10
|
+
// @version 0.7.7
|
11
11
|
window.WebComponents = window.WebComponents || {};
|
12
12
|
|
13
13
|
(function(scope) {
|
@@ -6841,17 +6841,23 @@ window.CustomElements.addModule(function(scope) {
|
|
6841
6841
|
var nativePrototype = HTMLElement.prototype;
|
6842
6842
|
if (definition.is) {
|
6843
6843
|
var inst = document.createElement(definition.tag);
|
6844
|
-
|
6845
|
-
if (expectedPrototype === definition.prototype) {
|
6846
|
-
nativePrototype = expectedPrototype;
|
6847
|
-
}
|
6844
|
+
nativePrototype = Object.getPrototypeOf(inst);
|
6848
6845
|
}
|
6849
6846
|
var proto = definition.prototype, ancestor;
|
6850
|
-
|
6847
|
+
var foundPrototype = false;
|
6848
|
+
while (proto) {
|
6849
|
+
if (proto == nativePrototype) {
|
6850
|
+
foundPrototype = true;
|
6851
|
+
}
|
6851
6852
|
ancestor = Object.getPrototypeOf(proto);
|
6852
|
-
|
6853
|
+
if (ancestor) {
|
6854
|
+
proto.__proto__ = ancestor;
|
6855
|
+
}
|
6853
6856
|
proto = ancestor;
|
6854
6857
|
}
|
6858
|
+
if (!foundPrototype) {
|
6859
|
+
console.warn(definition.tag + " prototype not found in prototype chain for " + definition.is);
|
6860
|
+
}
|
6855
6861
|
definition.native = nativePrototype;
|
6856
6862
|
}
|
6857
6863
|
}
|
@@ -6913,6 +6919,9 @@ window.CustomElements.addModule(function(scope) {
|
|
6913
6919
|
var isInstance;
|
6914
6920
|
if (!Object.__proto__ && !useNative) {
|
6915
6921
|
isInstance = function(obj, ctor) {
|
6922
|
+
if (obj instanceof ctor) {
|
6923
|
+
return true;
|
6924
|
+
}
|
6916
6925
|
var p = obj;
|
6917
6926
|
while (p) {
|
6918
6927
|
if (p === ctor.prototype) {
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: polymer-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Chaplinsky
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|