Class: Proc
Overview
Proc
Instance Method Summary collapse
-
#debounce(ms, leading = false) ⇒ Object
Runs the given block after the given wait period if called continously.
-
#throttle(ms) ⇒ Object
Runs the given block after the given wait period if called continously.
Instance Method Details
#debounce(ms, leading = false) ⇒ Object
Runs the given block after the given wait period if called continously. The wait period restarts with each call
16 17 18 |
# File 'opal/fron/core_ext/proc.rb', line 16 def debounce(ms, leading = false) Native `debounce(#{self}, #{ms}, #{leading})` end |
#throttle(ms) ⇒ Object
Runs the given block after the given wait period if called continously
7 8 9 |
# File 'opal/fron/core_ext/proc.rb', line 7 def throttle(ms) Native `throttle(#{self}, #{ms}, {leading: false})` end |