While casually perusing through the application.js file in the express source code, I stumbled upon this interesting piece of code.
I'm curious about the origin of this '.on' event. Is it part of vanilla JavaScript or is it a feature provided by some library for handling events?
this.on('mount', function onmount(parent) {
// inherit trust proxy
if (this.settings[trustProxyDefaultSymbol] === true
&& typeof parent.settings['trust proxy fn'] === 'function') {
delete this.settings['trust proxy'];
delete this.settings['trust proxy fn'];
}