* Used for `deepScan` scanner to notify the subtree to recalculate all * properties. * * Scans are relatively common and this method exists (as opposed to be * inlined) only to avoid frequent function allocation. * * @param {string[]} scheduled The already scheduled props. * @re
(scheduled)
| 319 | * @protected |
| 320 | */ |
| 321 | scanAll(scheduled) { |
| 322 | /** @type {string[]?} */ |
| 323 | let newScheduled = null; |
| 324 | const usedByKey = this.usedByKey_; |
| 325 | if (usedByKey) { |
| 326 | usedByKey.forEach((used) => { |
| 327 | const {prop} = used; |
| 328 | const {key} = prop; |
| 329 | // Only ping unhandled props. |
| 330 | if ((newScheduled || scheduled).indexOf(key) == -1) { |
| 331 | this.ping(prop, true); |
| 332 | |
| 333 | if (this.contextNode_.children && this.has(prop)) { |
| 334 | if (!newScheduled) { |
| 335 | newScheduled = scheduled.slice(0); |
| 336 | } |
| 337 | // Stop the deepscan for this value. It will be propagated |
| 338 | // by the responsible node. |
| 339 | newScheduled.push(key); |
| 340 | } |
| 341 | } |
| 342 | }); |
| 343 | } |
| 344 | return newScheduled || scheduled; |
| 345 | } |
| 346 | |
| 347 | /** |
| 348 | * @return {boolean} |