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(UTF8String url, optional UTF8String base);
22 static URL? parse(UTF8String url, optional UTF8String base);
23 static boolean canParse(UTF8String url, optional UTF8String base);
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;
37 readonly attribute URLSearchParams searchParams;
38 attribute UTF8String hash;
41 readonly attribute URI URI;
43 static URL fromURI(URI uri);
48 [Exposed=(Window,DedicatedWorker,SharedWorker)]
49 partial interface URL {
51 static UTF8String createObjectURL(Blob blob);
53 static undefined revokeObjectURL(UTF8String url);
55 static boolean isValidObjectURL(UTF8String url);
57 // https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html
59 static UTF8String createObjectURL(MediaSource source);