From c91b0df6071639471cd41b481e7188259a3c1159 Mon Sep 17 00:00:00 2001 From: Cloudburst <18114966+C10udburst@users.noreply.github.com> Date: Tue, 28 Feb 2023 23:13:49 +0100 Subject: GMPolyfill: add header prop (#543) --- browser/GMPolyfill.js | 1 + 1 file changed, 1 insertion(+) (limited to 'browser') diff --git a/browser/GMPolyfill.js b/browser/GMPolyfill.js index 3e0606d..6f05ca0 100644 --- a/browser/GMPolyfill.js +++ b/browser/GMPolyfill.js @@ -92,6 +92,7 @@ function GM_fetch(url, opt) { resp.arrayBuffer = () => blobTo("arrayBuffer", blob); resp.text = () => blobTo("text", blob); resp.json = async () => JSON.parse(await blobTo("text", blob)); + resp.headers = new Headers(parseHeaders(resp.responseHeaders)); resolve(resp); }; options.ontimeout = () => reject("fetch timeout"); -- cgit