Implement URL and trivially missing URLUtils members

Fixes #6322.
This commit is contained in:
Anthony Ramine 2015-06-13 21:49:49 +02:00
parent e7808c526c
commit a8e4558e82
26 changed files with 310 additions and 956 deletions

View file

@ -0,0 +1,12 @@
/* 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://url.spec.whatwg.org/#url
[Constructor(USVString url, optional USVString base)/*,
Exposed=(Window,Worker)*/]
interface URL {
static USVString domainToASCII(USVString domain);
// static USVString domainToUnicode(USVString domain);
};
URL implements URLUtils;

View file

@ -10,11 +10,17 @@ interface URLUtils {
readonly attribute USVString href;
//readonly attribute USVString origin;
// attribute USVString protocol;
readonly attribute USVString protocol;
// attribute USVString username;
readonly attribute USVString username;
// attribute USVString password;
readonly attribute USVString password;
// attribute USVString host;
readonly attribute USVString host;
// attribute USVString hostname;
readonly attribute USVString hostname;
// attribute USVString port;
readonly attribute USVString port;
// attribute USVString pathname;
readonly attribute USVString pathname;
// attribute USVString search;

View file

@ -11,11 +11,15 @@ interface URLUtilsReadOnly {
readonly attribute USVString href;
//readonly attribute USVString origin;
//readonly attribute USVString protocol;
//readonly attribute USVString host;
//readonly attribute USVString hostname;
//readonly attribute USVString port;
//readonly attribute USVString pathname;
readonly attribute USVString protocol;
readonly attribute USVString host;
readonly attribute USVString hostname;
readonly attribute USVString port;
readonly attribute USVString pathname;
readonly attribute USVString search;
readonly attribute USVString hash;
// This is only doing as well as gecko right now, bug 824857 is on file for
// adding attribute stringifier support.
stringifier;
};