Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /fetch/api/headers/headers-structure.any.html - WPT Dashboard Interop Dashboard
- /fetch/api/headers/headers-structure.any.serviceworker.html - WPT Dashboard Interop Dashboard
- /fetch/api/headers/headers-structure.any.sharedworker.html - WPT Dashboard Interop Dashboard
- /fetch/api/headers/headers-structure.any.worker.html - WPT Dashboard Interop Dashboard
// META: title=Headers basic
// META: global=window,worker
"use strict";
var headers = new Headers();
var methods = ["append",
"delete",
"get",
"has",
"set",
//Headers is iterable
"entries",
"keys",
"values"
];
for (var idx in methods)
test(function() {
assert_true(methods[idx] in headers, "headers has " + methods[idx] + " method");
}, "Headers has " + methods[idx] + " method");