How can we add the Visibility API to Wix?

It lets us access Document.hidden. How can I add such an API to Wix? Or is it already present?

You cannot access document or any other DOM element using Corvid