Packages

object Callback

A callback with no return value. Equivalent to () => Unit.

See also

CallbackTo

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Callback
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. final class ResultGuard[A] extends AnyRef
    Annotations
    @implicitNotFound()
  2. final class SetIntervalResult extends AnyRef
  3. final class SetTimeoutResult extends AnyRef

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def alert(message: String): Callback

    Convenience for calling dom.alert.

  5. def apply[U](f: => U)(implicit arg0: ResultGuard[U]): Callback
    Annotations
    @inline()
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def assert(test: Boolean, message: String, optionalParams: Any*): Callback

    Convenience for calling dom.console.assert.

  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  9. def debounce(delay: FiniteDuration): Callback

    Creates an debounce boundary.

    Creates an debounce boundary.

    Save it as a val somewhere because it relies on internal state that must be reused.

    Annotations
    @inline()
  10. def debounce(delay: Duration): Callback

    Creates an debounce boundary.

    Creates an debounce boundary.

    Save it as a val somewhere because it relies on internal state that must be reused.

    Annotations
    @inline()
  11. def debounceMs(delayMs: Long): Callback

    Creates an debounce boundary.

    Creates an debounce boundary.

    Save it as a val somewhere because it relies on internal state that must be reused.

    Annotations
    @inline()
  12. val empty: Callback

    A callback that does nothing.

  13. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  15. def fromJsFn(f: Function0[Unit]): Callback
    Annotations
    @inline()
  16. def future[A](f: => Future[CallbackTo[A]])(implicit ec: ExecutionContext): Callback

    Wraps a Future so that it is repeatable, and so that its inner callback is run when the future completes.

    Wraps a Future so that it is repeatable, and so that its inner callback is run when the future completes.

    The result is discarded. To retain it, use CallbackTo.future instead.

    Because the Future is discarded, when an exception causes it to fail, the exception is re-thrown. If you want the exception to be ignored or handled differently, use CallbackTo.future instead and then .void to discard the future and turn the result into a Callback.

    WARNING: Futures are scheduled to run as soon as they're created. Ensure that the argument you provide creates a new Future; don't reference an existing one.

  17. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  18. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  19. def info(message: Any, optionalParams: Any*): Callback

    Convenience for calling dom.console.info.

  20. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  21. def lazily(f: => Callback): Callback

    Callback that isn't created until the first time it is used, after which it is reused.

    Callback that isn't created until the first time it is used, after which it is reused.

    Annotations
    @inline()
  22. def lift(f: () => Unit): Callback
    Annotations
    @inline()
  23. def log(message: Any, optionalParams: Any*): Callback

    Convenience for calling dom.console.log.

  24. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  25. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  26. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  27. def runAll(callbacks: CallbackTo[Any]*): Callback

    Run all given callbacks.

    Run all given callbacks.

    All results are discarded. Any exceptions get a printStackTrace and are then discarded, and the next callback run.

    Since

    2.0.0

  28. def sequence[T[X] <: Iterable[X], A](tca: => T[CallbackTo[A]]): Callback
  29. def sequenceOption[A](oca: => Option[CallbackTo[A]]): Callback
  30. def suspend(f: => Callback): Callback

    Callback that is recreated each time it is used.

    Callback that is recreated each time it is used.

    Annotations
    @inline()
  31. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  32. def throwException(t: Throwable): Callback
    Annotations
    @inline()
  33. def toString(): String
    Definition Classes
    AnyRef → Any
  34. def traverse[T[X] <: Iterable[X], A, B](ta: => T[A])(f: (A) => CallbackTo[B]): Callback
  35. def traverseOption[A, B](oa: => Option[A])(f: (A) => CallbackTo[B]): Callback
  36. def unless[A](cond: Boolean)(c: => CallbackTo[A]): Callback

    Convenience for applying a condition to a callback, and returning Callback.empty when the condition is already satisfied.

    Convenience for applying a condition to a callback, and returning Callback.empty when the condition is already satisfied.

    Notice the condition is strict. If non-strictness is desired use callback.unless(cond).

    cond

    The condition required to be false for the callback to execute.

  37. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  38. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  39. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  40. def warn(message: Any, optionalParams: Any*): Callback

    Convenience for calling dom.console.warn.

  41. def when[A](cond: Boolean)(c: => CallbackTo[A]): Callback

    Convenience for applying a condition to a callback, and returning Callback.empty when the condition isn't satisfied.

    Convenience for applying a condition to a callback, and returning Callback.empty when the condition isn't satisfied.

    Notice the condition is strict. If non-strictness is desired use callback.when(cond).

    cond

    The condition required to be true for the callback to execute.

  42. object ResultGuard

Deprecated Value Members

  1. def TODO(reason: => String): Callback

    Serves as a temporary placeholder for a callback until you supply a real implementation.

    Serves as a temporary placeholder for a callback until you supply a real implementation.

    Unlike ??? this doesn't crash, it just prints a warning to the console.

    Also it's not really deprecated; that's just so you get a compiler warning as a reminder.

    Annotations
    @deprecated
    Deprecated

    (Since version not really deprecated)

  2. def TODO: Callback

    Serves as a temporary placeholder for a callback until you supply a real implementation.

    Serves as a temporary placeholder for a callback until you supply a real implementation.

    Unlike ??? this doesn't crash, it just prints a warning to the console.

    Also it's not really deprecated; that's just so you get a compiler warning as a reminder.

    Annotations
    @deprecated
    Deprecated

    (Since version not really deprecated)

  3. def byName(f: => Callback): Callback

    Callback that is recreated each time it is used.

    Callback that is recreated each time it is used.

    https://en.wikipedia.org/wiki/Evaluation_strategy#Call_by_name

    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.0.0) Use Callback.suspend

  4. def error(t: Throwable): Callback
    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 1.6.1) use throwException

  5. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped