summaryrefslogtreecommitdiffstats
path: root/netwerk/test/browser/early_hint_pixel_count.sjs
blob: b59dd035de573acff8c51e7ef37937c195dd6737 (plain)
1
2
3
4
5
6
7
8
9
"use strict";

function handleRequest(request, response) {
  if (request.hasHeader("X-Early-Hint-Count-Start")) {
    setSharedState("earlyHintCount", JSON.stringify({ hinted: 0, normal: 0 }));
  }
  response.setHeader("Content-Type", "application/json", false);
  response.write(getSharedState("earlyHintCount"));
}