MCPcopy Create free account
hub / github.com/TruthHun/BookStack / timeoutCallback

Function timeoutCallback

static/wangEditor/js/wangEditor.js:6698–6714  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6696
6697 // 超时处理
6698 function timeoutCallback() {
6699 if (timeoutId) {
6700 clearTimeout(timeoutId);
6701 }
6702 if (xhr && xhr.abort) {
6703 xhr.abort();
6704 }
6705
6706 // 超时了就阻止默认行为
6707 event.preventDefault();
6708
6709 // 执行回调函数,提示什么内容,都应该在回调函数中定义
6710 timeoutfn && timeoutfn.call(editor, xhr);
6711
6712 // 隐藏进度条
6713 editor.hideUploadProgress();
6714 }
6715
6716 xhr.onload = function () {
6717 if (timeoutId) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected