title: How to open a new tab and close it almost immediately after running a script on the new tab
body: <p>I am fairly new to Javascript and programming and have been trying to make a chrome extension to monitor the price of any product the user views on a particular site and notifies the user when there is a change in price. I'm scraping the DOM to get the price.
  I want the extension to access the page every 5 hours and scrape the DOM and update the price.</p>
  
  <p>The two methods I thought would help me do this is either use <a href="http://phantomjs.org" rel="nofollow">PhantomJs</a> or have my extension open a new tab with the saved URL, run the script to scrape and close it immediately.</p>
  
  <p><strong>How would one go about doing it the new tab way or the Phantom way?</strong> </p>
  
  <p>I have tried window.open(url, '_blank') and setting a timeout but does not help. 
  Tried using an iframe but not being able to access the document in the frame.</p>
  
  <p>Please excuse me if I have not complied with the guidelines to asking a question. This is my first.</p>