just to be clear: I don't think we should gather all visibilitychange use in only one file. I think there is no value in doing this, I like the objects to be self-contained as much as possible.

However let's move this feature into its own object.