WinJS.Binding.processAll function

Applies to Windows and Windows Phone

Binds the values of an object to the values of a DOM element that has the data-win-bind attribute. If multiple DOM elements are to be bound, you must set the attribute on all of them. See the example below for details.

Note  If a control itself contains controls, and the parent control does the processing on its child controls. <control>.constructor.isDeclarativeControlContainer is true, and this method does not process the child controls, if <control>.constructor.isDeclarativeControlContainer is false, this method processes the child controls.

Syntax


WinJS.Binding.processAll(rootElement, dataContext, skipRoot, bindingCache, defaultInitializer).done( /* Your success and error handlers */ );

Parameters

rootElement

Type: DOMElement

Optional. The element at which to start traversing to find elements to bind to. If this parameter is omitted, the entire document is searched.

dataContext

Type: Object

The object that contains the values to which the DOM element should be bound. When this parameter is the window object or a Windows Runtime object, one-time binding is used instead one-way binding.

skipRoot

Type: Boolean

If true, specifies that only the children of rootElement should be bound, otherwise rootElement should be bound as well.

bindingCache

Type: Object

The cached binding data.

defaultInitializer

Type: Function

The binding initializer to use in the case that one is not specified in a binding expression. If not provided, the behavior is the same as Binding.defaultBind.

Return value

Type: Promise

A Promise that completes when every item that contains the data-win-bind attribute has been processed and the update has started.

Remarks

It's best not to pass the window object as processAll's dataContext. Instead, create your own dataContext object.

Requirements

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

Windows Phone 8.1

Namespace

WinJS.Binding

Library

Winjs.js

 

 

Show:
© 2015 Microsoft