mirror of
https://github.com/Polymer/polymer.git
synced 2025-02-25 18:55:30 -06:00
Fix for Polymer.dom(...)._query()
method doesn't exist which causes Polymer.updateStyles()
to fail
This commit is contained in:
parent
273ab0fbe6
commit
0eea7a6038
@ -26,6 +26,28 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
return TreeApi.arrayCopy(this.node.querySelectorAll(selector));
|
||||
},
|
||||
|
||||
_query: function(matcher, node) {
|
||||
node = node || this.node;
|
||||
var list = [];
|
||||
this._queryElements(node.childNodes, matcher, list);
|
||||
return list;
|
||||
},
|
||||
|
||||
_queryElements: function(elements, matcher, list) {
|
||||
for (var i=0, l=elements.length, c; (i<l) && (c=elements[i]); i++) {
|
||||
if (c.nodeType === Node.ELEMENT_NODE) {
|
||||
this._queryElement(c, matcher, list);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
_queryElement: function(node, matcher, list) {
|
||||
if (matcher(node)) {
|
||||
list.push(node);
|
||||
}
|
||||
this._queryElements(node.childNodes, matcher, list);
|
||||
},
|
||||
|
||||
getOwnerRoot: function() {
|
||||
var n = this.node;
|
||||
while (n) {
|
||||
@ -57,7 +79,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
});
|
||||
|
||||
Object.defineProperties(DomApi.prototype, {
|
||||
|
||||
|
||||
childNodes: {
|
||||
get: function() {
|
||||
return TreeApi.arrayCopyChildNodes(this.node);
|
||||
@ -108,7 +130,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
};
|
||||
|
||||
forwardMethods(['cloneNode', 'appendChild', 'insertBefore',
|
||||
'removeChild', 'replaceChild', 'setAttribute', 'removeAttribute',
|
||||
'removeChild', 'replaceChild', 'setAttribute', 'removeAttribute',
|
||||
'querySelector']);
|
||||
|
||||
var forwardProperties = function(f$) {
|
||||
@ -131,4 +153,4 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
'lastElementChild', 'nextElementSibling', 'previousElementSibling']);
|
||||
|
||||
})();
|
||||
</script>
|
||||
</script>
|
||||
|
@ -62,6 +62,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
// 'unit/styling-cross-scope-apply.html?dom=shadow',
|
||||
'unit/styling-cross-scope-unknown-host.html',
|
||||
'unit/custom-style.html',
|
||||
'unit/custom-style.html?dom=shadow',
|
||||
'unit/custom-style-late.html',
|
||||
'unit/dynamic-import.html',
|
||||
'unit/templatizer.html',
|
||||
|
Loading…
Reference in New Issue
Block a user