New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

el-fullscreen

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

el-fullscreen

The usage of the JavaScript Fullscreen API for cross-browser

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

fullscreen

The usage of the JavaScript Fullscreen API for cross-browser

用于跨浏览器使用JavaScript Fullscreen API

使用

npm

npm i el-fullscreen -S
import fullscreen from 'el-fullscreen'

script

挂载在全局变量 fullscreen 下

<script src="dist/fullscreen.min.js"></script>
window.fullscreen

Support

Supported browsers

API

supported()

判断浏览器是否支持全屏

params: 无

return: bool , true表支持,false表不支持

fullscreen.supported()
// true or false

element()

当前处于全屏状态的dom

params: 无

return: object , 全屏状态的dom

fullscreen.element()

launch(el)

进入全屏

params:

  • el:全屏操作的dom,默认为document.documentElement

return: undefined

fullscreen.launch()

exit()

退出全屏

params:无

return: undefined

fullscreen.exit()

onChange()

全屏状态改变事件

params:

  • handleChange:事件回调

return: undefined

fullscreen.onChange()

Keywords

fullscreen

FAQs

Package last updated on 08 Dec 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts