3 ms·
wouldnt it make more sense to overwrite toString? original_functions[Function.prototype.toString.toString()] = originalToStringStr;
by rasz 6y ago
wouldnt it make more sense to overwrite toString?
original_functions[Function.prototype.toString.toString()] = originalToStringStr;
- palant 6y agoYes, I’ve been doing this in the past elsewhere. Quite a messy affair, you have to overwrite `Function.prototype.toString` – meaning for all functions, no real way to do it for a single function. And then you have to be very careful because your overwritten functions runs in an environment you don’t control. Not sure whether implementing this in a completely tamper-proof way is possible.