2018-09-13 23:04:55 +03:00
|
|
|
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-09-25 07:24:43 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
|
|
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* The origins of this IDL file are
|
2013-09-04 21:07:21 +04:00
|
|
|
* http://url.spec.whatwg.org/#api
|
2023-05-03 13:01:52 +03:00
|
|
|
* https://w3c.github.io/FileAPI/#creating-revoking
|
2012-09-25 07:24:43 +04:00
|
|
|
*
|
|
|
|
* Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
|
|
|
|
* liability, trademark and document use rules apply.
|
|
|
|
*/
|
|
|
|
|
2023-01-27 13:42:58 +03:00
|
|
|
interface URI;
|
|
|
|
|
2019-09-12 14:01:17 +03:00
|
|
|
[Exposed=(Window,Worker,WorkerDebugger),
|
2019-07-03 11:37:01 +03:00
|
|
|
LegacyWindowAlias=webkitURL]
|
2012-09-25 07:24:43 +04:00
|
|
|
interface URL {
|
2019-09-12 14:01:17 +03:00
|
|
|
[Throws]
|
2024-04-04 14:49:57 +03:00
|
|
|
constructor(UTF8String url, optional UTF8String base);
|
2019-09-12 14:01:17 +03:00
|
|
|
|
2024-03-26 12:53:30 +03:00
|
|
|
static URL? parse(UTF8String url, optional UTF8String base);
|
|
|
|
static boolean canParse(UTF8String url, optional UTF8String base);
|
2023-06-01 09:30:22 +03:00
|
|
|
|
2018-04-14 02:06:35 +03:00
|
|
|
[SetterThrows]
|
2024-04-04 14:49:57 +03:00
|
|
|
stringifier attribute UTF8String href;
|
|
|
|
readonly attribute UTF8String origin;
|
|
|
|
attribute UTF8String protocol;
|
|
|
|
attribute UTF8String username;
|
|
|
|
attribute UTF8String password;
|
|
|
|
attribute UTF8String host;
|
|
|
|
attribute UTF8String hostname;
|
|
|
|
attribute UTF8String port;
|
|
|
|
attribute UTF8String pathname;
|
|
|
|
attribute UTF8String search;
|
2018-04-14 02:06:35 +03:00
|
|
|
[SameObject]
|
|
|
|
readonly attribute URLSearchParams searchParams;
|
2024-04-04 14:49:57 +03:00
|
|
|
attribute UTF8String hash;
|
2017-02-09 15:18:40 +03:00
|
|
|
|
2023-01-27 13:42:58 +03:00
|
|
|
[ChromeOnly]
|
|
|
|
readonly attribute URI URI;
|
|
|
|
[ChromeOnly]
|
|
|
|
static URL fromURI(URI uri);
|
|
|
|
|
2024-04-04 14:49:57 +03:00
|
|
|
UTF8String toJSON();
|
2013-09-04 21:07:21 +04:00
|
|
|
};
|
|
|
|
|
2018-08-07 14:48:51 +03:00
|
|
|
[Exposed=(Window,DedicatedWorker,SharedWorker)]
|
2013-09-04 21:07:21 +04:00
|
|
|
partial interface URL {
|
2012-09-25 07:24:43 +04:00
|
|
|
[Throws]
|
2024-04-04 14:49:57 +03:00
|
|
|
static UTF8String createObjectURL(Blob blob);
|
2012-09-25 07:24:45 +04:00
|
|
|
[Throws]
|
2024-04-04 14:49:57 +03:00
|
|
|
static undefined revokeObjectURL(UTF8String url);
|
2016-07-25 13:41:52 +03:00
|
|
|
[ChromeOnly, Throws]
|
2024-04-04 14:49:57 +03:00
|
|
|
static boolean isValidObjectURL(UTF8String url);
|
2012-09-25 07:24:43 +04:00
|
|
|
|
2018-08-07 14:48:51 +03:00
|
|
|
// https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html
|
2013-06-21 07:15:15 +04:00
|
|
|
[Throws]
|
2024-04-04 14:49:57 +03:00
|
|
|
static UTF8String createObjectURL(MediaSource source);
|
2013-06-21 07:15:15 +04:00
|
|
|
};
|