この問題の解決策を見つけるのを手伝ってくれる人はいますか。私は(仮定して)3つのdoh関数を持っています.1つ目は非同期で、残りは同期です。最初に非同期関数を呼び出す必要があり、この関数の結果を他の 2 つの関数に渡すことは可能ですか?
例 :
doh.register(".....", [
{
name : "asyncFunction",
runTest : function(){
function callback(result){
//How to pass the result to fun_2 and fun_3
//also fun_2 or fun_3 should be deferred until this function executes
}
}
},
function fun_2(result){
//doh.assertTrue(.....);
},
function fun_3(result){
//doh.assertTrue(.....);
}
どんな助けでも素晴らしいでしょう。