Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(207)

Side by Side Diff: Source/modules/serviceworkers/Headers.idl

Issue 358573002: [ServiceWorker] Implement Headers class. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // http://fetch.spec.whatwg.org/#headers-class 5 // http://fetch.spec.whatwg.org/#headers-class
6 // FIXME: Fetch spec has renamed this to just 'Headers'
7 // FIXME: This should be defined as MapClass(DOMString, DOMString)
8 // once binding code supports it (http://crbug.com/347435).
9 [ 6 [
10 Constructor, 7 Constructor,
8 Constructor(Headers input),
9 Constructor(Dictionary input),
11 RuntimeEnabled=ServiceWorker, 10 RuntimeEnabled=ServiceWorker,
12 Exposed=ServiceWorker 11 Exposed=ServiceWorker,
13 ] interface HeaderMap { 12 RaisesException=Constructor
13 ] interface Headers {
14 [RaisesException] void append(ByteString name, ByteString value);
15 [ImplementedAs=remove, RaisesException] void delete(ByteString key);
16 [TreatReturnedNullStringAs=Null, RaisesException] ByteString? get(ByteString key);
17 [RaisesException] sequence<ByteString> getAll(ByteString name);
18 [RaisesException] boolean has(ByteString key);
19 [RaisesException] void set(ByteString key, ByteString value);
20
21 // The followings are not defined in the spec yet.
falken 2014/06/27 02:08:06 grammar nit: "following"
horo 2014/06/27 04:19:10 Done.
22 // https://www.w3.org/Bugs/Public/show_bug.cgi?id=26102
14 readonly attribute unsigned long size; 23 readonly attribute unsigned long size;
15 24 void forEach(HeadersForEachCallback callback, optional any thisArg);
16 // FIXME: Define keys, values, entries.
17 // FIXME: Some of the method definitions (like set) don't strictly
18 // follow the MapClass's ones (http://heycam.github.io/webidl/#MapClass),
19 // as this is supposed to be a transient implementation until we have real
20 // MapClass.
21
22 void clear();
23 [ImplementedAs=remove] boolean delete(DOMString key);
24 DOMString get(DOMString key);
25 boolean has(DOMString key);
26 void set(DOMString key, DOMString value);
27 void forEach(HeaderMapForEachCallback callback, optional any thisArg);
28 }; 25 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698