You can’t use callee in javascript strict mode. Doing so results in:
Uncaught TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them.
and stops execution of the entire library.
If a developer uses a singleton class in a non-singleton way it’s not the end of the world.
If this really requires singletons, maybe one of these patterns as discussed would be a better solution.
You can’t use callee in javascript strict mode. Doing so results in:
Uncaught TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them.
and stops execution of the entire library.
If a developer uses a singleton class in a non-singleton way it’s not the end of the world.
If this really requires singletons, maybe one of these patterns as discussed would be a better solution.
http://robdodson.me/javascript-design-patterns-singleton/