Since we use `window.document` here it will only include events from the nested documents (ones form iframes  in the hidden window). Which will cover page-worker case. Which is not ideal, would be better to solve actual problem, but since this covers
hidden-page case, it's ok for this. Although please submit another bug to cover all docs and put a comment here pointing to it,
to be clear that it's limited to add-on/window docs only.