Skip to content

armgit / moli

Public Imported from GitHub
0

Best headless browser for AI agents. Lite, Fast, High-Compatibility. Built in Rust

552 B
Raw Blame
self.onmessage = function(evt) {
    if (evt.data.operation == 'find-edges' &&
        ArrayBuffer.prototype.isPrototypeOf(evt.data.input) &&
        evt.data.input.byteLength == 20 &&
        evt.data.threshold == 0.6) {
        self.postMessage("PASS: Worker receives correct structure message.");
        self.postMessage({
            operation: evt.data.operation,
            input: evt.data.input,
            threshold: evt.data.threshold
        });
    }
    else
        self.postMessage("FAIL: Worker receives error structure message.");
}