fullscreen.js
简单的浏览器全屏库,与常见的主流浏览器兼容
演示版
安装
npm install fullscreen . js -- save
// or
< script src = './fullscreen.min.js' > < / script >
用法
import fullscreen from 'fullscreen.js' ;
// or
// var fullscreen = require('fullscreen.js');
fullscreen . request ( ) ;
原料药
fullscreen.is() :是否为全屏状态
fullscreen.enabled() :是否支持全屏模式
fullscreen.listen(callback) :添加全屏事件监听器
fullscreen . listen ( function ( ) {
1