mirror of
https://github.com/wangdoc/webapi-tutorial.git
synced 2025-12-20 00:59:54 +08:00
Merge pull request #17 from uphg/patch-2
Some checks failed
Web API tutorial CI / Generating pages (push) Has been cancelled
Some checks failed
Web API tutorial CI / Generating pages (push) Has been cancelled
docs: fix code block name in url.md
This commit is contained in:
@@ -175,7 +175,7 @@ function handleFiles(files) {
|
||||
|
||||
`URL()`构造函数解析非法网址时,会抛出错误,必须用`try...catch`代码块处理,这样终究不是非常方便。因此,URL 对象又引入了`URL.canParse()`方法,它返回一个布尔值,表示当前字符串是否为有效网址。
|
||||
|
||||
```javascipt
|
||||
```javascript
|
||||
URL.canParse(url)
|
||||
URL.canParse(url, base)
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user