Fix exported DOM Element instanceof checks - #2243
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@## master #2243 +/- ##
=========================================
Coverage 100.00% 100.00% =========================================
Files 4 4 Lines 127 136 +9 Branches 48 52 +4 =========================================
+ Hits 127 136 +9 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
55928ae to
b9e8a92Comparesjh9714
commented
May 16, 2026
Thanks, I took another pass at this. I moved the normalization into I also added regression coverage for DOM node references exposed in Local checks run:
The new GitHub Actions runs for commit |
Uh oh!
There was an error while loading. Please reload this page.
remarkablemark
left a comment
There was a problem hiding this comment.
Thanks for the update! Let me know if you see this GitHub Action workflow run.
b9e8a92 to
fe88b54Comparesjh9714
commented
May 16, 2026
I can see the workflow run now. The |
@jinhyuk9714 I think the error might be due to something else. I'll go ahead and merge this PR Update: the error is unrelated to your changes and is coming from arethetypeswrong/arethetypeswrong.github.io#258 |
Uh oh!
There was an error while loading. Please reload this page.
Summary
Fixes
instanceofchecks for DOM elements passed to thereplacecallback.What changed
Elementinstances inreplace.Elementclass exported by this package.Why
html-dom-parsercan create DOM element instances whose class reference differs from theElementclass exported byhtml-react-parser. That breaks documented checks likedomNode instanceof Element.Testing
npm run prepublishOnlynpm run test:esmnpm run test:browserFixes#2198