* @private * @description * Utility to try to pull a key out of an element. * Uses 'data-key' if possible and falls back to 'id'. * * @param {Node} node - The node to get the key for. * @return {string|void}
(node)
| 212 | * @return {string|void} |
| 213 | */ |
| 214 | function getKey (node) { |
| 215 | if (node.nodeType !== ELEMENT_TYPE_ENUM) return |
| 216 | var key = node.getAttribute(setDOM.KEY) || node.id |
| 217 | if (key) return KEY_PREFIX + key |
| 218 | } |
| 219 | |
| 220 | /** |
| 221 | * Checks if nodes are equal using the following by checking if |
no test coverage detected