MCPcopy Index your code
hub / github.com/ampproject/amphtml / scan

Method scan

src/core/context/values.js:297–308  ·  view source on GitHub ↗

* Used for `deepScan` scanner to notify the subtree that the specified * property has changed and needs to be recalculated. * * Scans are relatively common and this method exists (as opposed to be * inlined) only to avoid frequent function allocation. * * @param {IContextProp<?, ?>

(prop)

Source from the content-addressed store, hash-verified

295 * @protected Necessary for cross-binary access.
296 */
297 scan(prop) {
298 this.ping(prop, true);
299 if (!isRecursive(prop)) {
300 // Stop the deepscan. The prop doesn't propagate.
301 return false;
302 }
303 if (this.has(prop)) {
304 // Stop the deepscan. The node will propagate changes downstream.
305 return false;
306 }
307 return true;
308 }
309
310 /**
311 * Used for `deepScan` scanner to notify the subtree to recalculate all

Callers 1

scanFunction · 0.45

Calls 3

pingMethod · 0.95
hasMethod · 0.95
isRecursiveFunction · 0.85

Tested by

no test coverage detected