Do delegates feel natural in JavaScript? class Installer { constructor(delegate) { this.delegate = delegate } install() { if (this.delegate) { const event = new Event() this.delegate?.beforeInstall(event) if (event.defaultPrevented) return } } }
0 reposts0 likes