object Callback
A callback with no return value. Equivalent to () => Unit.
- See also
CallbackTo
- Alphabetic
- By Inheritance
- Callback
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
final
class
ResultGuard[A] extends AnyRef
- Annotations
- @implicitNotFound( ... )
- final class SetIntervalResult extends AnyRef
- final class SetTimeoutResult extends AnyRef
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
-
def
alert(message: String): Callback
Convenience for calling
dom.alert. -
def
apply[U](f: ⇒ U)(implicit arg0: ResultGuard[U]): Callback
- Annotations
- @inline()
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
assert(test: Boolean, message: String, optionalParams: Any*): Callback
Convenience for calling
dom.console.assert. -
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
- @inline()
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
-
val
empty: Callback
A callback that does nothing.
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
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
Futureis 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.voidto discard the future and turn the result into aCallback.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.
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
info(message: Any, optionalParams: Any*): Callback
Convenience for calling
dom.console.info. -
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
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()
-
def
lift(f: () ⇒ Unit): Callback
- Annotations
- @inline()
-
def
log(message: Any, optionalParams: Any*): Callback
Convenience for calling
dom.console.log. -
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()
- def sequence[T[X] <: scala.collection.compat.IterableOnce[X]](tca: ⇒ T[Callback]): Callback
- def sequenceOption[A](oca: ⇒ Option[Callback]): Callback
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
throwException(t: Throwable): Callback
- Annotations
- @inline()
-
def
toString(): String
- Definition Classes
- AnyRef → Any
- def traverse[T[X] <: scala.collection.compat.IterableOnce[X], A](ta: ⇒ T[A])(f: (A) ⇒ Callback): Callback
- def traverseOption[A](oa: ⇒ Option[A])(f: (A) ⇒ Callback): Callback
-
def
unless(cond: Boolean)(c: ⇒ Callback): Callback
Convenience for applying a condition to a callback, and returning
Callback.emptywhen the condition is already satisfied.Convenience for applying a condition to a callback, and returning
Callback.emptywhen 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
falsefor the callback to execute.
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
warn(message: Any, optionalParams: Any*): Callback
Convenience for calling
dom.console.warn. -
def
when(cond: Boolean)(c: ⇒ Callback): Callback
Convenience for applying a condition to a callback, and returning
Callback.emptywhen the condition isn't satisfied.Convenience for applying a condition to a callback, and returning
Callback.emptywhen 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
truefor the callback to execute.
- object ResultGuard
Deprecated Value Members
-
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)
-
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)
-
def
error(t: Throwable): Callback
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 1.6.1) use throwException
-
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.