drab
Version:
Interactivity for You
14 lines (13 loc) • 336 B
JavaScript
import { BaseCopy } from "../base/copy/index.js";
/**
* Uses the [Clipboard API](https://developer.mozilla.org/en-US/docs/Web/API/Clipboard/writeText)
* to copy text.
*/
export class Copy extends BaseCopy {
constructor() {
super();
}
mount() {
this.triggerListener(async () => await this.copy());
}
}