-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
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
TypeError: Cannot read property "prototype" from undefined #44
Comments
Hi @binarykitchen, thanks for your feedback! I'm a bit confused, this seems to be an angular.js issue, Could you provide a playground to test this behavior? |
i am afraid, i cannot reduce this to a small test case. things in the angular code seem to be too bloated. but i think we should add a check whether |
Hi again @binarykitchen , I've added $.contains method to jqLite, maybe this can be helpful for you. According to angular issue #10259, this behavior can be escaped with following snippet: if (typeof SVGElement.prototype.contains == 'undefined') {
SVGElement.prototype.contains = HTMLDivElement.prototype.contains;
} In general, I prefer to avoid add hacks and polyfills to jqLite in order to avoid mistake libraries that detects browser support (like modernizr) |
@jgermade do i need to replace the buggy code var jqLiteContains = window.Node.prototype.contains || /** @this */ function(arg) { with if (typeof SVGElement.prototype.contains == 'undefined') { or do it need to place it somewhere |
seeing this error thrown in my app around these lines
happens with this user agent
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727)
The text was updated successfully, but these errors were encountered: