Adds a widget destroy method (#9097)

* feat: widget destroy method

* fix: revert to original implementation

* Invoke onDestroy method during widget destruction

Add custom cleanup method call in destroy process

* Update documentation for destroy method options

* Fix formatting in widget.js comments

* Refactor destroyChildren method for formatting

* Fix indentation in findNextSiblingDomNode method

* docs: added changenote

* chore: lint

* fix: remove deprecated utils method
This commit is contained in:
Saq Imtiaz
2026-02-05 17:03:40 +01:00
committed by GitHub
parent 33b2f514fb
commit d376ada241
2 changed files with 67 additions and 15 deletions
@@ -0,0 +1,13 @@
change-category: internal
change-type: enhancement
created: 20260120153052332
description: Adds a destroy method for widgets allowing for clean up of resources when a widget is removed.
github-contributors: saqimtiaz
github-links: https://github.com/TiddlyWiki/TiddlyWiki5/pull/9097
modified: 20260125212701672
release: 5.4.0
tags: $:/tags/ChangeNote
title: $:/changenotes/5.4.0/#9097
type: text/vnd.tiddlywiki
Adds a destroy method for widgets allowing for clean up of resources when a widget is removed.