* Run all pending effects. Called once per microtask batch. * Effects that re-trigger during this run are queued for the next batch.
()
| 3321 | * Effects that re-trigger during this run are queued for the next batch. |
| 3322 | */ |
| 3323 | _runPendingEffects() { |
| 3324 | this._isRunScheduled = false; |
| 3325 | var effects = Array.from(this._pendingEffects); |
| 3326 | this._pendingEffects.clear(); |
| 3327 | for (var i = 0; i < effects.length; i++) { |
| 3328 | var effect = effects[i]; |
| 3329 | if (effect._isStopped) continue; |
| 3330 | if (effect.element && !effect.element.isConnected) { |
| 3331 | effect.stop(); |
| 3332 | continue; |
| 3333 | } |
| 3334 | effect.run(); |
| 3335 | } |
| 3336 | if (this._pendingEffects.size === 0) { |
| 3337 | for (var i = 0; i < effects.length; i++) { |
| 3338 | if (!effects[i]._isStopped) effects[i].resetTriggerCount(); |
| 3339 | } |
| 3340 | } |
| 3341 | } |
| 3342 | /** |
| 3343 | * Subscribe an effect to all its current deps. |
| 3344 | * Symbols go into per-element/global subscription maps. |
no test coverage detected