re: Reading files in a Chrome Extension VIEW POST


I am new to Chrome Extensions and this is just the info I was looking for. However, I'm having trouble using the chrome.runtime.getUrl function. Whenever I try to use it in a content_script I get:

Uncaught TypeError: chrome.runtime.getUrl is not a function

Do you have an example that shows your complete manifest and script file where this is working?


Hey there!

It looks like you picked up a typo from me. The method is called chrome.runtime.getURL (url is capitalized!). Sorry about that!

If you want to look at an example have a look at my repo: A instance where I getURL is:

code of conduct - report abuse