Frontmatter
| id | 8802 |
| title | Extend async destruction handling to VdomLifecycle and Component |
| state | Closed |
| labels | enhancementaiarchitecturecore |
| assignees | tobiu |
| createdAt | Jan 19, 2026, 11:29 AM |
| updatedAt | Jan 19, 2026, 11:46 AM |
| githubUrl | https://github.com/neomjs/neo/issues/8802 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Jan 19, 2026, 11:45 AM |
Extend async destruction handling to VdomLifecycle and Component

tobiu
Jan 19, 2026, 11:44 AM
Input from Gemini 3 Pro:
✦ I have extended the async destruction handling pattern to
VdomLifecycleandComponent.Changes:
src/core/Base.mjs:
- Renamed
#timeoutsto#asyncRejects.- Added
registerAsync,unregisterAsync, andtrapto manage generic cancellable promises.src/mixin/VdomLifecycle.mjs:
- Updated
promiseUpdate()to use the new registration system.src/component/Base.mjs:
- Updated
getDomRect()andmeasure()to usethis.trap().- Tests:
- Added
test/playwright/unit/core/AsyncDestruction.spec.mjsto verify the new behavior.Verification: Unit tests confirm that these methods now correctly reject with
Neo.isDestroyedif the component is destroyed during execution.
tobiu closed this issue on Jan 19, 2026, 11:45 AM
tobiu assigned to @tobiu on Jan 19, 2026, 11:46 AM
Extend the
Neo.isDestroyedrejection pattern introduced in #8801.Plan:
core.Base:#timeoutsto#asyncRejects.registerAsync(id, reject)andunregisterAsync(id).trap(promise)helper to wrap external promises (like remote calls).timeoutto use new methods.mixin.VdomLifecycle:promiseUpdateto register its reject function.component.Base:getDomRectto usethis.trap().measureto usethis.trap().This ensures
await component.promiseUpdate()andawait component.getDomRect()correctly throwNeo.isDestroyedif the component is destroyed during the operation.