Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@6h/be-full

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@6h/be-full

🍔 任意元素全屏显示

  • 0.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

be-full

NPM Version

🍔 任意元素全屏显示, 支持PC/移动端, 不到1kb.

在线演示

:rocket: 演示

安装

npm i -S be-full

快速开始

import {beFull} from 'be-full';

// 整个网页全屏显示
beFull();

// 指定元素全屏
beFull(document.getElementById('video'));

🔥更多API(4个函数)

exitFull(退出全屏)

exitFull();

toggleFull(切换全屏/退出)

使用方法同beFull, 只是第二次点击会执行exitFull

toggleFull();

// 切换指定元素全屏/退出
toggleFull(document.getElementById('video'));

isFull(元素是否全屏)

isFull(document.getElementById('video'));

watchFull(监视元素全屏状态变化)

const {cancel} = watchFull(document.documentElement, ev => {
    // 全屏状态变化执行         
});

// 取消监听
cancel();

Keywords

FAQs

Package last updated on 13 Mar 2020

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc