Partager via


observableMixin.bind method

Links the specified action to the property specified in the name parameter. This function is invoked when the value of the property may have changed. It is not guaranteed that the action will be called only when a value has actually changed, nor is it guaranteed that the action will be called for every value change. The implementation of this function coalesces change notifications, such that multiple updates to a property value may result in only a single call to the specified action.

Syntax

var object = observableMixin.bind(name, action);

Parameters

  • name
    Type: String

    The name of the property to which to bind the action.

  • action
    Type: Function

    The function to invoke asynchronously when the property may have changed.

Return value

Type: Object

A reference to this observableMixin object.

Requirements

Minimum WinJS version

WinJS 1.0

Namespace

WinJS.Binding

See also

observableMixin