Closed dead-claudia closed 5 years ago
Engines already can opt to omit all source from any or all functions, unrelated to this proposal - there’s an implementation hook.
Where? If so, I can close this issue. (I assume you're referring to somewhere in the spec.)
Okay, then this is probably moot then.
I know of a couple points where this could integrate with:
toString
. Should this provide some common infrastructure for that to streamline the two? (Not proposing these two should be merged, just informed by one another.)Function.prototype.toString
as a deliberate spec violation, and JerryScript, which supports ES5 only, does similar.I feel these two scenarios should probably be considered to some extent and maybe appropriate hooks made. The infrastructure to do this already generally exists with this proposal, so I'm just suggesting that in addition to allowing source-controlled function hiding, it should also lay a common groundwork for other reasons you shouldn't/can't have function sources exposed.