HTMLDwebSafeAreaElement
WebComponentHTMLDwebSafeAreaElementLess than 1 minute
A WebComponent for accessing the system safe area;
Inherits from HTMLStateObserverElement;
<dweb-safe-area></dweb-safe-area>
Properties
plugin
A SafeAreaPlugin object;
state
A SafeAreaPlugin.state object;
getState
The SafeAreaPlugin.getState() method;
setState
The SafeAreaPlugin.setState() method;
setOverlay
The SafeAreaPlugin.setOverlay() method;
getOverlay
The SafeAreaPlugin.getOverlay() method;
Methods
- None
Events
"statechange"
Triggered when state changes;
Passes a CustomEvent object to listener;
CustomEvent.detail is a SafeAreaPlugin.state object;
Example
<body>
<dweb-safe-area></dweb-safe-area>
<script type="text/javascript">
const dwebSafeArea = document.querySelector("dweb-safe-area");
dwebSafeArea.addEventListener('statechange', (customEvent) => {
})
</script>
</body>
Cross-Platform Compatibility
Properties/Methods/Events | Android | iOS | Desktop-Dev | Desktop |
---|---|---|---|---|
plugin | ✅ | ✅ | ✅ | X |
state | ✅ | ✅ | ✅ | X |
getState | ✅ | ✅ | ✅ | X |
setState | ✅ | ✅ | ✅ | X |
setOverlay | ✅ | ✅ | ✅ | X |
getOverlay | ✅ | ✅ | ✅ | X |
Related Links
Powered by Waline v2.15.7