MCPcopy
hub / github.com/winjs/winjs / process

Function process

src/js/WinJS/ControlProcessor.js:220–243  ·  view source on GitHub ↗
(element)

Source from the content-addressed store, hash-verified

218 }
219
220 function process(element) {
221 /// <signature helpKeyword="WinJS.UI.process">
222 /// <summary locid="WinJS.UI.process">
223 /// Applies declarative control binding to the specified element.
224 /// </summary>
225 /// <param name="element" type="Object" domElement="true" locid="WinJS.UI.process_p:element">
226 /// The element to bind.
227 /// </param>
228 /// <returns type="WinJS.Promise" locid="WinJS.UI.process_returnValue">
229 /// A promise that is fulfilled after the control is activated. The value of the
230 /// promise is the control that is attached to element.
231 /// </returns>
232 /// </signature>
233
234 if (element && element.winControl) {
235 return Promise.as(element.winControl);
236 }
237 var handler = getControlHandler(element);
238 if (!handler) {
239 return Promise.as(); // undefined, no handler
240 } else {
241 return activate(element, handler);
242 }
243 }
244
245 _Base.Namespace._moduleDefine(exports, "WinJS.UI", {
246 scopedSelect: scopedSelect,

Callers

nothing calls this directly

Calls 2

getControlHandlerFunction · 0.85
activateFunction · 0.85

Tested by

no test coverage detected