Bug 1852740: add tests for the `fetchpriority` attribute in Link headers. r=necko...
[gecko.git] / dom / webidl / URL.webidl
blob9cdd7f7aac6b0fb81d33909fd7eb879da48a0b60
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
4  * You can obtain one at http://mozilla.org/MPL/2.0/.
5  *
6  * The origins of this IDL file are
7  * http://url.spec.whatwg.org/#api
8  * https://w3c.github.io/FileAPI/#creating-revoking
9  *
10  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
11  * liability, trademark and document use rules apply.
12  */
14 interface URI;
16 [Exposed=(Window,Worker,WorkerDebugger),
17  LegacyWindowAlias=webkitURL]
18 interface URL {
19   [Throws]
20   constructor(USVString url, optional USVString base);
22   static boolean canParse(USVString url, optional USVString base);
24   [SetterThrows]
25   stringifier attribute USVString href;
26   readonly attribute USVString origin;
27            attribute USVString protocol;
28            attribute USVString username;
29            attribute USVString password;
30            attribute USVString host;
31            attribute USVString hostname;
32            attribute USVString port;
33            attribute USVString pathname;
34            attribute USVString search;
35   [SameObject]
36   readonly attribute URLSearchParams searchParams;
37            attribute USVString hash;
39   [ChromeOnly]
40   readonly attribute URI URI;
41   [ChromeOnly]
42   static URL fromURI(URI uri);
44   USVString toJSON();
47 [Exposed=(Window,DedicatedWorker,SharedWorker)]
48 partial interface URL {
49   [Throws]
50   static DOMString createObjectURL(Blob blob);
51   [Throws]
52   static undefined revokeObjectURL(DOMString url);
53   [ChromeOnly, Throws]
54   static boolean isValidObjectURL(DOMString url);
56   // https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html
57   [Throws]
58   static DOMString createObjectURL(MediaSource source);