Backed out 2 changesets (bug 1908320) for causing wr failures on align-items-baseline...
[gecko.git] / dom / webidl / URL.webidl
blob1f1d709b08180270fa3787805b349a6e6a5e9fe4
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(UTF8String url, optional UTF8String base);
22   static URL? parse(UTF8String url, optional UTF8String base);
23   static boolean canParse(UTF8String url, optional UTF8String base);
25   [SetterThrows]
26   stringifier attribute UTF8String href;
27   readonly attribute UTF8String origin;
28            attribute UTF8String protocol;
29            attribute UTF8String username;
30            attribute UTF8String password;
31            attribute UTF8String host;
32            attribute UTF8String hostname;
33            attribute UTF8String port;
34            attribute UTF8String pathname;
35            attribute UTF8String search;
36   [SameObject]
37   readonly attribute URLSearchParams searchParams;
38            attribute UTF8String hash;
40   [ChromeOnly]
41   readonly attribute URI URI;
42   [ChromeOnly]
43   static URL fromURI(URI uri);
45   UTF8String toJSON();
48 [Exposed=(Window,DedicatedWorker,SharedWorker)]
49 partial interface URL {
50   [Throws]
51   static UTF8String createObjectURL(Blob blob);
52   [Throws]
53   static undefined revokeObjectURL(UTF8String url);
54   [ChromeOnly, Throws]
55   static boolean isValidObjectURL(UTF8String url);
57   // https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html
58   [Throws]
59   static UTF8String createObjectURL(MediaSource source);