If no feature detection is possible, I agree that this is a bit of a bad spot to be in. In those cases, running the simplest user-agent based test, something like
const isFirefox = /firefox/i.test(navigator.userAgent);
is probably the best way here.
Relying on Firefox-only properties to detect the browser itself might look like an easier solution, but unfortunately it has the potential of breaking down the line - or it can force the browser developers to keep a non-standard property around just for compatibility reasons, which also isn't great.
To detect Firefox, Print.js use InstallTrigger but it's deprecated.
Here https://bugzilla.mozilla.org/show_bug.cgi?id=1754441#c30 Dennis Schubert said