function saveData() {
    const testData = parse();

    if (creatorMode === CREATORMODE.SIMULATOR_POPUP) {
        const postData = { scopeID: circuitScopeID, testData };
        window.opener.postMessage({ type: 'testData', data: JSON.stringify(postData) }, '*');
        window.close();
    }
}
Called when Save is clicked. If opened in popup, sends message to parent window
to attach test to the testbench.