pp-debounce
The pp-debounce
attribute is used to delay the execution of a function until a specified time has passed without additional triggers. It is commonly used to prevent a function from being called multiple times in quick succession, such as when handling user input events.
Note: The pp-debounce="500"
attribute specifies the delay in milliseconds before executing a function. If you don't specify the unit, it will be considered as milliseconds by default. You can also specify the delay in seconds (s) or minutes (m).
Example Usage
<input type="text" pp-debounce="500" oninput="searchFunction()">
<input type="text" pp-debounce="400ms" oninput="searchFunction()">
<input type="text" pp-debounce="1s" oninput="searchFunction()">
<input type="text" pp-debounce="1m" oninput="searchFunction()">