Bug 1671598 [wpt PR 26128] - [AspectRatio] Fix divide by zero with a small float...
[gecko.git] / dom / webidl / Headers.webidl
blobc492cb3c35eece1f9d7faee2c16990ceb16314df
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/.
6  *
7  * The origin of this IDL file is
8  * http://fetch.spec.whatwg.org/#headers-class
9  */
11 typedef (sequence<sequence<ByteString>> or record<ByteString, ByteString>) HeadersInit;
13 enum HeadersGuardEnum {
14   "none",
15   "request",
16   "request-no-cors",
17   "response",
18   "immutable"
21 [Exposed=(Window,Worker)]
22 interface Headers {
23   [Throws]
24   constructor(optional HeadersInit init);
26   [Throws] void append(ByteString name, ByteString value);
27   [Throws] void delete(ByteString name);
28   [Throws] ByteString? get(ByteString name);
29   [Throws] boolean has(ByteString name);
30   [Throws] void set(ByteString name, ByteString value);
31   iterable<ByteString, ByteString>;
33   // Used to test different guard states from mochitest.
34   // Note: Must be set prior to populating headers or will throw.
35   [ChromeOnly, SetterThrows] attribute HeadersGuardEnum guard;