We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug
Calling Node.contains with undefined argument raises a TypeError exception.
"TypeError": Cannot read properties of undefined (reading 'Symbol(parentNode)')
To Reproduce
Run the following code snippet
const happyDom = require("happy-dom"); const happyWindow = new happyDom.Window(); const parentElement = happyWindow.document.createElement('div'); const childElement = happyWindow.document.createElement('div'); parentElement.appendChild(childElement); let nonInitializedElement; parentElement.contains(nonInitializedElement);
Expected behavior
The same behavior that happens in the browser. Node.contains should return false when it's called with undefined
undefined
The text was updated successfully, but these errors were encountered:
fix: [capricorn86#1285] Prevent contains from accessing properties of…
5051cf0
… undefined arguments
36ce7ed
Merge pull request #1286 from rofly/master
39d8c45
fix: [#1285] Prevent contains from accessing properties of undefined args
No branches or pull requests
Describe the bug
Calling Node.contains with undefined argument raises a TypeError exception.
"TypeError": Cannot read properties of undefined (reading 'Symbol(parentNode)')
To Reproduce
Run the following code snippet
Expected behavior
The same behavior that happens in the browser.
Node.contains should return false when it's called with
undefined
The text was updated successfully, but these errors were encountered: