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

<link> elements are replaced without all of their attributes #242

Closed
tuespetre opened this issue Sep 12, 2024 · 1 comment · Fixed by #243
Closed

<link> elements are replaced without all of their attributes #242

tuespetre opened this issue Sep 12, 2024 · 1 comment · Fixed by #243

Comments

@tuespetre
Copy link
Contributor

tuespetre commented Sep 12, 2024

const link = document.createElement('link');

After this line, only the rel and href attributes are set. I'm sure there be dragons with using el.cloneNode() to copy all attribute values outright (event handlers, integrity, etc.), but these attributes should definitely be kept if present on the original element:

  • disabled
  • id
  • media
  • title
@jgerigmeyer
Copy link
Member

This is released in v0.3.0.

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 a pull request may close this issue.

2 participants