safeAreaInsets
Use javascript to get the safe area insets.
Chinese documentation : 中文文档
Precondition
- WKWebview
- viewport-fit=cover
Install
NPM
npm install safe-area-insets --save
UMD
https://unpkg.com/safe-area-insets/out/umd/index.min.js
Use
Require
const safeAreaInsets =
Safe Area Info
consoleconsoleconsoleconsoleconsole
Listening Change Event
{ console}// addsafeAreaInsets// removesafeAreaInsets