blob: e0e6ace96f95ebaa0439ac8bc6243b367d61cde5 [file] [log] [blame]
<!DOCTYPE html>
<meta name="viewport" content="width=device-width, initial-scale=1">
<body style="width: 100vw; height: 100vh; margin: 0;">
<input type=color id="drag-target" style="width: 100px; height: 100px">
<input type=color id="drop-target" style="width: 100px; height: 100px;" value="#ff0000">
</body>
<script>
let dropTarget = document.getElementById("drop-target");
dropTarget.addEventListener("change", () => {
window.webkit.messageHandlers.testHandler.postMessage("change");
});
dropTarget.addEventListener("input", () => {
window.webkit.messageHandlers.testHandler.postMessage("input");
});
</script>