gecko-dev/dom/workers/test/WorkerDebuggerGlobalScope.c...

10 строки
154 B
JavaScript

"use strict";
self.addEventListener("message", function(event) {
switch (event.data) {
case "ping":
self.postMessage("pong");
break;
}
});