summaryrefslogtreecommitdiff
path: root/content/handlers/javascript/WebIDL/urlutils.idl
blob: e79d4ad427bba9b290faaf0d15cb7c940f717513 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
// Retrived from https://url.spec.whatwg.org
// Tue Aug 11 12:11:31 BST 2015
// Removed duplicate IDL from appendix

[Constructor(USVString url, optional USVString base),
 Exposed=(Window,Worker)]
interface URL {
  static USVString domainToASCII(USVString domain);
  static USVString domainToUnicode(USVString domain);
};
URL implements URLUtils;
URL implements URLUtilsSearchParams;

[NoInterfaceObject,
 Exposed=(Window,Worker)]
interface URLUtils {
  stringifier attribute USVString href;
  readonly attribute USVString origin;

           attribute USVString protocol;
           attribute USVString username;
           attribute USVString password;
           attribute USVString host;
           attribute USVString hostname;
           attribute USVString port;
           attribute USVString pathname;
           attribute USVString search;
           attribute USVString hash;
};

[NoInterfaceObject,
 Exposed=(Window, Worker)]
interface URLUtilsSearchParams {
           attribute URLSearchParams searchParams;
};

[NoInterfaceObject,
 Exposed=(Window,Worker)]
interface URLUtilsReadOnly {
  stringifier 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 search;
  readonly attribute USVString hash;
};

[Constructor(optional (USVString or URLSearchParams) init = ""),
 Exposed=(Window,Worker)]
interface URLSearchParams {
  void append(USVString name, USVString value);
  void delete(USVString name);
  USVString? get(USVString name);
  sequence<USVString> getAll(USVString name);
  boolean has(USVString name);
  void set(USVString name, USVString value);
  iterable<USVString, USVString>;
  stringifier;
};