title: Searching and highlighting text on current page for a Chrome Extension
body: <p>How should I connect my pages to search and highlight text on current tab?</p>
  <p>Currently I have:</p>
  <ul>
  <li>manifest.json <em>does defining content/backgr/event page do significant things,auto inject code etc?</em></li>
  <li>popup.html <em>essentially a shell for the search input which is used by search.js</em></li>
  <li>search.js <em>should this be in background/event/content/popup.html page?</em></li>
  </ul>
  <p><strong>What I still don't understand after reading:</strong></p>
  <p>What is a content page vs. background/event page?</p>
  <p>I know one is constantly running vs injected, but that's as much as I got from the chrome extension manual, I still don't quite understand if the content script/page is seperate from the popup.html for example and what the difference between a script in the popup.html vs content page/script is.</p>
  <p><strong>What I know:</strong></p>
  <p>I know how to search for text on a page, and replace it or change its style etc. using JS.</p>
  <p>I need to read up on the messaging API for Chrome Extensions.</p>
  <p>I know I need to know how to use the messaging API, is it going to be required for page search and highlighting?</p>
  <h3>Summary:</h3>
  <p>I don't need a walk through or full answer, just a little help visualizing how Chrome extensions work, or at minimum how I should set mine up in relation to page interaction IE:</p>
  <p>search.js content page injected &gt;&gt;&gt;&gt;&gt; popup.html</p>
  <p>and maybe a short bit about how injection works in chrome extensions(IE, do I only need to specify that it is content page in manifest.json to have it injected or is there more work to it)/expected behavior?</p>
  <p>Apologies for the jumbled thoughts/question/possibly missing the things relevant to my questions while reading the manual.</p>