Here we are adding a `handler` per each `<a>` tag. Why dont we use the `click` listener in the container `Thread.view` https://github.com/mozilla-b2g/gaia/blob/master/apps/sms/js/sms.js#L1440 and we handle this there? Because we could know the target  (if it's a `phone-link`, or a `browser-link` and other possibilities in the future), and use `data` params for handling it (in your case for executing `ContactDialog.showContactDialog(event.target.dataset.phoneNumber)` ).