title: Making functions autorun in MeteorJs
body: <p>I am using the page visibility api in my app. I need the value of <code>document.hidden</code> to update reactively.</p>
  
  <p>I have a template that when rendered I check if the page is visible and if it is then I set a document property to <code>false</code>. Now if the page isn't visible I do want to set the property to false when it does come into view. How should I do this? I tried the template autorun block but it didn't work.</p>