HTMLDwebClipboardElement
WebComponentHTMLDwebClipboardElementLess than 1 minute
Implements a WebComponent for accessing the clipboard;
Inherits from HTMLElement;
<dweb-clipboard></dweb-clipboard>
Properties
plugin
The property value is the ClipboardPlugin object;
read
The property value is the ClipboardPlugin.read() method;
write
The property value is the ClipboardPlugin.write() method
Methods
- None
Events
Supports any events, no predefined events;
Example
<body>
<dweb-clipboard></dweb-clipboard>
<button>read</button>
<script type="module">
import "@plaoc/plugins"
const clipboard = document.querySelector("dweb-clipboard")!
const btn = document.querySelector('button');
btn.addEventListener('click', async () => {
const url = await clipboard.read();
})
</script>
</body>
Platform Compatibility
Properties/Methods/Events | Android | iOS | Desktop-Dev | Desktop |
---|---|---|---|---|
plugin | ✅ | ✅ | ✅ | X |
read | ✅ | ✅ | ✅ | X |
write | ✅ | ✅ | ✅ | X |
Related Links
Powered by Waline v2.15.7