Skip to content

WICKET-7187 type for JavaScript content item, and new JavaScript import map item#1498

Draft
jstuyts wants to merge 2 commits into
apache:masterfrom
jstuyts:festure/WICKET-7187-javascript-header-item-features
Draft

WICKET-7187 type for JavaScript content item, and new JavaScript import map item#1498
jstuyts wants to merge 2 commits into
apache:masterfrom
jstuyts:festure/WICKET-7187-javascript-header-item-features

Conversation

@jstuyts

@jstuyts jstuyts commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Added type to JavaScript content header items, and added a JavaScript import map header item.

The first attempt was to make a base class for AbstractJavaScriptReferenceHeaderItem and JavaScriptContentHeaderItem, and move the type to there. But setType(...) in the former returns AbstractJavaScriptReferenceHeaderItem. Moving the type information up the hierarchy would break backward compatibility. The (simple) code for managing the type has simply been copied now.

JavaScriptReferenceType should be called JavaScriptType now, but that would also break backward compatibility. This has been documented.

If the new features are not used, almost everything works as before. The only change to current behavior is that equals(...) and hashCode(...) of JavaScriptContentHeaderItem now also use the type.

jstuyts added 2 commits June 21, 2026 16:55
…a JavaScript import map header item.

The first attempt was to make a base class for `AbstractJavaScriptReferenceHeaderItem` and `JavaScriptContentHeaderItem`, and move the type to there. But `setType(...)` in the former returns `AbstractJavaScriptReferenceHeaderItem`. Moving the type information up the hierarchy would break backward compatibility. The (simple) code for managing the type has simply been copied now.

`JavaScriptReferenceType` should be called `JavaScriptType` now, but that would also break backward compatibility. This has been documented.

If the new features are not used, almost everything works as before. The only change to current behavior is that `equals(...)` and `hashCode(...)` of `JavaScriptContentHeaderItem` now also use the type.
@jstuyts jstuyts marked this pull request as draft June 21, 2026 19:46
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.

1 participant