Pass document to `selection` and `deselection` events' data.