src/common/js/winjs/js/ui.js
function queueEdit(applyEdit, editType, complete, error, keyUpdate, updateSlots, undo) {
                    var editQueueTail = editQueue.prev,
                        edit = {
                            prev: editQueueTail,
                            next: editQueue,
                            applyEdit: applyEdit,
                            editType: editType,
                            complete: complete,
                            error: error,
                            keyUpdate: keyUpdate
                        };
                    editQueueTail.next = edit;
                    editQueue.prev = edit;
                    editsQueued = true;

                    // If there's a refresh in progress, abandon it, but request that a new one be started once the edits complete
                    if (refreshRequested || refreshInProgress) {
                        currentRefreshID++;
                        refreshInProgress = false;
                        refreshRequested = true;
                    }

                    if (editQueue.next === edit) {
                        // Attempt the edit immediately, in case it completes synchronously
                        applyNextEdit();
                    }

                    // If the edit succeeded or is still pending, apply it to the slots (in the latter case, "optimistically")
                    if (!edit.failed) {
                        updateSlots();

                        // Supply the undo function now
                        edit.undo = undo;
                    }

                    if (!editsInProgress) {
                        completeEdits();
                    }
                }
function queueEdit(applyEdit, editType, complete, error, keyUpdate, updateSlots, undo) {
                    var editQueueTail = editQueue.prev,
                        edit = {
                            prev: editQueueTail,
                            next: editQueue,
                            applyEdit: applyEdit,
                            editType: editType,
                            complete: complete,
                            error: error,
                            keyUpdate: keyUpdate
                        };
                    editQueueTail.next = edit;
                    editQueue.prev = edit;
                    editsQueued = true;

                    // If there's a refresh in progress, abandon it, but request that a new one be started once the edits complete
                    if (refreshRequested || refreshInProgress) {
                        currentRefreshID++;
                        refreshInProgress = false;
                        refreshRequested = true;
                    }

                    if (editQueue.next === edit) {
                        // Attempt the edit immediately, in case it completes synchronously
                        applyNextEdit();
                    }

                    // If the edit succeeded or is still pending, apply it to the slots (in the latter case, "optimistically")
                    if (!edit.failed) {
                        updateSlots();

                        // Supply the undo function now
                        edit.undo = undo;
                    }

                    if (!editsInProgress) {
                        completeEdits();
                    }
                }
function queueEdit ( applyEdit , editType , complete , error , keyUpdate , updateSlots , undo ) { var editQueueTail = editQueue . prev , edit = { prev : editQueueTail , next : editQueue , applyEdit : applyEdit , editType : editType , complete : complete , error : error , keyUpdate : keyUpdate } ; editQueueTail . next = edit ; editQueue . prev = edit ; editsQueued = true ; // If there's a refresh in progress, abandon it, but request that a new one be started once the edits complete if ( refreshRequested || refreshInProgress ) { currentRefreshID ++ ; refreshInProgress = false ; refreshRequested = true ; } if ( editQueue . next === edit ) { // Attempt the edit immediately, in case it completes synchronously applyNextEdit ( ) ; } // If the edit succeeded or is still pending, apply it to the slots (in the latter case, "optimistically") if ( ! edit . failed ) { updateSlots ( ) ; // Supply the undo function now edit . undo = undo ; } if ( ! editsInProgress ) { completeEdits ( ) ; } }
Edit Queue Queues an edit and immediately "optimistically" apply it to the slots list, sending re-entrant notifications
Edit Queue Queues an edit and immediately optimistically apply it to the slots list sending re - entrant notifications