keeweb/app/scripts/auto-type/auto-type-emitter-factory.js

15 lines
398 B
JavaScript
Raw Normal View History

2019-09-15 14:16:32 +02:00
import { Launcher } from 'comp/launcher';
2016-04-19 21:19:08 +02:00
2017-01-31 07:50:28 +01:00
const AutoTypeEmitterFactory = {
2019-08-18 10:17:09 +02:00
create(callback) {
if (Launcher && Launcher.autoTypeSupported) {
2019-09-15 14:16:32 +02:00
const { AutoTypeEmitter } = require('./emitter/auto-type-emitter-' +
Launcher.platform());
return new AutoTypeEmitter(callback);
2016-04-19 21:19:08 +02:00
}
return null;
2016-04-19 21:19:08 +02:00
}
};
2019-09-15 14:16:32 +02:00
export { AutoTypeEmitterFactory };