This is very confusing as seen in #12974 or #12906. My suggestion would be "legacy."
static setup(handler, port) {
    var testMessageProcessed = false;
    handler.on("test", function wphSetupTest(data) {
      if (testMessageProcessed) {
        return; 
      }
      testMessageProcessed = true;
      
      if (!(data instanceof Uint8Array)) {
        handler.send("test", null);
        return;
      }
      
      const supportTransfers = data[0] === 255;
      handler.postMessageTransfers = supportTransfers;
      handler.send("test", { supportTransfers });
    });
    handler.on("configure", function wphConfigure(data) {
      setVerbosityLevel(data.verbosity);
    });
    handler.on("GetDocRequest", function wphSetupDoc(data) {
      return WorkerMessageHandler.createDocumentHandler(data, port);
    });
  }
  static createDocumentHandler(docParams, port) {