HTMLDwebTorchElement
WebComponentHTMLDwebTorchElementLess than 1 minute
A WebComponent for accessing the torch device;
Inherits from HTMLElement;
<dweb-torch></dweb-torch>
Properties
plugin
A TorchPlugin object;
toggleTorch
The TorchPlugin.toggleTorch() method;
getTorchState
The TorchPlugin.getTorchState() method;
Methods
- None
Events
No predefined events
Example
<body>
<dweb-torch></dweb-torch>
<script type="text/javascript">
const dwebTorch = document.querySelector("dweb-torch");
dwebTorch.toggleTorch();
</script>
</body>
Cross-Platform Compatibility
Properties/Methods/Events | Android | iOS | Desktop-Dev | Desktop |
---|---|---|---|---|
plugin | ✅ | ✅ | ✅ | X |
toggleTorch | ✅ | ✅ | ✅ | X |
getTorchState | ✅ | ✅ | ✅ | X |
Related Links
Powered by Waline v2.15.7