Questions tagged [google-chrome-extension]

Extension development for the Google Chrome web browser. You write them using web technologies such as HTML, JavaScript, and CSS.

This tag is dedicated to questions about extension development for the Google Chrome web browser.

The Chrome extension API is documented here.

Absolute beginners should start here.

A good tutorial video by official Google Developers is available on YouTube

Overview of extension architecture can be read here.

The What's New page lists some of the recent changes to the extension APIs, while the Official Chrome Releases Blog announces new releases of Chrome and Chrome OS. For general updates on the browser, visit the Official Chrome Blog.

Troubleshooting

Before posting a question, make sure that you've read the API documentation. If some methods are not documented, it may be because they are deprecated.

If necessary, include relevant parts of your manifest.json file in the question.

A common source of errors is the misunderstanding of manifest version 2 and Content Security policy (CSP). Read the documentation for the CSP to see if it answers to your question.

For anything not related to development of Chrome extensions, such as issues with publishing in the Chrome Web Store, browse the Chromium-extensions Google group (now read-only). Extension authors with questions about the Chrome Web Store can contact the cws-developer-support team at https://support.google.com/chrome_webstore/contact/developer_support/.

Migration to Manifest Version 3

Manifest version 3 is now in support since chrome 88, and will be allowed on the chrome webstore on January 2021. It is recommended to read how to migrate from v2 to v3 and an overview of the new features are found here.

29271 questions
8
votes
1 answer

How to connect chrome web extension with localhost server?

I have a google chrome web extension that needs to communicate with a Qt desktop application - but how? There is chrome's native messaging, but as I want to support multiple browsers/OS, this would be too much effort because it is only for…
user2366975
  • 4,350
  • 9
  • 47
  • 87
8
votes
3 answers

XMLHttpRequest.onreadystatechange vs. addEventListener

Reading up on XMLHttpRequest for use in a Google Chrome Extension, and I've run into a question. MDN specifies using XMLHttpRequest.addEventListener, while Google uses XMLHttpRequest.onreadystatechange in their example. Is there a preference between…
Jack Steam
  • 4,500
  • 1
  • 24
  • 39
8
votes
2 answers

How to get selected text in chrome extension development?

I'm developing a chrome extension which involves getting selected text of the current tab. Here is the html file that I use: