hippofish/src/client/app/mobile/api/input.ts

9 lines
148 B
TypeScript
Raw Normal View History

2018-02-21 18:00:30 +01:00
export default function(opts) {
return new Promise<string>((res, rej) => {
2018-03-07 10:55:02 +01:00
const x = window.prompt(opts.title);
if (x) {
res(x);
}
2018-02-21 18:00:30 +01:00
});
}