0

Is there a way to get the text content of a <div> from the content page from within a chrome extension?

The scenario is:

From a certain webpage www.****.com/page.html, it has a code of:

<div id="pageDiv">
TEXT FROM DIV
</div>

When a user opens the chrome extension from the chrome bar (opens popup.html), it must get the value of the pageDiv from the content page and insert the text to the chrome extension's popup.html.

Makyen
  • 31,849
  • 12
  • 86
  • 121
weyhei
  • 479
  • 2
  • 7
  • 26
  • 1
    The short answer to this is "Yes". If you want an implementation of something similar, you can see [this answer to another question](http://stackoverflow.com/a/39319198/3773011). – Makyen Sep 17 '16 at 01:34
  • 1
    Possible duplicate of [Extract the whole text contained in webpage using Chrome extension](http://stackoverflow.com/questions/39317541/extract-the-whole-text-contained-in-webpage-using-chrome-extension) – Makyen Sep 17 '16 at 01:35

0 Answers0