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/getEditorValue.js

19 lines
442 B

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