Skip to content

Implement script tag loading from newly added child components#802

Merged
adamghill merged 4 commits intodjango-commons:mainfrom
JohananOppongAmoateng:load-script-tags-from-child-comp
Feb 27, 2026
Merged

Implement script tag loading from newly added child components#802
adamghill merged 4 commits intodjango-commons:mainfrom
JohananOppongAmoateng:load-script-tags-from-child-comp

Conversation

@JohananOppongAmoateng
Copy link
Contributor

@JohananOppongAmoateng JohananOppongAmoateng commented Feb 22, 2026

When a child component is conditionally rendered and first appears in the DOM after a parent re-render, morphdom's diffing process inserts elements using techniques equivalent to innerHTML. Browsers do not execute <script> tags inserted this way they must be freshly-created via document.createElement("script") to execute. Closes #257

unicorn:dirty targeting support Closes #524

@github-actions
Copy link
Contributor

Coverage report

This PR does not seem to contain any modification to coverable code.

@adamghill adamghill merged commit af331a3 into django-commons:main Feb 27, 2026
1 check passed
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.

Better way to link dirty attribute with other HTML elements Load script tags from Child Component

2 participants