events: re-use the same isTrusted getter
Creating a new function each time the property descriptor is set comes with performance overhead, since these functions have different identities, even if they contain the same code. Refs: https://twitter.com/tverwaes/status/1285496612618473472 PR-URL: https://github.com/nodejs/node/pull/34459 Reviewed-By:Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
Yongsheng Zhang <zyszys98@gmail.com>
parent
0aa3809b
Please register or sign in to comment