DynamicSubscription

Represents a subscription that can be turned on and off repeatedly. For example, in Laminar the elements can be mounted and unmounted repeatedly, and so their subscriptions are activated and deactivated respectively when those events happen.

Represents a subscription that can be turned on and off repeatedly. For example, in Laminar the elements can be mounted and unmounted repeatedly, and so their subscriptions are activated and deactivated respectively when those events happen.

In contrast, the only thing you can do to a non-dynamic Subscription is kill it, and once that is done, it will remain dead forever.

Note that the dynamic subscription is NOT activated automatically upon creation.

Value Params
activate
  • Note: Must not throw!
prepend
  • If true, dynamic owner will prepend subscription to the list instead of appending. This affects activation and deactivation order of subscriptions.
Companion
object
class Object
trait Matchable
class Any

Value members

Concrete methods

@inline
def isOwnedBy(owner: DynamicOwner): Boolean
@inline
def isOwnerActive: Boolean
def kill(): Unit

Permanently kill this subscription, deactivating if it's currently active, and removing it from the dynamic owner

Permanently kill this subscription, deactivating if it's currently active, and removing it from the dynamic owner