dynamically modify the tab icon not work in the browser of Apple device.

Copper Contributor
We want to dynamically modify the tab icon in the extension of SharePoint online. The code is as follows.

This function only doesn't work in the browser of Apple device. I should make this function work in the browser of Apple device.

We passed the static web page test, and this part of the code works in the Apple device. However, dynamic modification of SharePoint online cannot take effect.

 

Code: 

 

var link = document.querySelector("link[rel*='icon']") as HTMLElement || document.createElement('link') as HTMLElement;
      link.setAttribute('type', 'image/x-icon');
      link.setAttribute('rel', 'shortcut icon');
      link.setAttribute('href', url);
      document.getElementsByTagName('head')[0].appendChild(link);

 

0 Replies