[Solved] How may I get the element attributes (text, id, class and so on..) of the current tab, out of a mouse click, from a chrome extension?


In your content.js, write the following code-

$(window).click(function(event) {
    console.log("Click event: ", event);
});

Content scripts are files that run in the context of web pages. By using the standard Document Object Model (DOM), they are able to read details of the web pages the browser visits, make changes to them and pass information to their parent extension.

1

solved How may I get the element attributes (text, id, class and so on..) of the current tab, out of a mouse click, from a chrome extension?