Skip to content

Commit

Permalink
Fix typo that prevented correct functioning of Polymer.dom under Shad…
Browse files Browse the repository at this point in the history
…ow DOM and add tests to catch.
  • Loading branch information
Steven Orvell committed Nov 6, 2015
1 parent f5aec30 commit cdc9fde
Show file tree
Hide file tree
Showing 3 changed files with 275 additions and 116 deletions.
10 changes: 5 additions & 5 deletions src/lib/dom-api.html
Original file line number Diff line number Diff line change
Expand Up @@ -771,13 +771,13 @@
};

var forwardMethod = function(method) {
DomApi.prototype[name] = function() {
return this.node[name].apply(this.node, arguments);
DomApi.prototype[method] = function() {
return this.node[method].apply(this.node, arguments);
}
};

forwardMethods(['cloneNode', 'appendChild', 'insertBefore',
'removeChild', 'replaceChild'])
'removeChild', 'replaceChild']);

DomApi.prototype.querySelectorAll = function(selector) {
return arrayCopy(this.node.querySelectorAll(selector));
Expand Down Expand Up @@ -868,8 +868,8 @@
};

forwardProperties(['parentNode', 'firstChild', 'lastChild',
'nextSibling', 'previousSibling', 'firstElementChild', 'lastElementChild',
'nextElementSibling', 'previousElementSibling']);
'nextSibling', 'previousSibling', 'firstElementChild',
'lastElementChild', 'nextElementSibling', 'previousElementSibling']);

}

Expand Down
1 change: 1 addition & 0 deletions test/runner.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
'unit/polymer-dom.html',
'unit/polymer-dom-shadow.html',
'unit/polymer-dom-content.html',
'unit/polymer-dom-content.html?dom=shadow',
'unit/polymer-dom-observeNodes.html',
'unit/polymer-dom-observeNodes.html?dom=shadow',
'unit/bind.html',
Expand Down
Loading

0 comments on commit cdc9fde

Please sign in to comment.