But I think you would still need a separated overlay <div> behind the modals' content, as you would apply @onclick.self="myHandler" to that element.
Which in practice is unneeded as the modal content is a sibling to the overlay and the click event won't bubble up to it.
the self modifier is useful when you want to make sure a click happened on the target element itself and not in one of its children Which is not the case on @sinnbeck 's suggestion that is also the most common model/overlay implementation.