src/sap.ui.core/src/sap/ui/core/util/XMLPreprocessor.js
function (aElements, fnCallback) {
						try {
							return SyncPromise.resolve(stopAndGo(aElements, fnCallback));
						} catch (e) {
							return SyncPromise.reject(e);
						}
					}
function (aElements, fnCallback) {
						try {
							return SyncPromise.resolve(stopAndGo(aElements, fnCallback));
						} catch (e) {
							return SyncPromise.reject(e);
						}
					}
function ( aElements , fnCallback ) { try { return SyncPromise . resolve ( stopAndGo ( aElements , fnCallback ) ) ; } catch ( e ) { return SyncPromise . reject ( e ) ; } }
Visits the given elements one-by-one, calls the given callback for each of
them and stops and waits for each thenable returned by the callback before
going on to the next element. If a thenable resolves with a truthy value,
iteration stops and the corresponding element becomes the result of the
returned thenable.

<b>Note:</b> If the visitor function is used for synchronous XML Templating,
the callback must return a sync promise; in other cases, any thenable is OK.

@param {any[]} aElements
Whatever elements we want to visit
@param {function} fnCallback
A function to be called with a single element and its index and the array
(like {@link Array#find} does it), returning a thenable, preferrably a
{@link sap.ui.base.SyncPromise}
@returns {sap.ui.base.SyncPromise}
A sync promise which resolves with the first element where the callback's
thenable resolved with a truthy value, or resolves with
<code>undefined</code> as soon as the last callback's thenable has
resolved, or is rejected with a corresponding error if any callback returns
a rejected thenable or throws an error
Visits the given elements one - by - one calls the given callback for each of them and stops and waits for each thenable returned by the callback before going on to the next element . If a thenable resolves with a truthy value iteration stops and the corresponding element becomes the result of the returned thenable .