summaryrefslogtreecommitdiffstats
path: root/solve/static/sandbox.js
blob: f0d18f9871a6979fd56c519b6197c892eba78906 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
import { expose } from './comlink-4.3.1.js';

expose({
    run(code, errorHandler) {
        try {
            return eval(code);
        } catch (error) {
            console.log("caught!");
            errorHandler(error);
        }
    }
});