Hi there! I would like to attach event handler in content script and request permissions inside it, but it seems permissions API isn’t defined for content scripts. Bug? Are there any other way I can achieve my goal in Firefox?
Sending a message to the background script should retain the annotation that lets you request permissions and other things that require “user interaction”.
Thank you for response. Can you please provide more details of how can I “retain the annotation” ? In my experiments attempt to request from background script ends with Error: permissions.request may only be called from a user input handler
@erosman I have created test add-on that implements your approach. Unfortunately, I see Error: permissions.request may only be called from a user input handler in add-on debug console when click on “click me to request permissions” button