mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-07-30 19:41:56 +00:00
web-sys: Remove a bunch of non-standard, Mozilla-specific Web IDL
This commit is contained in:
273
crates/web-sys/webidls/enabled/Window.webidl
vendored
273
crates/web-sys/webidls/enabled/Window.webidl
vendored
@@ -230,137 +230,6 @@ interface SpeechSynthesisGetter {
|
||||
Window implements SpeechSynthesisGetter;
|
||||
//#endif
|
||||
|
||||
// Mozilla-specific stuff
|
||||
partial interface Window {
|
||||
//[NewObject, Throws] CSSStyleDeclaration getDefaultComputedStyle(Element elt, optional DOMString pseudoElt = "");
|
||||
[NewObject, Throws] CSSStyleDeclaration? getDefaultComputedStyle(Element elt, optional DOMString pseudoElt = "");
|
||||
|
||||
// Mozilla extensions
|
||||
/**
|
||||
* Method for scrolling this window by a number of lines.
|
||||
*/
|
||||
void scrollByLines(long numLines, optional ScrollOptions options);
|
||||
|
||||
/**
|
||||
* Method for scrolling this window by a number of pages.
|
||||
*/
|
||||
void scrollByPages(long numPages, optional ScrollOptions options);
|
||||
|
||||
/**
|
||||
* Method for sizing this window to the content in the window.
|
||||
*/
|
||||
[Throws, NeedsCallerType] void sizeToContent();
|
||||
|
||||
// XXX Shouldn't this be in nsIDOMChromeWindow?
|
||||
[ChromeOnly, Replaceable, Throws] readonly attribute XULControllers controllers;
|
||||
|
||||
[ChromeOnly, Throws] readonly attribute Element? realFrameElement;
|
||||
|
||||
[Throws, NeedsCallerType]
|
||||
readonly attribute float mozInnerScreenX;
|
||||
[Throws, NeedsCallerType]
|
||||
readonly attribute float mozInnerScreenY;
|
||||
[Replaceable, Throws, NeedsCallerType]
|
||||
readonly attribute double devicePixelRatio;
|
||||
|
||||
/* The maximum offset that the window can be scrolled to
|
||||
(i.e., the document width/height minus the scrollport width/height) */
|
||||
[ChromeOnly, Throws] readonly attribute long scrollMinX;
|
||||
[ChromeOnly, Throws] readonly attribute long scrollMinY;
|
||||
[Replaceable, Throws] readonly attribute long scrollMaxX;
|
||||
[Replaceable, Throws] readonly attribute long scrollMaxY;
|
||||
|
||||
[Throws] attribute boolean fullScreen;
|
||||
|
||||
[Throws, ChromeOnly] void back();
|
||||
[Throws, ChromeOnly] void forward();
|
||||
[Throws, ChromeOnly, NeedsSubjectPrincipal] void home();
|
||||
|
||||
// XXX Should this be in nsIDOMChromeWindow?
|
||||
void updateCommands(DOMString action,
|
||||
optional Selection? sel = null,
|
||||
optional short reason = 0);
|
||||
|
||||
/* Find in page.
|
||||
* @param str: the search pattern
|
||||
* @param caseSensitive: is the search caseSensitive
|
||||
* @param backwards: should we search backwards
|
||||
* @param wrapAround: should we wrap the search
|
||||
* @param wholeWord: should we search only for whole words
|
||||
* @param searchInFrames: should we search through all frames
|
||||
* @param showDialog: should we show the Find dialog
|
||||
*/
|
||||
[Throws] boolean find(optional DOMString str = "",
|
||||
optional boolean caseSensitive = false,
|
||||
optional boolean backwards = false,
|
||||
optional boolean wrapAround = false,
|
||||
optional boolean wholeWord = false,
|
||||
optional boolean searchInFrames = false,
|
||||
optional boolean showDialog = false);
|
||||
|
||||
/**
|
||||
* Returns the number of times this document for this window has
|
||||
* been painted to the screen.
|
||||
*/
|
||||
[Throws] readonly attribute unsigned long long mozPaintCount;
|
||||
|
||||
attribute EventHandler ondevicemotion;
|
||||
attribute EventHandler ondeviceorientation;
|
||||
attribute EventHandler onabsolutedeviceorientation;
|
||||
attribute EventHandler ondeviceproximity;
|
||||
attribute EventHandler onuserproximity;
|
||||
attribute EventHandler ondevicelight;
|
||||
|
||||
void dump(DOMString str);
|
||||
|
||||
/**
|
||||
* This method is here for backwards compatibility with 4.x only,
|
||||
* its implementation is a no-op
|
||||
*/
|
||||
void setResizable(boolean resizable);
|
||||
|
||||
/**
|
||||
* This is the scriptable version of
|
||||
* nsIDOMWindow::openDialog() that takes 3 optional
|
||||
* arguments, plus any additional arguments are passed on as
|
||||
* arguments on the dialog's window object (window.arguments).
|
||||
*/
|
||||
[Throws, ChromeOnly] WindowProxy? openDialog(optional DOMString url = "",
|
||||
optional DOMString name = "",
|
||||
optional DOMString options = "",
|
||||
any... extraArguments);
|
||||
|
||||
[
|
||||
//#ifdef NIGHTLY_BUILD
|
||||
// ChromeOnly,
|
||||
//#endif
|
||||
NonEnumerable, Replaceable, Throws, NeedsCallerType]
|
||||
readonly attribute object? content;
|
||||
|
||||
[Throws, ChromeOnly] any getInterface(IID iid);
|
||||
|
||||
/**
|
||||
* Same as nsIDOMWindow.windowRoot, useful for event listener targeting.
|
||||
*/
|
||||
[ChromeOnly, Throws]
|
||||
readonly attribute WindowRoot? windowRoot;
|
||||
|
||||
/**
|
||||
* ChromeOnly method to determine if a particular window should see console
|
||||
* reports from service workers of the given scope.
|
||||
*/
|
||||
[ChromeOnly]
|
||||
boolean shouldReportForServiceWorkerScope(USVString aScope);
|
||||
|
||||
/**
|
||||
* InstallTrigger is used for extension installs. Ideally it would
|
||||
* be something like a WebIDL namespace, but we don't support
|
||||
* JS-implemented static things yet. See bug 863952.
|
||||
*/
|
||||
[Replaceable]
|
||||
readonly attribute InstallTriggerImpl? InstallTrigger;
|
||||
};
|
||||
|
||||
Window implements TouchEventHandlers;
|
||||
|
||||
Window implements OnErrorEventHandlerForWindow;
|
||||
@@ -384,121 +253,6 @@ partial interface Window {
|
||||
|
||||
callback PromiseDocumentFlushedCallback = any ();
|
||||
|
||||
// Mozilla extensions for Chrome windows.
|
||||
partial interface Window {
|
||||
// The STATE_* constants need to match the corresponding enum in nsGlobalWindow.cpp.
|
||||
[Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
|
||||
const unsigned short STATE_MAXIMIZED = 1;
|
||||
[Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
|
||||
const unsigned short STATE_MINIMIZED = 2;
|
||||
[Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
|
||||
const unsigned short STATE_NORMAL = 3;
|
||||
[Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
|
||||
const unsigned short STATE_FULLSCREEN = 4;
|
||||
|
||||
[Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
|
||||
readonly attribute unsigned short windowState;
|
||||
|
||||
[Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
|
||||
readonly attribute boolean isFullyOccluded;
|
||||
|
||||
/**
|
||||
* browserDOMWindow provides access to yet another layer of
|
||||
* utility functions implemented by chrome script. It will be null
|
||||
* for DOMWindows not corresponding to browsers.
|
||||
*/
|
||||
[Throws, Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
|
||||
attribute nsIBrowserDOMWindow? browserDOMWindow;
|
||||
|
||||
[Throws, Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
|
||||
void getAttention();
|
||||
|
||||
[Throws, Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
|
||||
void getAttentionWithCycleCount(long aCycleCount);
|
||||
|
||||
[Throws, Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
|
||||
void setCursor(DOMString cursor);
|
||||
|
||||
[Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
|
||||
void maximize();
|
||||
[Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
|
||||
void minimize();
|
||||
[Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
|
||||
void restore();
|
||||
|
||||
/**
|
||||
* Notify a default button is loaded on a dialog or a wizard.
|
||||
* defaultButton is the default button.
|
||||
*/
|
||||
[Throws, Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
|
||||
void notifyDefaultButtonLoaded(Element defaultButton);
|
||||
|
||||
[Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
|
||||
readonly attribute ChromeMessageBroadcaster messageManager;
|
||||
|
||||
/**
|
||||
* Returns the message manager identified by the given group name that
|
||||
* manages all frame loaders belonging to that group.
|
||||
*/
|
||||
[Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
|
||||
ChromeMessageBroadcaster getGroupMessageManager(DOMString aGroup);
|
||||
|
||||
/**
|
||||
* On some operating systems, we must allow the window manager to
|
||||
* handle window dragging. This function tells the window manager to
|
||||
* start dragging the window. This function will fail unless called
|
||||
* while the left mouse button is held down, callers must check this.
|
||||
*
|
||||
* Throws NS_ERROR_NOT_IMPLEMENTED if the OS doesn't support this.
|
||||
*/
|
||||
[Throws, Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
|
||||
void beginWindowMove(Event mouseDownEvent);
|
||||
|
||||
/**
|
||||
* Calls the given function as soon as a style or layout flush for the
|
||||
* top-level document is not necessary, and returns a Promise which
|
||||
* resolves to the callback's return value after it executes.
|
||||
*
|
||||
* In the event that the window goes away before a flush can occur, the
|
||||
* callback will still be called and the Promise resolved as the window
|
||||
* tears itself down.
|
||||
*
|
||||
* Note that the callback can be called either synchronously or asynchronously
|
||||
* depending on whether or not flushes are pending:
|
||||
*
|
||||
* The callback will be called synchronously when calling
|
||||
* promiseDocumentFlushed when NO flushes are already pending. This is
|
||||
* to ensure that no script has a chance to dirty the DOM before the callback
|
||||
* is called.
|
||||
*
|
||||
* The callback will be called asynchronously if a flush is pending.
|
||||
*
|
||||
* The expected execution order is that all pending callbacks will
|
||||
* be fired first (and in the order that they were queued) and then the
|
||||
* Promise resolution handlers will all be invoked later on during the
|
||||
* next microtask checkpoint.
|
||||
*
|
||||
* promiseDocumentFlushed does not support re-entrancy - so calling it from
|
||||
* within a promiseDocumentFlushed callback will result in the inner call
|
||||
* throwing an NS_ERROR_FAILURE exception, and the outer Promise rejecting
|
||||
* with that exception.
|
||||
*
|
||||
* The callback function *must not make any changes which would require
|
||||
* a style or layout flush*.
|
||||
*
|
||||
* Also throws NS_ERROR_FAILURE if the window is not in a state where flushes
|
||||
* can be waited for (for example, the PresShell has not yet been created).
|
||||
*
|
||||
* @param {function} callback
|
||||
* @returns {Promise}
|
||||
*/
|
||||
[Throws, Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
|
||||
Promise<any> promiseDocumentFlushed(PromiseDocumentFlushedCallback callback);
|
||||
|
||||
[Func="IsChromeOrXBL"]
|
||||
readonly attribute boolean isChromeWindow;
|
||||
};
|
||||
|
||||
partial interface Window {
|
||||
[Pref="dom.vr.enabled"]
|
||||
attribute EventHandler onvrdisplayconnect;
|
||||
@@ -534,31 +288,4 @@ dictionary IdleRequestOptions {
|
||||
|
||||
callback IdleRequestCallback = void (IdleDeadline deadline);
|
||||
|
||||
partial interface Window {
|
||||
/**
|
||||
* Returns a list of locales that the internationalization components
|
||||
* should be localized to.
|
||||
*
|
||||
* The function name refers to Regional Preferences which can be either
|
||||
* fetched from the internal internationalization database (CLDR), or
|
||||
* from the host environment.
|
||||
*
|
||||
* The result is a sorted list of valid locale IDs and it should be
|
||||
* used for all APIs that accept list of locales, like ECMA402 and L10n APIs.
|
||||
*
|
||||
* This API always returns at least one locale.
|
||||
*
|
||||
* Example: ["en-US", "de", "pl", "sr-Cyrl", "zh-Hans-HK"]
|
||||
*/
|
||||
[Func="IsChromeOrXBL"]
|
||||
sequence<DOMString> getRegionalPrefsLocales();
|
||||
|
||||
/**
|
||||
* Getter funcion for IntlUtils, which provides helper functions for
|
||||
* localization.
|
||||
*/
|
||||
[Throws, Func="IsChromeOrXBL"]
|
||||
readonly attribute IntlUtils intlUtils;
|
||||
};
|
||||
|
||||
Window implements WebGPUProvider;
|
||||
|
Reference in New Issue
Block a user