@@ -39,14 +39,7 @@ export default class VectorBasePlatform extends BasePlatform {
3939 constructor ( ) {
4040 super ( ) ;
4141
42- // The 'animations' are really low framerate and look terrible.
43- // Also it re-starts the animation every time you set the badge,
44- // and we set the state each time, even if the value hasn't changed,
45- // so we'd need to fix that if enabling the animation.
46- this . favicon = new Favico ( { animation : 'none' } ) ;
4742 this . showUpdateCheck = false ;
48- this . _updateFavicon ( ) ;
49-
5043 this . startUpdateCheck = this . startUpdateCheck . bind ( this ) ;
5144 this . stopUpdateCheck = this . stopUpdateCheck . bind ( this ) ;
5245 }
@@ -55,6 +48,24 @@ export default class VectorBasePlatform extends BasePlatform {
5548 return 'Vector Base Platform' ; // no translation required: only used for analytics
5649 }
5750
51+ /**
52+ * Delay creating the `Favico` instance until first use (on the first notification) as
53+ * it uses canvas, which can trigger a permission prompt in Firefox's resist
54+ * fingerprinting mode.
55+ * See https://github.com/vector-im/riot-web/issues/9605.
56+ */
57+ get favicon ( ) {
58+ if ( this . _favicon ) {
59+ return this . _favicon ;
60+ }
61+ // The 'animations' are really low framerate and look terrible.
62+ // Also it re-starts the animation every time you set the badge,
63+ // and we set the state each time, even if the value hasn't changed,
64+ // so we'd need to fix that if enabling the animation.
65+ this . _favicon = new Favico ( { animation : 'none' } ) ;
66+ return this . _favicon ;
67+ }
68+
5869 _updateFavicon ( ) {
5970 try {
6071 // This needs to be in in a try block as it will throw
0 commit comments