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/.
6 * The origins of this IDL file are
7 * http://url.spec.whatwg.org/#api
8 * https://w3c.github.io/FileAPI/#creating-revoking
10 * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
11 * liability, trademark and document use rules apply.
16 [Exposed=(Window,Worker,WorkerDebugger),
17 LegacyWindowAlias=webkitURL]
20 constructor(USVString url, optional USVString base);
22 static boolean canParse(USVString url, optional USVString base);
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;
36 readonly attribute URLSearchParams searchParams;
37 attribute USVString hash;
40 readonly attribute URI URI;
42 static URL fromURI(URI uri);
47 [Exposed=(Window,DedicatedWorker,SharedWorker)]
48 partial interface URL {
50 static DOMString createObjectURL(Blob blob);
52 static undefined revokeObjectURL(DOMString url);
54 static boolean isValidObjectURL(DOMString url);
56 // https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html
58 static DOMString createObjectURL(MediaSource source);