1 /* -*- Mode: IDL; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 * The origin of this IDL file is
8 * http://fetch.spec.whatwg.org/#headers-class
11 typedef (sequence<sequence<ByteString>> or record<ByteString, ByteString>) HeadersInit;
13 enum HeadersGuardEnum {
21 [Exposed=(Window,Worker)]
24 constructor(optional HeadersInit init);
26 [Throws] undefined append(ByteString name, ByteString value);
27 [Throws] undefined delete(ByteString name);
28 [Throws] ByteString? get(ByteString name);
29 sequence<ByteString> getSetCookie();
30 [Throws] boolean has(ByteString name);
31 [Throws] undefined set(ByteString name, ByteString value);
32 iterable<ByteString, ByteString>;
34 // Used to test different guard states from mochitest.
35 // Note: Must be set prior to populating headers or will throw.
36 [ChromeOnly, SetterThrows] attribute HeadersGuardEnum guard;