Skip to content

Conversation

@laymonage
Copy link
Contributor

@laymonage laymonage commented Jul 1, 2025

The changes in #971 seem to have lost the generic type parameter for the serializer option, enforcing the function's return type to be string instead of allowing it to be generic.

Per the README:

  • serializer (function, default el => el.innerHTML) controls how the content property returned by the parse() method is produced from the root DOM element. It may be useful to specify the serializer as the identity function (el => el) to obtain a DOM element instead of a string for content if you plan to process it further.

Copy link
Contributor

@gijsk gijsk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this makes sense to me.

@gijsk gijsk merged commit a9fa218 into mozilla:main Jul 1, 2025
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.

2 participants