ConstraintJS - v0.10.2
    Preparing search index...

    Interface BindingOptions<V>

    Options for a Binding.

    interface BindingOptions<V = any> {
        coreDestroy?: () => void;
        getter: () => V;
        init_val?: V | ((target: Node | undefined) => V);
        onChange?: (this: Binding<V>, value: V, previous: V | undefined) => void;
        onDestroy?: () => void;
        setter: (
            this: Binding<V>,
            target: Node,
            value: V,
            previous: V | undefined,
        ) => void;
        targets: unknown;
    }

    Type Parameters

    • V = any
    Index
    coreDestroy?: () => void

    Called when the binding is destroyed (used to clean up the binding's own constraints)

    getter: () => V

    Computes the value to apply. Constraints it reads are tracked.

    init_val?: V | ((target: Node | undefined) => V)

    The value before the binding was created, or a function that reads it from the first target

    onChange?: (this: Binding<V>, value: V, previous: V | undefined) => void

    Called with the new and previous values before the targets are updated

    onDestroy?: () => void

    Called when the binding is destroyed

    setter: (
        this: Binding<V>,
        target: Node,
        value: V,
        previous: V | undefined,
    ) => void

    Applies a value to one target node

    targets: unknown

    The DOM nodes to update (a node, an array, a NodeList, a jQuery object, or a constraint of these)