Capture delayed events and cancel as necessary.

Tag #1052
This commit is contained in:
wolfbeast 2019-04-26 14:13:32 +02:00 committed by Roy Tam
commit e3827df1a0
4 changed files with 20 additions and 9 deletions

View file

@ -2,11 +2,6 @@
This form triggers a MP and gets filled in.<br>
<form>
Username: <input type="text" id="userfield" name="u"><br>
Password: <input type="password" id="passfield" name="p"><br>
<script>
// Only notify when we fill in the password field.
document.getElementById("passfield").addEventListener("input", function() {
parent.postMessage("filled", "*");
});
</script>
Password: <input type="password" id="passfield" name="p"
oninput="parent.postMessage('filled', '*');"><br>
</form>