I think the safeguard is a little nicer, but it also allows for syntax like:

```
btn.addEventListener('click', openDialog.bind(this, dialogID));
```

If you're not a fan of that, I can change this back and use another nested function if desired.