Last active
August 23, 2018 13:20
-
-
Save hosseinzoda/c1910a6b5698e0173e4a1eb8ef40f9d0 to your computer and use it in GitHub Desktop.
IE dom issues & fixes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// There's an issue with IE, instead of Node having prototype contains, | |
// HTMLElement has it. Simple fix is to set the function for Node too | |
if (typeof Node != 'undefined' && typeof HTMLElement != 'undefined' && | |
!Node.prototype.contains && HTMLElement.prototype.contains) { | |
Node.prototype.contains = HTMLElement.prototype.contains; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment