2014-11-21 13:56:27 +03:00
|
|
|
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* 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/.
|
|
|
|
*/
|
|
|
|
|
|
|
|
callback BrowserElementNextPaintEventCallback = void ();
|
|
|
|
|
2015-06-10 03:04:00 +03:00
|
|
|
enum BrowserFindCaseSensitivity { "case-sensitive", "case-insensitive" };
|
|
|
|
enum BrowserFindDirection { "forward", "backward" };
|
|
|
|
|
2014-11-21 13:56:27 +03:00
|
|
|
dictionary BrowserElementDownloadOptions {
|
|
|
|
DOMString? filename;
|
2015-02-24 01:11:23 +03:00
|
|
|
DOMString? referrer;
|
2014-11-21 13:56:27 +03:00
|
|
|
};
|
|
|
|
|
2015-07-16 10:56:00 +03:00
|
|
|
dictionary BrowserElementExecuteScriptOptions {
|
|
|
|
DOMString? url;
|
|
|
|
DOMString? origin;
|
|
|
|
};
|
|
|
|
|
2014-11-21 13:56:27 +03:00
|
|
|
[NoInterfaceObject]
|
|
|
|
interface BrowserElement {
|
|
|
|
};
|
|
|
|
|
|
|
|
BrowserElement implements BrowserElementCommon;
|
|
|
|
BrowserElement implements BrowserElementPrivileged;
|
|
|
|
|
|
|
|
[NoInterfaceObject]
|
|
|
|
interface BrowserElementCommon {
|
|
|
|
[Throws,
|
|
|
|
Pref="dom.mozBrowserFramesEnabled",
|
2016-04-21 16:48:59 +03:00
|
|
|
ChromeOnly]
|
2014-11-21 13:56:27 +03:00
|
|
|
void setVisible(boolean visible);
|
|
|
|
|
|
|
|
[Throws,
|
|
|
|
Pref="dom.mozBrowserFramesEnabled",
|
2016-04-21 16:48:59 +03:00
|
|
|
ChromeOnly]
|
2014-11-21 13:56:27 +03:00
|
|
|
DOMRequest getVisible();
|
|
|
|
|
|
|
|
[Throws,
|
|
|
|
Pref="dom.mozBrowserFramesEnabled",
|
2016-04-21 16:48:59 +03:00
|
|
|
ChromeOnly]
|
2014-11-21 13:56:27 +03:00
|
|
|
void setActive(boolean active);
|
|
|
|
|
|
|
|
[Throws,
|
|
|
|
Pref="dom.mozBrowserFramesEnabled",
|
2016-04-21 16:48:59 +03:00
|
|
|
ChromeOnly]
|
2014-11-21 13:56:27 +03:00
|
|
|
boolean getActive();
|
|
|
|
|
|
|
|
[Throws,
|
|
|
|
Pref="dom.mozBrowserFramesEnabled",
|
2016-04-21 16:48:59 +03:00
|
|
|
ChromeOnly]
|
2014-11-21 13:56:27 +03:00
|
|
|
void addNextPaintListener(BrowserElementNextPaintEventCallback listener);
|
|
|
|
|
|
|
|
[Throws,
|
|
|
|
Pref="dom.mozBrowserFramesEnabled",
|
2016-04-21 16:48:59 +03:00
|
|
|
ChromeOnly]
|
2014-11-21 13:56:27 +03:00
|
|
|
void removeNextPaintListener(BrowserElementNextPaintEventCallback listener);
|
|
|
|
};
|
|
|
|
|
|
|
|
[NoInterfaceObject]
|
|
|
|
interface BrowserElementPrivileged {
|
|
|
|
[Throws,
|
|
|
|
Pref="dom.mozBrowserFramesEnabled",
|
2016-04-21 16:48:59 +03:00
|
|
|
ChromeOnly]
|
2014-11-21 13:56:27 +03:00
|
|
|
void sendMouseEvent(DOMString type,
|
|
|
|
unsigned long x,
|
|
|
|
unsigned long y,
|
|
|
|
unsigned long button,
|
|
|
|
unsigned long clickCount,
|
|
|
|
unsigned long modifiers);
|
|
|
|
|
|
|
|
[Throws,
|
|
|
|
Pref="dom.mozBrowserFramesEnabled",
|
|
|
|
Func="TouchEvent::PrefEnabled",
|
2016-04-21 16:48:59 +03:00
|
|
|
ChromeOnly]
|
2014-11-21 13:56:27 +03:00
|
|
|
void sendTouchEvent(DOMString type,
|
|
|
|
sequence<unsigned long> identifiers,
|
|
|
|
sequence<long> x,
|
|
|
|
sequence<long> y,
|
|
|
|
sequence<unsigned long> rx,
|
|
|
|
sequence<unsigned long> ry,
|
|
|
|
sequence<float> rotationAngles,
|
|
|
|
sequence<float> forces,
|
|
|
|
unsigned long count,
|
|
|
|
unsigned long modifiers);
|
|
|
|
|
|
|
|
[Throws,
|
|
|
|
Pref="dom.mozBrowserFramesEnabled",
|
2016-04-21 16:48:59 +03:00
|
|
|
ChromeOnly]
|
2014-11-21 13:56:27 +03:00
|
|
|
void goBack();
|
|
|
|
|
|
|
|
[Throws,
|
|
|
|
Pref="dom.mozBrowserFramesEnabled",
|
2016-04-21 16:48:59 +03:00
|
|
|
ChromeOnly]
|
2014-11-21 13:56:27 +03:00
|
|
|
void goForward();
|
|
|
|
|
|
|
|
[Throws,
|
|
|
|
Pref="dom.mozBrowserFramesEnabled",
|
2016-04-21 16:48:59 +03:00
|
|
|
ChromeOnly]
|
2014-11-21 13:56:27 +03:00
|
|
|
void reload(optional boolean hardReload = false);
|
|
|
|
|
|
|
|
[Throws,
|
|
|
|
Pref="dom.mozBrowserFramesEnabled",
|
2016-04-21 16:48:59 +03:00
|
|
|
ChromeOnly]
|
2014-11-21 13:56:27 +03:00
|
|
|
void stop();
|
|
|
|
|
|
|
|
[Throws,
|
|
|
|
Pref="dom.mozBrowserFramesEnabled",
|
2016-04-21 16:48:59 +03:00
|
|
|
ChromeOnly]
|
2014-11-21 13:56:27 +03:00
|
|
|
DOMRequest download(DOMString url,
|
|
|
|
optional BrowserElementDownloadOptions options);
|
|
|
|
|
|
|
|
[Throws,
|
|
|
|
Pref="dom.mozBrowserFramesEnabled",
|
2016-04-21 16:48:59 +03:00
|
|
|
ChromeOnly]
|
2014-11-21 13:56:27 +03:00
|
|
|
DOMRequest purgeHistory();
|
|
|
|
|
|
|
|
[Throws,
|
|
|
|
Pref="dom.mozBrowserFramesEnabled",
|
2016-04-21 16:48:59 +03:00
|
|
|
ChromeOnly]
|
2014-11-21 13:56:27 +03:00
|
|
|
DOMRequest getScreenshot([EnforceRange] unsigned long width,
|
|
|
|
[EnforceRange] unsigned long height,
|
2014-11-21 13:56:27 +03:00
|
|
|
optional DOMString mimeType="");
|
2014-11-21 13:56:27 +03:00
|
|
|
|
|
|
|
[Throws,
|
|
|
|
Pref="dom.mozBrowserFramesEnabled",
|
2016-04-21 16:48:59 +03:00
|
|
|
ChromeOnly]
|
2014-11-21 13:56:27 +03:00
|
|
|
void zoom(float zoom);
|
|
|
|
|
|
|
|
[Throws,
|
|
|
|
Pref="dom.mozBrowserFramesEnabled",
|
2016-04-21 16:48:59 +03:00
|
|
|
ChromeOnly]
|
2014-11-21 13:56:27 +03:00
|
|
|
DOMRequest getCanGoBack();
|
|
|
|
|
|
|
|
[Throws,
|
|
|
|
Pref="dom.mozBrowserFramesEnabled",
|
2016-04-21 16:48:59 +03:00
|
|
|
ChromeOnly]
|
2014-11-21 13:56:27 +03:00
|
|
|
DOMRequest getCanGoForward();
|
|
|
|
|
|
|
|
[Throws,
|
|
|
|
Pref="dom.mozBrowserFramesEnabled",
|
2016-04-21 16:48:59 +03:00
|
|
|
ChromeOnly]
|
2014-11-21 13:56:27 +03:00
|
|
|
DOMRequest getContentDimensions();
|
|
|
|
|
2015-06-10 03:04:00 +03:00
|
|
|
[Throws,
|
|
|
|
Pref="dom.mozBrowserFramesEnabled",
|
2016-04-21 16:48:59 +03:00
|
|
|
ChromeOnly]
|
2015-06-10 03:04:00 +03:00
|
|
|
void findAll(DOMString searchString, BrowserFindCaseSensitivity caseSensitivity);
|
|
|
|
|
|
|
|
[Throws,
|
|
|
|
Pref="dom.mozBrowserFramesEnabled",
|
2016-04-21 16:48:59 +03:00
|
|
|
ChromeOnly]
|
2015-06-10 03:04:00 +03:00
|
|
|
void findNext(BrowserFindDirection direction);
|
|
|
|
|
|
|
|
[Throws,
|
|
|
|
Pref="dom.mozBrowserFramesEnabled",
|
2016-04-21 16:48:59 +03:00
|
|
|
ChromeOnly]
|
2015-06-10 03:04:00 +03:00
|
|
|
void clearMatch();
|
|
|
|
|
2015-07-16 10:56:00 +03:00
|
|
|
[Throws,
|
|
|
|
Pref="dom.mozBrowserFramesEnabled",
|
2016-04-21 16:48:59 +03:00
|
|
|
ChromeOnly]
|
2015-07-16 10:56:00 +03:00
|
|
|
DOMRequest executeScript(DOMString script,
|
|
|
|
optional BrowserElementExecuteScriptOptions options);
|
|
|
|
|
2015-11-03 05:52:00 +03:00
|
|
|
[Throws,
|
|
|
|
Pref="dom.mozBrowserFramesEnabled",
|
2016-04-21 16:48:59 +03:00
|
|
|
ChromeOnly]
|
2015-11-03 05:52:00 +03:00
|
|
|
DOMRequest getWebManifest();
|
|
|
|
|
2014-11-21 13:56:27 +03:00
|
|
|
};
|
2017-01-25 00:11:30 +03:00
|
|
|
|
|
|
|
// Bits needed for BrowserElementAudioChannel.
|
|
|
|
partial interface BrowserElementPrivileged {
|
|
|
|
[Pure, Cached, Throws,
|
|
|
|
Pref="dom.mozBrowserFramesEnabled",
|
|
|
|
ChromeOnly]
|
|
|
|
readonly attribute sequence<BrowserElementAudioChannel> allowedAudioChannels;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Mutes all audio in this browser.
|
|
|
|
*/
|
|
|
|
[Throws,
|
|
|
|
Pref="dom.mozBrowserFramesEnabled",
|
|
|
|
ChromeOnly]
|
|
|
|
void mute();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Unmutes all audio in this browser.
|
|
|
|
*/
|
|
|
|
[Throws,
|
|
|
|
Pref="dom.mozBrowserFramesEnabled",
|
|
|
|
ChromeOnly]
|
|
|
|
void unmute();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Obtains whether or not the browser is muted.
|
|
|
|
*/
|
|
|
|
[Throws,
|
|
|
|
Pref="dom.mozBrowserFramesEnabled",
|
|
|
|
ChromeOnly]
|
|
|
|
DOMRequest getMuted();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets the volume for the browser.
|
|
|
|
*/
|
|
|
|
[Throws,
|
|
|
|
Pref="dom.mozBrowserFramesEnabled",
|
|
|
|
ChromeOnly]
|
|
|
|
void setVolume(float volume);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets the volume for the browser.
|
|
|
|
*/
|
|
|
|
[Throws,
|
|
|
|
Pref="dom.mozBrowserFramesEnabled",
|
|
|
|
ChromeOnly]
|
|
|
|
DOMRequest getVolume();
|
|
|
|
};
|