Bug 1085297 - URLSearchParams, URLUtils and URLUtilsReadOnly should use USVStrings instead DOMStrings, r=smaug

This commit is contained in:
Andrea Marchesini 2014-10-20 15:20:07 +01:00
parent 884a995270
commit 27d5535da3
3 changed files with 29 additions and 28 deletions

View File

@ -13,15 +13,16 @@
* http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0.
*/
[Constructor(optional DOMString init = ""),
[Constructor(optional ScalarValueString init = ""),
Constructor(URLSearchParams init),
Exposed=(Window,Worker)]
interface URLSearchParams {
void append(DOMString name, DOMString value);
void delete(DOMString name);
DOMString? get(DOMString name);
sequence<DOMString> getAll(DOMString name);
boolean has(DOMString name);
void set(DOMString name, DOMString value);
void append(ScalarValueString name, ScalarValueString value);
void delete(ScalarValueString name);
ScalarValueString? get(ScalarValueString name);
sequence<ScalarValueString> getAll(ScalarValueString name);
boolean has(ScalarValueString name);
void set(ScalarValueString name, ScalarValueString value);
// iterable<ScalarValueString, ScalarValueString>; - Bug 1085284
stringifier;
};

View File

@ -17,33 +17,33 @@
Exposed=(Window, Worker)]
interface URLUtils {
// Bug 824857: no support for stringifier attributes yet.
// stringifier attribute DOMString href;
// stringifier attribute ScalarValueString href;
[Throws, CrossOriginWritable=Location]
attribute DOMString href;
attribute ScalarValueString href;
[Throws]
readonly attribute DOMString origin;
readonly attribute ScalarValueString origin;
[Throws]
attribute DOMString protocol;
attribute ScalarValueString protocol;
[Throws]
attribute DOMString username;
attribute ScalarValueString username;
[Throws]
attribute DOMString password;
attribute ScalarValueString password;
[Throws]
attribute DOMString host;
attribute ScalarValueString host;
[Throws]
attribute DOMString hostname;
attribute ScalarValueString hostname;
[Throws]
attribute DOMString port;
attribute ScalarValueString port;
[Throws]
attribute DOMString pathname;
attribute ScalarValueString pathname;
[Throws]
attribute DOMString search;
attribute ScalarValueString search;
attribute URLSearchParams searchParams;
[Throws]
attribute DOMString hash;
attribute ScalarValueString hash;
// Bug 824857 should remove this.
[Throws]

View File

@ -17,14 +17,14 @@
Exposed=(Window, Worker)]
interface URLUtilsReadOnly {
stringifier;
readonly attribute DOMString href;
readonly attribute ScalarValueString href;
readonly attribute DOMString protocol;
readonly attribute DOMString host;
readonly attribute DOMString hostname;
readonly attribute DOMString port;
readonly attribute DOMString pathname;
readonly attribute DOMString search;
readonly attribute DOMString hash;
readonly attribute DOMString origin;
readonly attribute ScalarValueString protocol;
readonly attribute ScalarValueString host;
readonly attribute ScalarValueString hostname;
readonly attribute ScalarValueString port;
readonly attribute ScalarValueString pathname;
readonly attribute ScalarValueString search;
readonly attribute ScalarValueString hash;
readonly attribute ScalarValueString origin;
};