From 3ff9bd3d26cdd69094345a375ca63a3bb5a4d2c4 Mon Sep 17 00:00:00 2001 From: goodjun Date: Tue, 21 Mar 2023 18:58:27 +0800 Subject: [PATCH] docs: update useFavicon docs (#2132) * docs: update useFavicon docs * docs: update and fix typo --------- Co-authored-by: liuyib <1656081615@qq.com> --- packages/hooks/src/useFavicon/index.en-US.md | 10 ++++++++++ packages/hooks/src/useFavicon/index.zh-CN.md | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/packages/hooks/src/useFavicon/index.en-US.md b/packages/hooks/src/useFavicon/index.en-US.md index afc8bf62c3..29a4880a2f 100644 --- a/packages/hooks/src/useFavicon/index.en-US.md +++ b/packages/hooks/src/useFavicon/index.en-US.md @@ -24,3 +24,13 @@ useFavicon(href: string); | Params | Description | Type | Default | | ------ | -------------------------------------------- | -------- | ------- | | href | favicon URL, support `svg`/`png`/`ico`/`gif` | `string` | - | + +## FAQ + +### It doesn't work in Safari? + +Safari cannot set the favicon dynamically. + +> Apple intentionally do not want the ability to script favicons. See https://bugs.webkit.org/show_bug.cgi?id=95979#c2 + +Related issues: [#2126](https://github.com/alibaba/hooks/issues/2126) diff --git a/packages/hooks/src/useFavicon/index.zh-CN.md b/packages/hooks/src/useFavicon/index.zh-CN.md index 3be6e6a903..43d18963e5 100644 --- a/packages/hooks/src/useFavicon/index.zh-CN.md +++ b/packages/hooks/src/useFavicon/index.zh-CN.md @@ -24,3 +24,13 @@ useFavicon(href: string); | 参数 | 说明 | 类型 | 默认值 | | ---- | ----------------------------------------------------- | -------- | ------ | | href | favicon 地址, 支持 `svg`/`png`/`ico`/`gif` 后缀的图片 | `string` | - | + +## FAQ + +### 在 Safari 中不工作? + +Safari 无法动态设置 favicon。 + +> Apple intentionally do not want the ability to script favicons. See https://bugs.webkit.org/show_bug.cgi?id=95979#c2 + +相关 issue:[#2126](https://github.com/alibaba/hooks/issues/2126)