jellyfin-web/dashboard-ui/bower_components/emby-webcomponents/confirm/nativeconfirm.js
2016-02-22 13:25:45 -05:00

20 lines
388 B
JavaScript

define([], function () {
return function (options) {
if (typeof options === 'string') {
options = {
title: '',
text: options
};
}
var result = confirm(options.text);
if (result) {
return Promise.resolve();
} else {
return Promise.reject();
}
};
});