blob: 81cd98243b4d6d21977da64d8fa858747b6ddbe3 [file] [log] [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.");
}