The first one works as expected:
var f1 = Object.getOwnPropertyNames(Function)
.forEach(function(element) {
console.log (typeof Function[element]);
}); // --> number, string, function
The second one outputs an error message:
var f2 = Object.getOwnPropertyNames(Function.prototype)
.forEach(function(element) {
console.log (typeof Function.prototype[element]);
});
TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode
How can I bypass that?
Edit: Current Workaround
var forbiddenOnStrictMode = ['caller', 'callee', 'arguments'];
var f2 = Object.getOwnPropertyNames(Function.prototype)
.forEach(function(element) {
if (forbiddenOnStrictMode.indexOf(element) == -1)
console.log (typeof Function.prototype[element]);
});
Is it possible to say node-compiler ignore the strict mode for a while?