(Before starting, I'd like to apologize for how broad the title of this idea looks, but I didn't find anything more straightforward).
Firefox, like most popular browsers, implement access control over some functionalities, such as camera, microphone, screen, notifications... for evident security reasons and/or convenience.
Although this is some great effort, I still do not think we users have enough control over what's happening when loading a webpage and the behavior of its scripts. I'd suggest some more eventual permission-based restrictions, suggestions that could hopefully be extended later:
Those restrictions could perhaps not be default and left to the users to apply, but I seriously think they, if possible, have to be integrated, and I honestly wonder why this haven't been the case after so long