前端有用的web api 你知道几个?

1.Fullscreen

Fullscreen API提供了以全屏模式显示特定元素(及其子元素)的方法。有一个方法可以让我们在不需要全屏模式时退出该模式。不仅如此,当 DOM 元素转换到全屏模式或脱离全屏模式时,这个 API 还可以帮助执行任何操作

https://demo.greenroots.info/web-apis/web-apis-fullscreen/

2. Resize Observer API 

https://demo.greenroots.info/web-apis/web-api-resize-observer/

可以监听dom元素变化,替代resize

3.Image Capture API

可以调用授权摄像头并截取图片

https://demo.greenroots.info/web-apis/web-apis-image-capture/

4.Broadcast Channel API

可以在一个浏览器窗口之间进行通信

https://demo.greenroots.info/web-apis/web-apis-broadcast/

posted @ 2020-09-17 17:41  实现丰盛  阅读(679)  评论(0编辑  收藏  举报