You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.
If you have a class, which has a constructor, but nothing on the prototype, then the FactoryProvider will be used instead of the ClassProvider. This causes this to be undefined in the constructor of the class during instantiation, which usually results in exceptions.
The name property of function is non-standard and not implemented in any version of IE up to now (11). However, you can polyfill name. See this stack overflow discussion for a simple implementation which appears to fix these issues, at least in my tests: http://stackoverflow.com/questions/6903762/function-name-not-supported-in-ie
Providing the polyfill inline here for convenience:
// Fix Function#name on browsers that do not support it (IE):if(!(functionf(){}).name){Object.defineProperty(Function.prototype,'name',{get: function(){varname=this.toString().match(/^\s*function\s*(\S*)\s*\(/)[1];// For better performance only parse once, and then cache the// result through a new accessor for repeated access.Object.defineProperty(this,'name',{value: name});returnname;}});}
The text was updated successfully, but these errors were encountered:
This is an IE-only bug.
If you have a class, which has a constructor, but nothing on the prototype, then the FactoryProvider will be used instead of the ClassProvider. This causes
this
to be undefined in the constructor of the class during instantiation, which usually results in exceptions.The
name
property of function is non-standard and not implemented in any version of IE up to now (11). However, you can polyfill name. See this stack overflow discussion for a simple implementation which appears to fix these issues, at least in my tests: http://stackoverflow.com/questions/6903762/function-name-not-supported-in-ieProviding the polyfill inline here for convenience:
The text was updated successfully, but these errors were encountered: