Skip to content

Commit 2f55be8

Browse files
committed
docs(dom/document): fixed #274
1 parent eefffcf commit 2f55be8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

docs/dom/document.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,10 @@ document.scrollingElement.scrollTop = 0;
6969
`document.fullscreenElement`属性返回当前以全屏状态展示的 DOM 元素。如果不是全屏状态,该属性返回`null`
7070

7171
```javascript
72-
if (document.fullscreenElement.nodeName == 'VIDEO') {
72+
if (
73+
document.fullscreenElement &&
74+
document.fullscreenElement.nodeName == 'VIDEO'
75+
) {
7376
console.log('全屏播放视频');
7477
}
7578
```

0 commit comments

Comments
 (0)