How to make webEnumerator.moveNext wait until executeQueryAsync query executes
问题 I want executeQueryAsync to complete before giving back control to webEnumerator.moveNext, anyway ? function onGetSubwebsSuccess(sender, args) { var webEnumerator = webCollection.getEnumerator(); while (webEnumerator.moveNext()) { alert("Loop 1"); web = webEnumerator.get_current(); this.props = web.get_allProperties(); context.load(this.props); context.executeQueryAsync(Function.createDelegate(this, gotProperty), Function.createDelegate(this, failedGettingProperty)); } } function gotProperty(