I am currently developing a Chrome app that displays a Twitter search widget. I have encountered an issue where my app works perfectly with manifest version 1, utilizing "background_page" to display the main HTML page effectively. However, when switching to manifest version 2 and using the new "background" property, I am facing difficulties.
"description": "Live",
"version": "1",
"manifest_version": 1,
"app": {
"launch": {
"local_path": "index.html"
}
},
"background_page":"index.html",
"icons": {
"16": "icon16.png",
"48": "icon48.png",
"128": "icon128.png"
}
The code above functions properly, but the code below presents challenges:
"description": "Live",
"version": "1",
"manifest_version": 2,
"app": {
"launch": {
"local_path": "index.html"
}
},
"background": {
"pages": "index.html"
},
"icons": {
"16": "icon16.png",
"48": "icon48.png",
"128": "icon128.png"
}
When using manifest version 2, the page loads without loading the JavaScript. In contrast, manifest version 1 does load the script successfully.
Could you please guide me on how to load the JavaScript using manifest 2?
Your assistance would be greatly appreciated.