Is it possible to output the most nested promiss to the root workspace of the file?

  • 0
    Is it possible to return any signal within the framework of using promises from for example the third innermost promise to the root of the file? (I only know a way to call a named function by virtue of my not rich knowledge)

    }).then((current)=>{
    
    											let checkOpen = current.querySelector('.multiselect__content-wrapper')
    											let allRow = checkOpen.querySelectorAll('ul .multiselect__element')
    
    											if(checkOpen.style.display == ''){
    
    
    												let targetRow = new toElement('1-й Сет', allRow)
    
    
    												if(targetRow.result){
    													
    													let coords = new responseCoords(targetRow.result)
    
    													let cursor_move = new cursorMove(coords.result)
    
    														cursor_move.func().then(()=>{
    
    														let click = new cursorClick()
    															click.func()
    															click.promise.then(()=>{
    
    																<i>брать результат отсюда</i>
    
    															})
    
    													})
    												}
    											}
    
    
    										})
    <b>и продолжить цепочку иерархии здесь</b>
    JavaScript Anonymous, Apr 17, 2020

  • 1 Answers
  • 0
    // …
    click.promise.then(()=>{

    continuation(stuff);

    })
    // …

    function continuation(stuff) {

    }




    On async / await:



    async function () {
    // …
    let current = await ({"…"});
    let checkOpen = current.querySelector('.multiselect__content-wrapper');
    let allRow = checkOpen.querySelectorAll('ul .multiselect__element')
    if(checkOpen.style.display != ''){
    return;
    }

    let targetRow = new toElement('1-й Сет', allRow);
    if (!targetRow.result) {
    return;
    }

    let coords = new responseCoords(targetRow.result);
    let cursor_move = new cursorMove(coords.result);
    await cursor_move.func();
    let click = new cursorClick();
    click.func();
    await click.promise;
    // здесь можно запросить, что хотели
    }
    Lucas Daniels

Your Answer
To place the code, please use CodePen or similar tool. Thanks you!