Share via


WinJS.Binding.setAttribute function

Creates a one-way binding between the source object and an attribute on the destination element.

Syntax

var object = WinJS.Binding.setAttribute(source, sourceProperties, dest, destProperties);

Parameters

  • source
    Type: Object

    The source object.

  • sourceProperties
    Type: Array

    The path on the source object to the source property.

  • dest
    Type: DOMEleement

    The destination object.

  • destProperties
    Type: Array

    The path on the destination object to the destination property. This must be a single name.

Return value

Type: Object

An object with a cancel() method that is used to coalesce bindings.

Requirements

Minimum WinJS version

WinJS 1.0

Namespace

WinJS.Binding