You should use Node.contains, since it’s now standard and available in all browsers.
https://developer.mozilla.org/en-US/docs/Web/API/Node.contains
You should use Node.contains, since it’s now standard and available in all browsers.
https://developer.mozilla.org/en-US/docs/Web/API/Node.contains