Firefox: I want to provide a readonly pref

In debian I can add a line

pref( “browser.tabs.warnOnClose”, true, locked);

under

/etc/firefox-esr/firefox-esr.js

How would I do that in the flatpak installation of firefox?

and why not in about:config?

Because then it is not systemwide and I cannot make it readonly by the parameter “locked”.

My main concern is that It is too easy to switch it off accidentially. And then you have to always figure out where to reset it.

Firefox supports loading policies from an unmaintained extension. Sounds like what you’re looking for: