common property

String common
getter/setter pair

Implementation

static var common = '''
function generateRandomId(length) {
    let result = '';
    const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
    const charactersLength = characters.length;
    for (let i = 0; i < length; i++) {
        result += characters.charAt(Math.floor(Math.random() * charactersLength));
    }
    return result;
}

function run_callback(json) {
    ChannelCallback.postMessage(json);
}

function run_log(log) {
    ChannelLog.postMessage(log);
}''';