Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /fetch/api/response/response-headers-guard.any.html - WPT Dashboard Interop Dashboard
- /fetch/api/response/response-headers-guard.any.serviceworker.html - WPT Dashboard Interop Dashboard
- /fetch/api/response/response-headers-guard.any.sharedworker.html - WPT Dashboard Interop Dashboard
- /fetch/api/response/response-headers-guard.any.worker.html - WPT Dashboard Interop Dashboard
// META: global=window,worker
// META: title=Response: error static method
promise_test (async () => {
const response = await fetch("../resources/data.json");
assert_throws_js(TypeError, () => { response.headers.append("name", "value"); });
assert_not_equals(response.headers.get("name"), "value", "response headers should be immutable");
}, "Ensure response headers are immutable");