remix-project mirror
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
remix-project/test-browser/commands/setEditorValue.js

20 lines
485 B

const EventEmitter = require('events')
class SetEditorValue extends EventEmitter {
command (value, callback) {
this.api.perform((client, done) => {
this.api.execute(function (value) {
document.getElementById('input').editor.session.setValue(value)
}, [value], (result) => {
done()
if (callback) {
callback.call(this.api)
}
this.emit('complete')
})
})
return this
}
}
module.exports = SetEditorValue