I have an existing Chrome Extension with Manifest Version V2. I'm trying to copy page url when user clicks on the extensions icon. I was relying on execCommand('copy') function to copy links before. With Manifest V3, as windows object is no longer accessible from service worker. I'm trying to migrate and use navigator.clipboard.writeText(url). When I trigger the event to copy using clipboard, I hit navigator.clipboard undefined exception.
I'm triggering the events on "https" links, which is considered a secure context.
Does anyone know why clipboard is undefined from service worker even in context of https?