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
2016-02-22 13:25:45 -05:00

20 lines
No EOL
426 B
JavaScript

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