-
Add
.timeout(timeLimit)
toAsyncCallback
instances so that you can limit the amount of time to wait for the async procedure to complete.(Note: there's no built-in concept of cancellation here. If your procedure doesn't finish in time, this will return
None
when the time limit is reached however, the underlying procedure will become orphaned and continue to run in the background until complete.) -
Add convenience methods
CallbackTo
for getting the current time:now: CallbackTo[Instant]
currentTimeMillis: CallbackTo[Long]
nanoTime: CallbackTo[Long]
-
Add
StateAccess.const(F[S]): StateAccess[F, S]
Add a new way of creating VDOM refs, called "untyped" refs.
There are two differences between the established ("typed") way, and this "untyped" way:
-
It sacrifices some type-safety for flexibility. You can declare a ref to an
<input>
and apply it to a<select>
. When the types don't line up, the ref simply rejects the dom it's passed. If you misuse this you won't get a runtime error, it will just be as though you didn't wire up the ref at all. -
Decoupling of control. With type-safe refs, you create the ref and apply it in the same class. With this new "untyped" ref, you can pass the ref around and have a completely different part of the code wire it up to vdom.
The untypedRef
vdom attribute already existed but wasn't properly usable. It's now fixed and there are two ways of using it.
- The first is to just pass in a
Dom => Unit
function:
var refOrNull: html.Input = null
def render =
<.input(^.untypedRef(refOrNull = _))
- The second is to create a
Ref
object and wire it up like a normal vdom attribute:
Usage:
val ref = Ref.toVdom[html.Input]
def render =
<.input(^.untypedRef := ref)
-
Add
Reusability.MapImplicits
which you can now import to enable implicitReusability
instances forMap
s -
Add an implicit
Reusability[Range]
instance -
Add conversions between
Option[Reusable[A]]
<=>Reusable[Option[A]]
- If you have a
Option[Reusable[A]]
, callReusable.sequenceOption
- If you have a
Reusable[Option[A]]
, call.sequenceOption
- If you have a
-
Add
Reusable.emptyCallback: Reusable[Callback]
-
Prefix all members in
Reusability.TemporalImplicitsWithoutTolerance
byreusability
-
Add many more
SimEvent.Keyboard
definitions. All keys on a standard US keyboard are now covered. -
Improve accuracy of pre-defined
SimEvent.Keyboard
values -
SimEvent
classes now have anassign(tgt: js.Dynamic, readOnlyProperties: Boolean = false): tgt.type
method to populate a provided object-like value. (Useful for generating native events for testing.)
- scalajs-dom 1.1.0
- scala-collection-compat 2.2.0
- Scala.JS 1.2.0