untitled1.js 1.05 KB
(function() {
    var toolbox = {}

    var IDE = function(config) {
        var events = getEvents();
        $.extend(events, config);
        this.toolbox = toolbox;
    }
})();

(function() {
    var getEvents = function() {
        return {
            record: function() {

            },
            onContentChanged: function() {
                for (this.monitor.started) {
                    this.monitor.started[index]();
                }
            }
        };
    }

    var IDE = function(config) {
        var events = getEvents();
        $.extend(events, config);
        this.events = events;
    }
})();



var ide = new IDE({

    events: {
        record: function() {

        },
        onContentChanged: function(config) {
            //do something

            config.callback && config.callback({});
        }
    }
});

ide.events.tools.record = function() {
    //do something
}

ide.events.editor.onContentChanged({ a: 1, b: 2, callback: function(results) {} });

ide.monitor.started.push(function() {

})

ide.props.
ide.methods.getText();