Commit 32e354ef authored by yann300's avatar yann300

comments

parent c9f70f4a
......@@ -7,12 +7,35 @@
* - compilationData (that is triggered just after a focus - and send the current compilation data or null)
* - compilationFinished (that is only sent to the plugin that has focus)
*
* @param {String} txHash - hash of the transaction
* Plugin can emit messages and receive response.
*
* CONFIG:
* - getConfig(filename). The data to send should be formatted like:
* {
* type: 'getConfig',
* arguments: ['filename.ext'],
* id: <requestid>
* }
* the plugin will reveice a response like:
* {
* type: 'getConfig',
* id: <requestid>
* error,
* result
* }
* same apply for the other call
* - setConfig(filename, content)
* - removeConfig
*
* See index.html and remix.js in test-browser folder for sample
*
*/
class PluginManager {
constructor (api, events) {
var self = this
this.plugins = {}
this.inFocus
var allowedapi = {'setConfig': 1, 'getConfig': 1, 'removeConfig': 1}
events.compiler.register('compilationFinished', (success, data, source) => {
if (this.inFocus) {
// trigger to the current focus
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment