2
0
mirror of https://github.com/tenrok/maska.git synced 2026-05-15 11:59:38 +03:00

Fix of the input event

This commit is contained in:
Alexander Shabunevich
2022-12-09 22:40:51 +03:00
parent 4132dcc874
commit 41fb72b87c
2 changed files with 16 additions and 4 deletions
+7 -2
View File
@@ -410,7 +410,12 @@ new MaskInput("input", {
# Events
You can subscribe to `maska` event, fired every time when mask applied:
There are two events you can subscribe to get the masking result:
- `maska` event
- `input` event
They are essentially the same, but the `input` event could be fired by any input logic, and the `maska` event is library specific.
<!-- tabs:start -->
## **Vanilla JS**
@@ -426,7 +431,7 @@ document.querySelector("input").addEventListener("maska", onMaska)
```
<!-- tabs:end -->
Callback will receive custom event contains `detail` property with given structure:
Both events contains `detail` property with given structure:
<!-- tabs:start -->
### **Description**