Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(widgets) onRemove can be optional #9308

Merged
merged 3 commits into from
Dec 22, 2024

Conversation

chrisgervang
Copy link
Collaborator

For #9056

Background

The WidgetManager already removes the DOM element created by most widgets. Is it necessary to require widget authors to implement onRemove?

if (widget._element) {
widget._element.remove();
}
widget._element = undefined;

Change List

  • Makes onRemove optional in the Widget interface.

@coveralls
Copy link

coveralls commented Dec 18, 2024

Coverage Status

coverage: 91.703%. remained the same
when pulling 38acbdb on chr/widget-optional-onremove
into 7a23912 on master.

@chrisgervang chrisgervang mentioned this pull request Dec 19, 2024
36 tasks
@chrisgervang chrisgervang merged commit 1039be7 into master Dec 22, 2024
4 checks passed
@chrisgervang chrisgervang deleted the chr/widget-optional-onremove branch December 23, 2024 06:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants