Skip to content

Commit 6cabcfc

Browse files
committed
Add Callback.alert
1 parent 8ec38f6 commit 6cabcfc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

core/src/main/scala/japgolly/scalajs/react/Callback.scala

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,12 @@ object Callback {
8383
def assert(test: Boolean, message: String, optionalParams: js.Any*): Callback =
8484
Callback(console.assert(test, message, optionalParams: _*))
8585

86+
/**
87+
* Convenience for calling `dom.alert`.
88+
*/
89+
def alert(message: String): Callback =
90+
Callback(org.scalajs.dom.alert(message))
91+
8692
/**
8793
* Serves as a temporary placeholder for a callback until you supply a real implementation.
8894
*

0 commit comments

Comments
 (0)