We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eefffcf commit 2f55be8Copy full SHA for 2f55be8
docs/dom/document.md
@@ -69,7 +69,10 @@ document.scrollingElement.scrollTop = 0;
69
`document.fullscreenElement`属性返回当前以全屏状态展示的 DOM 元素。如果不是全屏状态,该属性返回`null`。
70
71
```javascript
72
-if (document.fullscreenElement.nodeName == 'VIDEO') {
+if (
73
+ document.fullscreenElement &&
74
+ document.fullscreenElement.nodeName == 'VIDEO'
75
+) {
76
console.log('全屏播放视频');
77
}
78
```
0 commit comments