Manifest v3: "action" property in manifest isn't supported yet?

957 views
Skip to first unread message

Z Yin

unread,
Dec 14, 2019, 11:01:52 AM12/14/19
to Chromium Extensions
So I'm testing mv3 in Chrome Version 81.0.3996.0 canary, and changed browser_action to to action in manifest.json, and it's not working. 

I also tried changing chrome.browserAction to chrome.action in service worker, and it also doesn't work.

I'm totally ok if it's not ready yet, but I just want to confirm I'm not doing it wrong.

manifest.json:

{
 
"name": "3",
 
"version": "0.0.1",
 
"description": "MV3",
 
"manifest_version": 3,
 
"action": {}, // this doesn't work, but "browser_action" works
 
"permissions": [],
 
"background": {
   
"service_worker": "sw.js"
 
}
}

sw.js:

// this doesn't work, but chrome.browserAction works:
chrome
.action.onClicked.addListener(() => {
  chrome
.tabs.create({ url: "index.html" });
});


index.html:

<html>
 
<h1>MV3</h1>
</html>



screenshot.png



Simeon Vincent

unread,
Dec 18, 2019, 10:19:51 PM12/18/19
to Chromium Extensions
We chatted in office hours, but yep, it doesn't currently work. I've been meaning to update the migration guide to make that clear. Sorry about the confusion.

Cheers,

Simeon - @dotproto
Extensions Developer Advocate
Reply all
Reply to author
Forward
0 new messages