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

Method parentUpdated

src/core/context/values.js:240–253  ·  view source on GitHub ↗

* The callback called by the `ContextNode` to notify values of the context * tree changes. This callback schedules recalculations if necessary. * * @package

()

Source from the content-addressed store, hash-verified

238 * @package
239 */
240 parentUpdated() {
241 if (this.isConnected_()) {
242 // Optimization opportunity: in simpler cases, we may only need to refresh
243 // a few specific props or even only specific nodes. E.g. when a single
244 // intermediary parent is inserted between a parent and a child, the amount
245 // of refreshes only depends on the inputs already set on this parent.
246 deepScan(
247 this.contextNode_,
248 scanAll,
249 /*arg=*/ undefined,
250 /*state=*/ EMPTY_ARRAY
251 );
252 }
253 }
254
255 /**
256 * The callback called by the `ContextNode` to notify values of the context

Callers 1

updateTree_Method · 0.80

Calls 2

isConnected_Method · 0.95
deepScanFunction · 0.90

Tested by

no test coverage detected