trait TimerSupport extends OnUnmount
Alternatives to window.setTimeout/window.setInterval that automatically unregister installed callbacks
when the component unmounts.
Provides interval methods that guarentee duration between callbacks. Regular use of setInterval is fine
for callbacks with determined execution time. However, if your callback could possibly take as long or longer
than your timeout, you can end up with callbacks firing back to back.
Install in ScalaComponent.build via .configure(TimerSupport.install).
- Alphabetic
- By Inheritance
- TimerSupport
- OnUnmount
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def onUnmount(f: Callback): Callback
- Definition Classes
- OnUnmount
- final def setGuaranteedInterval(f: Callback, interval: FiniteDuration): Callback
Provides
setInterval-like behavior insuring that the time between calls offis *at least* thetimeout. - final def setGuaranteedIntervalMs(f: Callback, intervalInMilliseconds: Double): Callback
Provides
setInterval-like behavior insuring that the time between calls offis *at least* thetimeout. - final def setInterval(f: Callback, period: FiniteDuration): Callback
Invokes the callback
frepeatedly everyperiod. - final def setIntervalMs(f: Callback, periodInMilliseconds: Double): Callback
- final def setTimeout(f: Callback, timeout: FiniteDuration): Callback
Invokes the callback
fonce after a minimum oftimeoutelapses. - final def setTimeoutMs(f: Callback, timeoutInMilliseconds: Double): Callback
Invokes the callback
fonce after a minimum oftimeoutelapses. - final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def unmount: Callback
- Definition Classes
- OnUnmount
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated @deprecated
- Deprecated
(Since version ) see corresponding Javadoc for more information.