MCPcopy Create free account
hub / github.com/ampproject/amphtml / getCheckSum

Function getCheckSum

third_party/set-dom/original.js:248–250  ·  view source on GitHub ↗

* @private * @description * Utility to try to pull a checksum attribute from an element. * Uses 'data-checksum' or user specified checksum property. * * @param {Node} node - The node to get the checksum for. * @return {string|NaN}

(node)

Source from the content-addressed store, hash-verified

246 * @return {string|NaN}
247 */
248function getCheckSum (node) {
249 return node.getAttribute(setDOM.CHECKSUM) || NaN
250}
251
252/**
253 * @private

Callers 1

isEqualNodeFunction · 0.70

Calls 1

getAttributeMethod · 0.80

Tested by

no test coverage detected