1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00
jellyfin-web/dashboard-ui/bower_components/emby-webcomponents/prompt/nativeprompt.js

24 lines
514 B
JavaScript
Raw Normal View History

2016-02-04 15:51:13 -05:00
define([], function () {
return function (options) {
return new Promise(function (resolve, reject) {
if (typeof options === 'string') {
options = {
title: '',
text: options
};
}
var result = prompt(options.title || '', options.text || '');
if (result) {
resolve(result);
} else {
reject(result);
}
});
};
});