Skip to content

Commit

Permalink
docs: update useFavicon docs (alibaba#2132)
Browse files Browse the repository at this point in the history
* docs: update useFavicon docs

* docs: update and fix typo

---------

Co-authored-by: liuyib <[email protected]>
  • Loading branch information
goodjun and liuyib authored Mar 21, 2023
1 parent 24245bd commit 3ff9bd3
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/hooks/src/useFavicon/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
10 changes: 10 additions & 0 deletions packages/hooks/src/useFavicon/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 3ff9bd3

Please sign in to comment.