title: Google Chrome Extension - waiting until page loads
body: <p>In my Google Chrome Extension, I have a <a href="http://code.google.com/chrome/extensions/content_scripts.html" rel="noreferrer">Content Script</a> (content.js) and a <a href="http://code.google.com/chrome/extensions/background_pages.html" rel="noreferrer">Background Page</a> (background.html). I have context.js checking for a keyword that appears on the page. However, I want to wait until the page is fully loaded until I search the page, because the keyword may occur at the bottom of the page. </p>
  
  <p>See <a href="http://code.google.com/chrome/extensions/samples.html" rel="noreferrer">Page action by content</a> sandwich example (<a href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_content/" rel="noreferrer">files</a>), this is basically what I am doing. If you load the extension you'll see the extension only works when the word "sandwich" appears at the top of the page.</p>