0

In Firefox, I would use the page-worker component, that allows for arbitrary many hidden pages which can be accessed by content scripts.

What is the equivalent in Chrome?

It seems there is only one background page available and loading pages inside iframes there won't work for all the pages.

Any ideas?

Jochen Bedersdorfer
  • 4,093
  • 24
  • 26

1 Answers1

2

Unfortunately theres nothing like that yet, I say yet because they are working on something like hidden tabs (but I cant find the link at the moment).
Failing that you could xhr the source for the page, sanitize it a bit and then put it in a div to scrape, there's some excellent code on doing this here....
https://stackoverflow.com/a/7539198/189093

Update
As Rob W points out in the comments, your better of using....
https://stackoverflow.com/a/9251106/938089?javascript-domparser-access-innerhtml-and-other-properties

Community
  • 1
  • 1
PAEz
  • 8,366
  • 2
  • 34
  • 27
  • +1 In Chrome, I recommend [`DOMParser` using `text/html`](http://stackoverflow.com/a/9251106/938089?javascript-domparser-access-innerhtml-and-other-properties) instead of my other method. That doesn't require sanitising, because the DOM is parsed, but not rendered. – Rob W Apr 09 '12 at 09:43
  • @RobW Thank you, thank you! It was the mime type of `text/html` that didnt work with Chrome, that added bit of code makes it work! You've made my day :P – PAEz Apr 09 '12 at 10:34