setDefaultFavicon static method

void setDefaultFavicon()

Sets the favicon being used to the default style.

Implementation

static void setDefaultFavicon() {
  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/alert/', 'icons/')
            .toJS,
      );
    }
  }
}