mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-19 07:22:21 +00:00
27 lines
749 B
HTML
27 lines
749 B
HTML
<!DOCTYPE html>
|
|
<button id="button"></button>
|
|
<script src="include.js"></script>
|
|
<script type="text/javascript">
|
|
function writeText(onComplete) {
|
|
navigator.clipboard.writeText("Well hello friends :^)").then(
|
|
() => {
|
|
println("Success");
|
|
onComplete();
|
|
},
|
|
() => {
|
|
println("Failure");
|
|
onComplete();
|
|
}
|
|
);
|
|
}
|
|
|
|
asyncTest((done) => {
|
|
writeText(() => {
|
|
const button = document.getElementById("button");
|
|
internals.dispatchUserActivatedEvent(button, new Event("mousedown"));
|
|
button.dispatchEvent(new Event("click"));
|
|
|
|
writeText(done);
|
|
});
|
|
});
|
|
</script>
|