MCPcopy
hub / github.com/bootboxjs/bootbox / processCallback

Function processCallback

bootbox.js:1131–1144  ·  view source on GitHub ↗
(e, dialog, callback)

Source from the content-addressed store, hash-verified

1129
1130 // Handle the invoked dialog callback
1131 function processCallback(e, dialog, callback) {
1132 e.stopPropagation();
1133 e.preventDefault();
1134
1135 // By default we assume a callback will get rid of the dialog, although it is given the opportunity to override this
1136
1137 // If the callback can be invoked and it *explicitly returns false*, then we'll set a flag to keep the dialog active...
1138 let preserveDialog = typeof callback === 'function' && callback.call(dialog, e) === false;
1139
1140 // ... otherwise we'll bin it
1141 if (!preserveDialog) {
1142 dialog.modal('hide');
1143 }
1144 }
1145
1146 // Validate `min` and `max` values based on the current `inputType` value
1147 function minAndMaxAreValid(type, min, max) {

Callers 1

bootbox.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…