Print.js icon indicating copy to clipboard operation
Print.js copied to clipboard

InstallTrigger to detect Firefox is deprecated

Open BenTen opened this issue 1 year ago • 0 comments

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

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.

BenTen avatar Sep 01 '23 21:09 BenTen