Skip to content

Conversation

@yehuya
Copy link

@yehuya yehuya commented Jan 21, 2025

Summary

In some cases, window.Element is undefined. As a result, importing the DOMPurify package causes it to crash immediately due to the const ElementPrototype = Element.prototype; expression in the DOMPurify initialization.

Background & Context

This fix addresses the error that occurs when importing DOMPurify in environments where window.Element is undefined.

Tasks

  • Validate that I didn't break anything.

Dependencies

  • Resolved dependency
  • Open dependency

@cure53
Copy link
Owner

cure53 commented Jan 22, 2025

Oh, this looks great, thank you. This is ready to merge, no?

@cure53 cure53 merged commit 72760ca into cure53:main Jan 22, 2025
8 checks passed
@yehuya yehuya deleted the fixMissingWindowElement branch January 22, 2025 11:33
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