Re: [whatwg/dom] Proposal: rate limiting event listeners (debounce / throttle) (Issue #1298)

I think I'd prefer `throttle` and `debounce` only accept a number. If they're not present, then they're off.

Either that, OR, if there needs to be a default duration, then:

Rather than allowing `throttle` and `debounce` to accept _both_ booleans and numbers, I'd rather see separate fields for the booleans and numbers.

Something like:

```js
{
  debounce: true,
  debounceDuration: 200,
  throttle: true,
  throttleDuration: 200,
}
```

And the `*Duration` fields would be optional. The duration would fall back to the default duration if those were not specified.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/1298#issuecomment-2266723436
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/dom/issues/1298/2266723436@github.com>

Received on Saturday, 3 August 2024 14:09:28 UTC