servo/components/script/dom/webidls/Headers.webidl
Jeena Lee e3624edbf6 Implement iterable for Headers.
This commit implements iterable in DOM Headers based on iterable
implementation from #12819. Expected wpt results are updated as well.
2016-08-24 13:12:35 -07:00

24 lines
747 B
Text

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://fetch.spec.whatwg.org/#headers-class
// TODO support OpenEndedDictionary<ByteString>
typedef (Headers or sequence<sequence<ByteString>>) HeadersInit;
[Constructor(optional HeadersInit init),
Exposed=(Window,Worker)]
interface Headers {
[Throws]
void append(ByteString name, ByteString value);
[Throws]
void delete(ByteString name);
[Throws]
ByteString? get(ByteString name);
[Throws]
boolean has(ByteString name);
[Throws]
void set(ByteString name, ByteString value);
iterable<ByteString, ByteString>;
};