(destination, source)
| 192 | } |
| 193 | |
| 194 | function _copyAttributes(destination, source) { |
| 195 | for (var attr of source.attributes) { |
| 196 | if (destination.getAttribute(attr.name) !== attr.value) { |
| 197 | destination.setAttribute(attr.name, attr.value); |
| 198 | if (attr.name === "value" && destination instanceof HTMLInputElement && destination.type !== "file") { |
| 199 | destination.value = attr.value; |
| 200 | } |
| 201 | } |
| 202 | } |
| 203 | for (var i = destination.attributes.length - 1; i >= 0; i--) { |
| 204 | var attr = destination.attributes[i]; |
| 205 | if (attr && !source.hasAttribute(attr.name)) { |
| 206 | destination.removeAttribute(attr.name); |
| 207 | } |
| 208 | } |
| 209 | } |
| 210 | |
| 211 | function _isSoftMatch(oldNode, newNode) { |
| 212 | if (!(oldNode instanceof Element) || oldNode.tagName !== newNode.tagName) return false; |
no outgoing calls
no test coverage detected