Backout a74bd5095902, Bug 959405 - Please update the Buri Moz-central, 1.3, 1.2 with...
[gecko.git] / dom / webidl / URL.webidl
blob66e8f4b296cb5e32020df664d508b6aa06b5be5c
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  * http://dev.w3.org/2006/webapi/FileAPI/#creating-revoking
9  * http://dev.w3.org/2011/webrtc/editor/getusermedia.html#url
10  *
11  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
12  * liability, trademark and document use rules apply.
13  */
15 // [Constructor(DOMString url, optional (URL or DOMString) base = "about:blank")]
16 [Constructor(DOMString url, URL base),
17  Constructor(DOMString url, optional DOMString base = "about:blank")]
18 interface URL {
20 URL implements URLUtils;
22 partial interface URL {
23   [Throws]
24   static DOMString? createObjectURL(Blob blob, optional objectURLOptions options);
25   [Throws]
26   static DOMString? createObjectURL(MediaStream stream, optional objectURLOptions options);
27   static void revokeObjectURL(DOMString url);
30 dictionary objectURLOptions
32 /* boolean autoRevoke = true; */ /* not supported yet */
35 // https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html
36 partial interface URL {
37   [Throws]
38   static DOMString? createObjectURL(MediaSource source, optional objectURLOptions options);