emitWorkspaceUpdate () {
        const variableMap = Object.assign({},
            this.runtime.getTargetForStage().variables,
            this.editingTarget.variables
        );

        const variables = Object.keys(variableMap).map(k => variableMap[k]);

        const xmlString = `<xml xmlns="http://www.w3.org/1999/xhtml">
                            <variables>
                                ${variables.map(v => v.toXML()).join()}
                            </variables>
                            ${this.editingTarget.blocks.toXML()}
                        </xml>`;

        this.emit('workspaceUpdate', {xml: xmlString});
    }
/**
     * Emit an Blockly/scratch-blocks compatible XML representation
     * of the current editing target's blocks.
     */
Emit an Blockly/scratch-blocks compatible XML representation
of the current editing target's blocks.
Emit an Blockly / scratch - blocks compatible XML representation of the current editing target ' s blocks .
emitWorkspaceUpdate () {
        const variableMap = Object.assign({},
            this.runtime.getTargetForStage().variables,
            this.editingTarget.variables
        );
        const variables = Object.keys(variableMap).map(k => variableMap[k]);
        const xmlString = `<xml xmlns="http://www.w3.org/1999/xhtml">
                            <variables>
                                ${variables.map(v => v.toXML()).join()}
                            </variables>
                            ${this.editingTarget.blocks.toXML()}
                        </xml>`;
        this.emit('workspaceUpdate', {xml: xmlString});
    }
emitWorkspaceUpdate ( ) { const variableMap = Object . assign ( { } , this . runtime . getTargetForStage ( ) . variables , this . editingTarget . variables ) ; const variables = Object . keys ( variableMap ) . map ( k => variableMap [ k ] ) ; const xmlString = ` ${ variables . map ( v => v . toXML ( ) ) . join ( ) } ${ this . editingTarget . blocks . toXML ( ) } ` ; this . emit ( 'workspaceUpdate' , { xml : xmlString } ) ; }
Emit an Blockly/scratch-blocks compatible XML representation
 of the current editing target's blocks.
Emit an Blockly / scratch - blocks compatible XML representation of the current editing target ' s blocks .