setAlertFavicon static method

void setAlertFavicon()

Sets the favicon being used to an alert style.

Implementation

static void setAlertFavicon() {
  final nodes = web.document.querySelectorAll("link[rel*='icon']");
  for (int i = 0; i < nodes.length; ++i) {
    final web.Node? e = nodes.item(i);

    if (e != null) {
      e.setProperty(
        'href'.toJS,
        e
            .getProperty('href'.toJS)
            ?.toString()
            .replaceFirst('icons/', 'icons/alert/')
            .toJS,
      );
    }
  }
}