app/assets/htmls/vendor/polymer.html in gobstones-blockly-0.31.0 vs app/assets/htmls/vendor/polymer.html in gobstones-blockly-0.32.0
- old
+ new
@@ -160,24 +160,34 @@
node = next;
i++;
}
}
},
+_select$Attr: function () {
+var div = document.createElement('div');
+div.innerHTML = '<div select$>';
+return div.childNodes[0].attributes.getNamedItem('select$');
+}(),
_replaceSlotWithContent: function (slot) {
var content = slot.ownerDocument.createElement('content');
while (slot.firstChild) {
content.appendChild(slot.firstChild);
}
var attrs = slot.attributes;
for (var i = 0; i < attrs.length; i++) {
-var attr = attrs[i];
-content.setAttribute(attr.name, attr.value);
+content.attributes.setNamedItem(attrs[i].cloneNode());
}
var name = slot.getAttribute('name');
if (name) {
content.setAttribute('select', '[slot=\'' + name + '\']');
}
+var name$Value = slot.getAttribute('name$');
+if (name$Value) {
+var select$Attr = this._select$Attr.cloneNode();
+select$Attr.value = '[slot=\'' + name$Value + '\']';
+content.attributes.setNamedItem(select$Attr);
+}
slot.parentNode.replaceChild(content, slot);
return content;
},
_parseTemplate: function (node, index, list, parent, stripWhiteSpace) {
var content = document.createDocumentFragment();
@@ -377,11 +387,11 @@
this._marshalAnnotatedNodes();
this._marshalAnnotatedListeners();
}
},
_configureAnnotationReferences: function () {
-var notes = this._notes;
+var notes = this._notes || [];
var nodes = this._nodes;
for (var i = 0; i < notes.length; i++) {
var note = notes[i];
var node = nodes[i];
this._configureTemplateContent(note, node);
@@ -693,11 +703,15 @@
recognizers: [],
deepTargetFind: function (x, y) {
var node = document.elementFromPoint(x, y);
var next = node;
while (next && next.shadowRoot) {
+var oldNext = next;
next = next.shadowRoot.elementFromPoint(x, y);
+if (oldNext === next) {
+break;
+}
if (next) {
node = next;
}
}
return node;
@@ -4344,10 +4358,13 @@
}());Polymer.Templatizer = {
properties: { __hideTemplateChildren__: { observer: '_showHideChildren' } },
_instanceProps: Polymer.nob,
_parentPropPrefix: '_parent_',
templatize: function (template) {
+if (Polymer.Settings.strictTemplatePolicy && !this._getRootDataHost()) {
+throw new Error('strictTemplatePolicy: template owner not trusted');
+}
this._templatized = template;
if (!template._content) {
template._content = template.content;
}
if (template._content._ctor) {
@@ -4943,10 +4960,13 @@
this._needFullRefresh = true;
this._debounceTemplate(this._render);
this._flushTemplates();
},
_render: function () {
+if (!this.ctor) {
+return;
+}
if (this._needFullRefresh) {
this._applyFullRefresh();
this._needFullRefresh = false;
} else if (this._keySplices.length) {
if (this._sortFn) {
@@ -5424,14 +5444,16 @@
_teardownInstance: function () {
if (this._instance) {
var c$ = this._instance._children;
if (c$ && c$.length) {
var parent = Polymer.dom(Polymer.dom(c$[0]).parentNode);
+if (parent) {
for (var i = 0, n; i < c$.length && (n = c$[i]); i++) {
parent.removeChild(n);
}
}
+}
this._instance = null;
}
},
_showHideChildren: function () {
var hidden = this.__hideTemplateChildren__ || !this.if;
@@ -5453,9 +5475,12 @@
is: 'dom-bind',
properties: { notifyDomChange: { type: Boolean } },
extends: 'template',
_template: null,
created: function () {
+if (Polymer.Settings.strictTemplatePolicy) {
+throw new Error('strictTemplatePolicy: dom-bind not allowed');
+}
var self = this;
Polymer.RenderStatus.whenReady(function () {
if (document.readyState == 'loading') {
document.addEventListener('DOMContentLoaded', function () {
self._markImportsReady();