/* * This software has been developed by TIXEO. * * Copyright (c) 2004-2024 TIXE - All Rights Reserved. * * COPYRIGHT: * This file is the property of TIXEO. * It can not be used, modified, copied without the explicit written * authorization from a mandated member of TIXEO. * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * WARRANTY: * This software is provided "AS IS" and any express or implied warranties, * including, but not limited to, the implied warranties of merchantability and * fitness for a particular purpose are disclaimed. In no no event shall copyright * holders be liable for any direct, indirect, incidental, special, exemplary * or consequential damages (including, but not limited to, procurement of * substitute goods or services; loss of use, data, or profits; or business * interruption) however caused and on any theory of liability, whether in * contract, strict liability, or tort (including negligence or otherwise) * arising in any way out of the use of this software, even if advised or the * possibility of such damage. * * SOURCE : https://github.com/othree/webidl.git * WEBIDL LISTING : * AbortController * AbortSignal * AbstractRange * AbstractWorker * AccessibleNode * AddonEvent * AddonManager * AnalyserNode * Animatable * Animation * AnimationEffect * AnimationEvent * AnimationFrameProvider * AnimationPlaybackEvent * AnimationTimeline * AnonymousContent * AppInfo * AppNotificationServiceOptions * APZTestData * ARIAMixin * Attr * AudioBuffer * AudioBufferSourceNode * AudioContext * AudioData * AudioDecoder * AudioDestinationNode * AudioEncoder * AudioListener * AudioNode * AudioParam * AudioParamDescriptor * AudioParamMap * AudioProcessingEvent * AudioScheduledSourceNode * AudioTrack * AudioTrackList * AudioWorklet * AudioWorkletGlobalScope * AudioWorkletNode * AudioWorkletProcessor * AutocompleteInfo * BarProp * BaseAudioContext * BaseKeyframeTypes * BasicCardPayment * BatteryManager * BeforeUnloadEvent * BiquadFilterNode * Blob * BlobEvent * BroadcastChannel * BrowserElementDictionaries * Cache * CacheStorage * CancelContentJSOptions * CanvasCaptureMediaStream * CanvasRenderingContext2D * CaretPosition * CaretStateChangedEvent * CDATASection * ChannelMergerNode * ChannelSplitterNode * CharacterData * CheckerboardReportService * ChildNode * Client * Clients * Clipboard * ClipboardEvent * CloseEvent * Comment * CompositionEvent * CompressionStream * Console * ConstantSourceNode * ContentVisibilityAutoStateChangeEvent * ConvolverNode * CreateOfferRequest * CredentialManagement * Crypto * CSPDictionaries * CSPReport * CSS * CSSAnimation * CSSConditionRule * CSSContainerRule * CSSCounterStyleRule * CSSFontFaceRule * CSSFontFeatureValuesRule * CSSFontPaletteValuesRule * CSSGroupingRule * CSSImportRule * CSSKeyframeRule * CSSKeyframesRule * CSSLayerBlockRule * CSSLayerStatementRule * CSSMediaRule * CSSMozDocumentRule * CSSNamespaceRule * CSSPageRule * CSSPropertyRule * CSSPseudoElement * CSSRule * CSSRuleList * CSSScopeRule * CSSStyleDeclaration * CSSStyleRule * CSSStyleSheet * CSSSupportsRule * CSSTransition * CustomElementRegistry * CustomEvent * DataTransfer * DataTransferItem * DataTransferItemList * DecoderDoctorNotification * DecompressionStream * DedicatedWorkerGlobalScope * DelayNode * DeviceLightEvent * DeviceMotionEvent * DeviceOrientationEvent * Directory * Document * DocumentFragment * DocumentOrShadowRoot * DocumentTimeline * DocumentType * DOMException * DOMImplementation * DOMLocalization * DOMMatrix * DOMParser * DOMPoint * DOMQuad * DOMRect * DOMRectList * DOMStringList * DOMStringMap * DOMTokenList * DragEvent * DynamicsCompressorNode * Element * ElementInternals * EncodedAudioChunk * EncodedVideoChunk * ErrorEvent * Event * EventHandler * EventListener * EventSource * EventTarget * ExtendableEvent * ExtendableMessageEvent * ExtensionAlarms * ExtensionBrowser * ExtensionBrowserSettings * ExtensionBrowserSettingsColorManagement * ExtensionDns * ExtensionEventManager * ExtensionMockAPI * ExtensionPort * ExtensionProxy * ExtensionRuntime * ExtensionScripting * ExtensionSetting * ExtensionTest * External * FailedCertSecurityInfo * FakePluginTagInit * FeaturePolicy * Fetch * FetchEvent * FetchObserver * File * FileList * FileMode * FileReader * FileReaderSync * FileSystem * FileSystemDirectoryEntry * FileSystemDirectoryHandle * FileSystemDirectoryIterator * FileSystemDirectoryReader * FileSystemEntry * FileSystemFileEntry * FileSystemFileHandle * FileSystemHandle * FileSystemSyncAccessHandle * FileSystemWritableFileStream * FinalizationRegistry * FocusEvent * FontFace * FontFaceSet * FontFaceSetLoadEvent * FontFaceSource * FormData * FormDataEvent * FragmentDirective * FrameCrashedEvent * Function * FuzzingFunctions * GainNode * Gamepad * GamepadAxisMoveEvent * GamepadButtonEvent * GamepadEvent * GamepadHapticActuator * GamepadLightIndicator * GamepadPose * GamepadServiceTest * GamepadTouch * GenericTransformStream * Geolocation * GeolocationCoordinates * GeolocationPosition * GeolocationPositionError * GeometryUtils * GetUserMediaRequest * Glean * GleanMetrics * GleanPings * GPUUncapturedErrorEvent * HashChangeEvent * Headers * Highlight * History * HTMLAllCollection * HTMLAnchorElement * HTMLAreaElement * HTMLAudioElement * HTMLBaseElement * HTMLBodyElement * HTMLBRElement * HTMLButtonElement * HTMLCanvasElement * HTMLCollection * HTMLDataElement * HTMLDataListElement * HTMLDetailsElement * HTMLDialogElement * HTMLDirectoryElement * HTMLDivElement * HTMLDListElement * HTMLDocument * HTMLElement * HTMLEmbedElement * HTMLFieldSetElement * HTMLFontElement * HTMLFormControlsCollection * HTMLFormElement * HTMLFrameElement * HTMLFrameSetElement * HTMLHeadElement * HTMLHeadingElement * HTMLHRElement * HTMLHtmlElement * HTMLHyperlinkElementUtils * HTMLIFrameElement * HTMLImageElement * HTMLInputElement * HTMLLabelElement * HTMLLegendElement * HTMLLIElement * HTMLLinkElement * HTMLMapElement * HTMLMarqueeElement * HTMLMediaElement * HTMLMenuElement * HTMLMetaElement * HTMLMeterElement * HTMLModElement * HTMLObjectElement * HTMLOListElement * HTMLOptGroupElement * HTMLOptionElement * HTMLOptionsCollection * HTMLOutputElement * HTMLParagraphElement * HTMLParamElement * HTMLPictureElement * HTMLPreElement * HTMLProgressElement * HTMLQuoteElement * HTMLScriptElement * HTMLSelectElement * HTMLSlotElement * HTMLSourceElement * HTMLSpanElement * HTMLStyleElement * HTMLTableCaptionElement * HTMLTableCellElement * HTMLTableColElement * HTMLTableElement * HTMLTableRowElement * HTMLTableSectionElement * HTMLTemplateElement * HTMLTextAreaElement * HTMLTimeElement * HTMLTitleElement * HTMLTrackElement * HTMLUListElement * HTMLVideoElement * IDBCursor * IDBDatabase * IDBFactory * IDBIndex * IDBKeyRange * IDBObjectStore * IDBOpenDBRequest * IDBRequest * IDBTransaction * IDBVersionChangeEvent * IdentityCredential * IdleDeadline * IIRFilterNode * ImageBitmap * ImageBitmapRenderingContext * ImageCapture * ImageCaptureErrorEvent * ImageData * ImageDocument * InputEvent * InstallTrigger * IntersectionObserver * IntlUtils * InvokeEvent * InvokerElement * IterableIterator * KeyAlgorithm * KeyboardEvent * KeyEvent * KeyframeAnimationOptions * KeyframeEffect * KeyIdsInitData * LinkStyle * Localization * Location * Lock * LockManager * MathMLElement * MediaCapabilities * MediaDebugInfo * MediaDeviceInfo * MediaDevices * MediaElementAudioSourceNode * MediaEncryptedEvent * MediaError * MediaKeyError * MediaKeyMessageEvent * MediaKeys * MediaKeySession * MediaKeysRequestStatus * MediaKeyStatusMap * MediaKeySystemAccess * MediaList * MediaQueryList * MediaQueryListEvent * MediaRecorder * MediaRecorderErrorEvent * MediaSession * MediaSource * MediaStream * MediaStreamAudioDestinationNode * MediaStreamAudioSourceNode * MediaStreamError * MediaStreamEvent * MediaStreamTrack * MediaStreamTrackAudioSourceNode * MediaStreamTrackEvent * MediaTrackSettings * MediaTrackSupportedConstraints * MerchantValidationEvent * MessageChannel * MessageEvent * MessagePort * MIDIAccess * MIDIConnectionEvent * MIDIInput * MIDIInputMap * MIDIMessageEvent * MIDIOptions * MIDIOutput * MIDIOutputMap * MIDIPort * MimeType * MimeTypeArray * MouseEvent * MouseScrollEvent * MozApplicationEvent * MozFrameLoaderOwner * MutationEvent * MutationObserver * NamedNodeMap * NavigationPreloadManager * Navigator * NetErrorInfo * NetworkInformation * NetworkOptions * Node * NodeFilter * NodeIterator * NodeList * NonElementParentNode * Notification * NotificationEvent * NotifyPaintEvent * OfflineAudioCompletionEvent * OfflineAudioContext * OffscreenCanvas * OffscreenCanvasRenderingContext2D * OscillatorNode * PageTransitionEvent * PaintRequest * PaintRequestList * PaintWorkletGlobalScope * PannerNode * ParentNode * PaymentAddress * PaymentMethodChangeEvent * PaymentRequest * PaymentRequestUpdateEvent * PaymentResponse * PeerConnectionImpl * PeerConnectionObserver * PeerConnectionObserverEnums * Performance * PerformanceEntry * PerformanceEntryEvent * PerformanceEventTiming * PerformanceLargestContentfulPaint * PerformanceMark * PerformanceMeasure * PerformanceNavigation * PerformanceNavigationTiming * PerformanceObserver * PerformanceObserverEntryList * PerformancePaintTiming * PerformanceResourceTiming * PerformanceServerTiming * PerformanceTiming * PeriodicWave * Permissions * PermissionStatus * Plugin * PluginArray * PointerEvent * PopoverInvokerElement * PopStateEvent * PopupBlockedEvent * PositionStateEvent * ProcessingInstruction * ProgressEvent * Promise * PromiseRejectionEvent * PushEvent * PushManager * PushMessageData * PushSubscription * PushSubscriptionOptions * QueuingStrategy * RadioNodeList * Range * ReadableByteStreamController * ReadableStream * ReadableStreamBYOBReader * ReadableStreamBYOBRequest * ReadableStreamDefaultController * ReadableStreamDefaultReader * ReferrerPolicy * Reporting * Request * ResizeObserver * Response * RTCCertificate * RTCConfiguration * RTCDataChannel * RTCDataChannelEvent * RTCDtlsTransport * RTCDTMFSender * RTCDTMFToneChangeEvent * RTCEncodedAudioFrame * RTCEncodedVideoFrame * RTCIceCandidate * RTCIceTransport * RTCIdentityAssertion * RTCIdentityProvider * RTCPeerConnection * RTCPeerConnectionIceEvent * RTCPeerConnectionStatic * RTCRtpCapabilities * RTCRtpParameters * RTCRtpReceiver * RTCRtpScriptTransform * RTCRtpScriptTransformer * RTCRtpSender * RTCRtpSources * RTCRtpTransceiver * RTCSctpTransport * RTCSessionDescription * RTCStatsReport * RTCTrackEvent * RTCTransformEvent * Sanitizer * Screen * ScreenOrientation * ScriptProcessorNode * ScrollAreaEvent * ScrollViewChangeEvent * SecurityPolicyViolationEvent * Selection * ServiceWorker * ServiceWorkerContainer * ServiceWorkerGlobalScope * ServiceWorkerRegistration * ShadowRealmGlobalScope * ShadowRoot * SharedWorker * SharedWorkerGlobalScope * SimpleGestureEvent * SocketCommon * SourceBuffer * SourceBufferList * SpeechGrammar * SpeechGrammarList * SpeechRecognition * SpeechRecognitionAlternative * SpeechRecognitionError * SpeechRecognitionEvent * SpeechRecognitionResult * SpeechRecognitionResultList * SpeechSynthesis * SpeechSynthesisErrorEvent * SpeechSynthesisEvent * SpeechSynthesisUtterance * SpeechSynthesisVoice * StaticRange * StereoPannerNode * Storage * StorageEvent * StorageManager * StreamFilter * StreamFilterDataEvent * StructuredCloneTester * StyleSheet * StyleSheetList * SubmitEvent * SubtleCrypto * SVGAElement * SVGAngle * SVGAnimatedAngle * SVGAnimatedBoolean * SVGAnimatedEnumeration * SVGAnimatedInteger * SVGAnimatedLength * SVGAnimatedLengthList * SVGAnimatedNumber * SVGAnimatedNumberList * SVGAnimatedPathData * SVGAnimatedPoints * SVGAnimatedPreserveAspectRatio * SVGAnimatedRect * SVGAnimatedString * SVGAnimatedTransformList * SVGAnimateElement * SVGAnimateMotionElement * SVGAnimateTransformElement * SVGAnimationElement * SVGCircleElement * SVGClipPathElement * SVGComponentTransferFunctionElement * SVGDefsElement * SVGDescElement * SVGElement * SVGEllipseElement * SVGFEBlendElement * SVGFEColorMatrixElement * SVGFEComponentTransferElement * SVGFECompositeElement * SVGFEConvolveMatrixElement * SVGFEDiffuseLightingElement * SVGFEDisplacementMapElement * SVGFEDistantLightElement * SVGFEDropShadowElement * SVGFEFloodElement * SVGFEFuncAElement * SVGFEFuncBElement * SVGFEFuncGElement * SVGFEFuncRElement * SVGFEGaussianBlurElement * SVGFEImageElement * SVGFEMergeElement * SVGFEMergeNodeElement * SVGFEMorphologyElement * SVGFEOffsetElement * SVGFEPointLightElement * SVGFESpecularLightingElement * SVGFESpotLightElement * SVGFETileElement * SVGFETurbulenceElement * SVGFilterElement * SVGFilterPrimitiveStandardAttributes * SVGFitToViewBox * SVGForeignObjectElement * SVGGElement * SVGGeometryElement * SVGGradientElement * SVGGraphicsElement * SVGImageElement * SVGLength * SVGLengthList * SVGLinearGradientElement * SVGLineElement * SVGMarkerElement * SVGMaskElement * SVGMatrix * SVGMetadataElement * SVGMPathElement * SVGNumber * SVGNumberList * SVGPathElement * SVGPathSeg * SVGPathSegList * SVGPatternElement * SVGPoint * SVGPointList * SVGPolygonElement * SVGPolylineElement * SVGPreserveAspectRatio * SVGRadialGradientElement * SVGRect * SVGRectElement * SVGScriptElement * SVGSetElement * SVGStopElement * SVGStringList * SVGStyleElement * SVGSVGElement * SVGSwitchElement * SVGSymbolElement * SVGTests * SVGTextContentElement * SVGTextElement * SVGTextPathElement * SVGTextPositioningElement * SVGTitleElement * SVGTransform * SVGTransformList * SVGTSpanElement * SVGUnitTypes * SVGURIReference * SVGUseElement * SVGViewElement * SVGZoomAndPan * TaskPriorityChangeEvent * TCPServerSocket * TCPServerSocketEvent * TCPSocket * TCPSocketErrorEvent * TCPSocketEvent * TestFunctions * TestInterfaceJS * TestInterfaceJSDictionaries * TestInterfaceJSMaplikeSetlikeIterable * TestInterfaceObservableArray * TestUtils * Text * TextClause * TextDecoder * TextDecoderStream * TextEncoder * TextEncoderStream * TextTrack * TextTrackCue * TextTrackCueList * TextTrackList * TimeEvent * TimeRanges * ToggleEvent * Touch * TouchEvent * TouchList * TrackEvent * Transformer * TransformStream * TransformStreamDefaultController * TransitionEvent * TreeWalker * TrustedTypes * UDPMessageEvent * UDPSocket * UIEvent * UnderlyingSink * UnderlyingSource * URL * URLSearchParams * UserActivation * UserProximityEvent * ValidityState * VideoColorSpace * VideoDecoder * VideoEncoder * VideoFrame * VideoPlaybackQuality * VideoTrack * VideoTrackList * VisualViewport * VRDisplay * VRDisplayEvent * VRServiceTest * VTTCue * VTTRegion * WakeLock * WakeLockSentinel * WaveShaperNode * WebAuthentication * WebGL2RenderingContext * WebGLContextEvent * WebGLRenderingContext * WebGPU * WebrtcGlobalInformation * WebSocket * WebTaskScheduling * WebTransport * WebTransportDatagramDuplexStream * WebTransportError * WebTransportSendReceiveStream * WebXR * WheelEvent * Window * WindowOrWorkerGlobalScope * Worker * WorkerDebuggerGlobalScope * WorkerGlobalScope * WorkerLocation * WorkerNavigator * WorkerTestUtils * Worklet * WorkletGlobalScope * WritableStream * WritableStreamDefaultController * WritableStreamDefaultWriter * XMLDocument * XMLHttpRequest * XMLHttpRequestEventTarget * XMLHttpRequestUpload * XMLSerializer * XPathEvaluator * XPathExpression * XPathNSResolver * XPathResult * XRInputSourceEvent * XRInputSourcesChangeEvent * XRReferenceSpaceEvent * XRSessionEvent * XSLTProcessor */ /* ---------------------- AbortController ----------------------------- */ /* ./webidl/AbortController.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://dom.spec.whatwg.org/#abortcontroller */ [Exposed=*] interface AbortController { [Throws] constructor(); [SameObject] readonly attribute AbortSignal signal; undefined abort(optional any reason); }; /* ---------------------- AbortSignal ----------------------------- */ /* ./webidl/AbortSignal.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://dom.spec.whatwg.org/#abortsignal */ [Exposed=*] interface AbortSignal : EventTarget { [NewObject] static AbortSignal abort(optional any reason); [Exposed=(Window,Worker), NewObject, Throws] static AbortSignal timeout([EnforceRange] unsigned long long milliseconds); [NewObject] static AbortSignal _any(sequence signals); readonly attribute boolean aborted; readonly attribute any reason; [Throws] undefined throwIfAborted(); attribute EventHandler onabort; }; /* ---------------------- AbstractRange ----------------------------- */ /* ./webidl/AbstractRange.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://dom.spec.whatwg.org/#abstractrange * * Copyright 2012 W3C (MIT, ERCIM, Keio), All Rights Reserved. W3C * liability, trademark and document use rules apply. */ [Exposed=Window] interface AbstractRange { [BinaryName="GetStartContainer"] readonly attribute Node startContainer; readonly attribute unsigned long startOffset; [BinaryName="GetEndContainer"] readonly attribute Node endContainer; readonly attribute unsigned long endOffset; readonly attribute boolean collapsed; }; /* ---------------------- AbstractWorker ----------------------------- */ /* ./webidl/AbstractWorker.webidl */ /* -*- 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/. */ [Exposed=(Window,Worker)] interface mixin AbstractWorker { attribute EventHandler onerror; }; /* ---------------------- AccessibleNode ----------------------------- */ /* ./webidl/AccessibleNode.webidl */ /* -*- 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/. */ [Func="mozilla::dom::AccessibleNode::IsAOMEnabled", Exposed=Window] interface AccessibleNode { readonly attribute DOMString computedRole; [Frozen, Cached, Pure] readonly attribute sequence states; [Frozen, Cached, Pure] readonly attribute sequence attributes; readonly attribute Node? DOMNode; boolean is(DOMString... states); boolean has(DOMString... attributes); [Throws] any get(DOMString attribute); attribute DOMString? role; attribute DOMString? roleDescription; // Accessible label and descriptor attribute DOMString? label; // Global states and properties attribute DOMString? current; // Accessible properties attribute DOMString? autocomplete; attribute DOMString? keyShortcuts; attribute boolean? modal; attribute boolean? multiline; attribute boolean? multiselectable; attribute DOMString? orientation; attribute boolean? readOnly; attribute boolean? required; attribute DOMString? sort; // Range values attribute DOMString? placeholder; attribute double? valueMax; attribute double? valueMin; attribute double? valueNow; attribute DOMString? valueText; // Accessible states attribute DOMString? checked; attribute boolean? disabled; attribute boolean? expanded; attribute DOMString? hasPopUp; attribute boolean? hidden; attribute DOMString? invalid; attribute DOMString? pressed; attribute boolean? selected; // Live regions attribute boolean? atomic; attribute boolean? busy; attribute DOMString? live; attribute DOMString? relevant; // Other relationships attribute AccessibleNode? activeDescendant; attribute AccessibleNode? details; attribute AccessibleNode? errorMessage; // Collections. attribute long? colCount; attribute unsigned long? colIndex; attribute unsigned long? colSpan; attribute unsigned long? level; attribute unsigned long? posInSet; attribute long? rowCount; attribute unsigned long? rowIndex; attribute unsigned long? rowSpan; attribute long? setSize; }; /* ---------------------- AddonEvent ----------------------------- */ /* ./webidl/AddonEvent.webidl */ /* 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 https://mozilla.org/MPL/2.0/. */ [Func="mozilla::AddonManagerWebAPI::IsAPIEnabled", Exposed=Window] interface AddonEvent : Event { constructor(DOMString type, AddonEventInit eventInitDict); readonly attribute DOMString id; }; dictionary AddonEventInit : EventInit { required DOMString id; }; /* ---------------------- AddonManager ----------------------------- */ /* ./webidl/AddonManager.webidl */ /* 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/. */ /* We need a JSImplementation but cannot get one without a contract ID. Since Addon and AddonInstall are only ever created from JS they don't need real contract IDs. */ [ChromeOnly, JSImplementation="dummy", Exposed=Window] interface Addon { // The add-on's ID. readonly attribute DOMString id; // The add-on's version. readonly attribute DOMString version; // The add-on's type (extension, theme, etc.). readonly attribute DOMString type; // The add-on's name in the current locale. readonly attribute DOMString name; // The add-on's description in the current locale. readonly attribute DOMString description; // If the user has enabled this add-on, note that it still may not be running // depending on whether enabling requires a restart or if the add-on is // incompatible in some way. readonly attribute boolean isEnabled; // If the add-on is currently active in the browser. readonly attribute boolean isActive; // If the add-on may be uninstalled readonly attribute boolean canUninstall; Promise uninstall(); Promise setEnabled(boolean value); }; [ChromeOnly, JSImplementation="dummy", Exposed=Window] interface AddonInstall : EventTarget { // One of the STATE_* symbols from AddonManager.sys.mjs readonly attribute DOMString state; // One of the ERROR_* symbols from AddonManager.sys.mjs, or null readonly attribute DOMString? error; // How many bytes have been downloaded readonly attribute long long progress; // How many total bytes will need to be downloaded or -1 if unknown readonly attribute long long maxProgress; Promise install(); Promise cancel(); }; dictionary addonInstallOptions { required DOMString url; // If a non-empty string is passed for "hash", it is used to verify the // checksum of the downloaded XPI before installing. If is omitted or if // it is null or empty string, no checksum verification is performed. DOMString? hash = null; }; [HeaderFile="mozilla/AddonManagerWebAPI.h", Func="mozilla::AddonManagerWebAPI::IsAPIEnabled", JSImplementation="@mozilla.org/addon-web-api/manager;1", WantsEventListenerHooks, Exposed=Window] interface AddonManager : EventTarget { /** * Gets information about an add-on * * @param id * The ID of the add-on to test for. * @return A promise. It will resolve to an Addon if the add-on is installed. */ Promise getAddonByID(DOMString id); /** * Creates an AddonInstall object for a given URL. * * @param options * Only one supported option: 'url', the URL of the addon to install. * @return A promise that resolves to an instance of AddonInstall. */ Promise createInstall(optional addonInstallOptions options = {}); /** * Opens an Abuse Report dialog window for the addon with the given id. * The addon may be currently installed (in which case the report will * include the details available locally), or not (in which case the report * will include the details that can be retrieved from the AMO API endpoint). * * @param id * The ID of the add-on to report. * @return A promise that resolves to a boolean (true when the report * has been submitted successfully, false if the user cancelled * the report). The Promise is rejected is the report fails * for a reason other than user cancellation. */ Promise reportAbuse(DOMString id); // Indicator to content whether handing off the reports to the integrated // abuse report panel is enabled. readonly attribute boolean abuseReportPanelEnabled; }; [ChromeOnly,Exposed=Window,HeaderFile="mozilla/AddonManagerWebAPI.h"] namespace AddonManagerPermissions { boolean isHostPermitted(DOMString host); }; /* ---------------------- AnalyserNode ----------------------------- */ /* ./webidl/AnalyserNode.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://webaudio.github.io/web-audio-api/ * * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C * liability, trademark and document use rules apply. */ dictionary AnalyserOptions : AudioNodeOptions { unsigned long fftSize = 2048; double maxDecibels = -30; double minDecibels = -100; double smoothingTimeConstant = 0.8; }; [Pref="dom.webaudio.enabled", Exposed=Window] interface AnalyserNode : AudioNode { [Throws] constructor(BaseAudioContext context, optional AnalyserOptions options = {}); // Real-time frequency-domain data undefined getFloatFrequencyData(Float32Array array); undefined getByteFrequencyData(Uint8Array array); // Real-time waveform data undefined getFloatTimeDomainData(Float32Array array); undefined getByteTimeDomainData(Uint8Array array); [SetterThrows, Pure] attribute unsigned long fftSize; [Pure] readonly attribute unsigned long frequencyBinCount; [SetterThrows, Pure] attribute double minDecibels; [SetterThrows, Pure] attribute double maxDecibels; [SetterThrows, Pure] attribute double smoothingTimeConstant; }; // Mozilla extension AnalyserNode includes AudioNodePassThrough; /* ---------------------- Animatable ----------------------------- */ /* ./webidl/Animatable.webidl */ /* -*- 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/. * * The origin of this IDL file is * http://dev.w3.org/fxtf/web-animations/#the-animatable-interface * * Copyright © 2014 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C * liability, trademark and document use rules apply. */ dictionary KeyframeAnimationOptions : KeyframeEffectOptions { DOMString id = ""; }; dictionary GetAnimationsOptions { boolean subtree = false; }; interface mixin Animatable { [Throws] Animation animate(object? keyframes, optional UnrestrictedDoubleOrKeyframeAnimationOptions options = {}); sequence getAnimations(optional GetAnimationsOptions options = {}); }; /* ---------------------- Animation ----------------------------- */ /* ./webidl/Animation.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://drafts.csswg.org/web-animations/#animation * * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C * liability, trademark and document use rules apply. */ enum AnimationPlayState { "idle", "running", "paused", "finished" }; enum AnimationReplaceState { "active", "removed", "persisted" }; [Exposed=Window] interface Animation : EventTarget { [Throws] constructor(optional AnimationEffect? effect = null, optional AnimationTimeline? timeline); attribute DOMString id; [Pure] attribute AnimationEffect? effect; // Bug 1676794. Drop BinaryName once we support ScrollTimeline interface. [Func="Document::AreWebAnimationsTimelinesEnabled", BinaryName="timelineFromJS"] attribute AnimationTimeline? timeline; [BinaryName="startTimeAsDouble"] attribute double? startTime; [SetterThrows, BinaryName="currentTimeAsDouble"] attribute double? currentTime; attribute double playbackRate; [BinaryName="playStateFromJS"] readonly attribute AnimationPlayState playState; [BinaryName="pendingFromJS"] readonly attribute boolean pending; readonly attribute AnimationReplaceState replaceState; [Throws] readonly attribute Promise ready; [Throws] readonly attribute Promise finished; attribute EventHandler onfinish; attribute EventHandler oncancel; attribute EventHandler onremove; undefined cancel(); [Throws] undefined finish(); [Throws, BinaryName="playFromJS"] undefined play(); [Throws, BinaryName="pauseFromJS"] undefined pause(); undefined updatePlaybackRate (double playbackRate); [Throws] undefined reverse(); undefined persist(); [CEReactions, Throws] undefined commitStyles(); }; // Non-standard extensions partial interface Animation { [ChromeOnly] readonly attribute boolean isRunningOnCompositor; }; /* ---------------------- AnimationEffect ----------------------------- */ /* ./webidl/AnimationEffect.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://drafts.csswg.org/web-animations/#animationeffectreadonly * * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C * liability, trademark and document use rules apply. */ enum FillMode { "none", "forwards", "backwards", "both", "auto" }; enum PlaybackDirection { "normal", "reverse", "alternate", "alternate-reverse" }; dictionary EffectTiming { double delay = 0.0; double endDelay = 0.0; FillMode fill = "auto"; double iterationStart = 0.0; unrestricted double iterations = 1.0; (unrestricted double or DOMString) duration = "auto"; PlaybackDirection direction = "normal"; UTF8String easing = "linear"; }; dictionary OptionalEffectTiming { double delay; double endDelay; FillMode fill; double iterationStart; unrestricted double iterations; (unrestricted double or DOMString) duration; PlaybackDirection direction; UTF8String easing; }; dictionary ComputedEffectTiming : EffectTiming { unrestricted double endTime = 0.0; unrestricted double activeDuration = 0.0; double? localTime = null; double? progress = null; unrestricted double? currentIteration = null; }; [Exposed=Window] interface AnimationEffect { EffectTiming getTiming(); [BinaryName="getComputedTimingAsDict"] ComputedEffectTiming getComputedTiming(); [Throws] undefined updateTiming(optional OptionalEffectTiming timing = {}); }; /* ---------------------- AnimationEvent ----------------------------- */ /* ./webidl/AnimationEvent.webidl */ /* -*- 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/. * * The origin of this IDL file is * http://www.w3.org/TR/css3-animations/#animation-events- * http://dev.w3.org/csswg/css3-animations/#animation-events- * * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C * liability, trademark and document use rules apply. */ [Exposed=Window] interface AnimationEvent : Event { constructor(DOMString type, optional AnimationEventInit eventInitDict = {}); readonly attribute DOMString animationName; readonly attribute float elapsedTime; readonly attribute DOMString pseudoElement; }; dictionary AnimationEventInit : EventInit { DOMString animationName = ""; float elapsedTime = 0; DOMString pseudoElement = ""; }; /* ---------------------- AnimationFrameProvider ----------------------------- */ /* ./webidl/AnimationFrameProvider.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#animation-frames */ callback FrameRequestCallback = undefined (DOMHighResTimeStamp time); interface mixin AnimationFrameProvider { [Throws] long requestAnimationFrame(FrameRequestCallback callback); [Throws] undefined cancelAnimationFrame(long handle); }; /* ---------------------- AnimationPlaybackEvent ----------------------------- */ /* ./webidl/AnimationPlaybackEvent.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://drafts.csswg.org/web-animations/#animationplaybackevent * * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C * liability, trademark and document use rules apply. */ [Exposed=Window] interface AnimationPlaybackEvent : Event { constructor(DOMString type, optional AnimationPlaybackEventInit eventInitDict = {}); readonly attribute double? currentTime; readonly attribute double? timelineTime; }; dictionary AnimationPlaybackEventInit : EventInit { double? currentTime = null; double? timelineTime = null; }; /* ---------------------- AnimationTimeline ----------------------------- */ /* ./webidl/AnimationTimeline.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://drafts.csswg.org/web-animations/#animationtimeline * * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C * liability, trademark and document use rules apply. */ [Func="Document::AreWebAnimationsTimelinesEnabled", Exposed=Window] interface AnimationTimeline { [BinaryName="currentTimeAsDouble"] readonly attribute double? currentTime; }; /* ---------------------- AnonymousContent ----------------------------- */ /* ./webidl/AnonymousContent.webidl */ /* -*- 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/. */ /* * This file declares the AnonymousContent interface which is used to * manipulate content that has been inserted into the document's canvasFrame * anonymous container. See Document.insertAnonymousContent. * Users of this API must never remove the host of the shadow root. */ [ChromeOnly, Exposed=Window] interface AnonymousContent { readonly attribute ShadowRoot root; }; /* ---------------------- AppInfo ----------------------------- */ /* ./webidl/AppInfo.webidl */ /* 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/. */ /** * This dictionnary holds the parameters supporting the app:// protocol. */ dictionary AppInfo { DOMString path = ""; boolean isCoreApp = false; }; /* ---------------------- AppNotificationServiceOptions ----------------------------- */ /* ./webidl/AppNotificationServiceOptions.webidl */ /* -*- 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/. */ interface MozObserver; dictionary AppNotificationServiceOptions { boolean textClickable = false; DOMString manifestURL = ""; DOMString id = ""; DOMString dbId = ""; DOMString dir = ""; DOMString lang = ""; DOMString tag = ""; DOMString data = ""; NotificationBehavior mozbehavior = {}; }; /* ---------------------- APZTestData ----------------------------- */ /* ./webidl/APZTestData.webidl */ /* -*- 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/. */ /* * This file declares data structures used to communicate data logged by * various components for the purpose of APZ testing (see bug 961289 and * gfx/layers/apz/test/APZTestData.h) to JS test code. */ // A single key-value pair in the data. dictionary ScrollFrameDataEntry { DOMString key; DOMString value; }; // All the key-value pairs associated with a given scrollable frame. // The scrollable frame is identified by a scroll id. dictionary ScrollFrameData { unsigned long long scrollId; sequence entries; }; // All the scrollable frames associated with a given paint or repaint request. // The paint or repaint request is identified by a sequence number. dictionary APZBucket { unsigned long sequenceNumber; sequence scrollFrames; }; [Pref="apz.test.logging_enabled", Exposed=Window] namespace APZHitResultFlags { // These constants should be kept in sync with mozilla::gfx::CompositorHitTestInfo const unsigned short INVISIBLE = 0; const unsigned short VISIBLE = 0x0001; const unsigned short IRREGULAR_AREA = 0x0002; const unsigned short APZ_AWARE_LISTENERS = 0x0004; const unsigned short INACTIVE_SCROLLFRAME = 0x0008; const unsigned short PAN_X_DISABLED = 0x0010; const unsigned short PAN_Y_DISABLED = 0x0020; const unsigned short PINCH_ZOOM_DISABLED = 0x0040; const unsigned short DOUBLE_TAP_ZOOM_DISABLED = 0x0080; const unsigned short SCROLLBAR = 0x0100; const unsigned short SCROLLBAR_THUMB = 0x0200; const unsigned short SCROLLBAR_VERTICAL = 0x0400; const unsigned short REQUIRES_TARGET_CONFIRMATION = 0x0800; }; dictionary APZHitResult { float screenX; float screenY; unsigned short hitResult; // combination of the APZHitResultFlags.* flags unsigned long long layersId; unsigned long long scrollId; }; dictionary APZSampledResult { float scrollOffsetX; float scrollOffsetY; DOMHighResTimeStamp sampledTimeStamp; unsigned long long layersId; unsigned long long scrollId; }; dictionary AdditionalDataEntry { DOMString key; DOMString value; }; // All the paints and repaint requests. This is the top-level data structure. [GenerateConversionToJS] dictionary APZTestData { sequence paints; sequence repaintRequests; sequence hitResults; sequence sampledResults; sequence additionalData; }; // A frame uniformity measurement for every scrollable layer dictionary FrameUniformity { unsigned long layerAddress; float frameUniformity; }; [GenerateConversionToJS] dictionary FrameUniformityResults { sequence layerUniformities; }; /* ---------------------- ARIAMixin ----------------------------- */ /* ./webidl/ARIAMixin.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://w3c.github.io/aria/#ARIAMixin * * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C * liability, trademark and document use rules apply. */ interface mixin ARIAMixin { [Pref="accessibility.ARIAElementReflection.enabled", CEReactions] attribute Element? ariaActiveDescendantElement; [CEReactions, SetterThrows] attribute DOMString? role; [CEReactions, SetterThrows] attribute DOMString? ariaAtomic; [CEReactions, SetterThrows] attribute DOMString? ariaAutoComplete; [CEReactions, SetterThrows] attribute DOMString? ariaBrailleLabel; [CEReactions, SetterThrows] attribute DOMString? ariaBrailleRoleDescription; [CEReactions, SetterThrows] attribute DOMString? ariaBusy; [CEReactions, SetterThrows] attribute DOMString? ariaChecked; [CEReactions, SetterThrows] attribute DOMString? ariaColCount; [CEReactions, SetterThrows] attribute DOMString? ariaColIndex; [CEReactions, SetterThrows] attribute DOMString? ariaColIndexText; [CEReactions, SetterThrows] attribute DOMString? ariaColSpan; [CEReactions, SetterThrows] attribute DOMString? ariaCurrent; [CEReactions, SetterThrows] attribute DOMString? ariaDescription; [CEReactions, SetterThrows] attribute DOMString? ariaDisabled; [CEReactions, SetterThrows] attribute DOMString? ariaExpanded; [CEReactions, SetterThrows] attribute DOMString? ariaHasPopup; [CEReactions, SetterThrows] attribute DOMString? ariaHidden; [CEReactions, SetterThrows] attribute DOMString? ariaInvalid; [CEReactions, SetterThrows] attribute DOMString? ariaKeyShortcuts; [CEReactions, SetterThrows] attribute DOMString? ariaLabel; [CEReactions, SetterThrows] attribute DOMString? ariaLevel; [CEReactions, SetterThrows] attribute DOMString? ariaLive; [CEReactions, SetterThrows] attribute DOMString? ariaModal; [CEReactions, SetterThrows] attribute DOMString? ariaMultiLine; [CEReactions, SetterThrows] attribute DOMString? ariaMultiSelectable; [CEReactions, SetterThrows] attribute DOMString? ariaOrientation; [CEReactions, SetterThrows] attribute DOMString? ariaPlaceholder; [CEReactions, SetterThrows] attribute DOMString? ariaPosInSet; [CEReactions, SetterThrows] attribute DOMString? ariaPressed; [CEReactions, SetterThrows] attribute DOMString? ariaReadOnly; [CEReactions, SetterThrows] attribute DOMString? ariaRelevant; [CEReactions, SetterThrows] attribute DOMString? ariaRequired; [CEReactions, SetterThrows] attribute DOMString? ariaRoleDescription; [CEReactions, SetterThrows] attribute DOMString? ariaRowCount; [CEReactions, SetterThrows] attribute DOMString? ariaRowIndex; [CEReactions, SetterThrows] attribute DOMString? ariaRowIndexText; [CEReactions, SetterThrows] attribute DOMString? ariaRowSpan; [CEReactions, SetterThrows] attribute DOMString? ariaSelected; [CEReactions, SetterThrows] attribute DOMString? ariaSetSize; [CEReactions, SetterThrows] attribute DOMString? ariaSort; [CEReactions, SetterThrows] attribute DOMString? ariaValueMax; [CEReactions, SetterThrows] attribute DOMString? ariaValueMin; [CEReactions, SetterThrows] attribute DOMString? ariaValueNow; [CEReactions, SetterThrows] attribute DOMString? ariaValueText; }; /* ---------------------- Attr ----------------------------- */ /* ./webidl/Attr.webidl */ /* -*- 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/. * * The origin of this IDL file is * http://www.w3.org/TR/2012/WD-dom-20120105/ * * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C * liability, trademark and document use rules apply. */ [Exposed=Window] interface Attr : Node { readonly attribute DOMString localName; [CEReactions, SetterNeedsSubjectPrincipal=NonSystem, SetterThrows] attribute DOMString value; [Constant] readonly attribute DOMString name; [Constant] readonly attribute DOMString? namespaceURI; [Constant] readonly attribute DOMString? prefix; readonly attribute boolean specified; }; // Mozilla extensions partial interface Attr { readonly attribute Element? ownerElement; }; /* ---------------------- AudioBuffer ----------------------------- */ /* ./webidl/AudioBuffer.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://webaudio.github.io/web-audio-api/ * * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C * liability, trademark and document use rules apply. */ dictionary AudioBufferOptions { unsigned long numberOfChannels = 1; required unsigned long length; required float sampleRate; }; [Pref="dom.webaudio.enabled", Exposed=Window] interface AudioBuffer { [Throws] constructor(AudioBufferOptions options); readonly attribute float sampleRate; readonly attribute unsigned long length; // in seconds readonly attribute double duration; readonly attribute unsigned long numberOfChannels; [Throws] Float32Array getChannelData(unsigned long channel); [Throws] undefined copyFromChannel(Float32Array destination, unsigned long channelNumber, optional unsigned long startInChannel = 0); [Throws] undefined copyToChannel(Float32Array source, unsigned long channelNumber, optional unsigned long startInChannel = 0); }; /* ---------------------- AudioBufferSourceNode ----------------------------- */ /* ./webidl/AudioBufferSourceNode.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://webaudio.github.io/web-audio-api/ * * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C * liability, trademark and document use rules apply. */ dictionary AudioBufferSourceOptions { AudioBuffer? buffer; float detune = 0; boolean loop = false; double loopEnd = 0; double loopStart = 0; float playbackRate = 1; }; [Pref="dom.webaudio.enabled", Exposed=Window] interface AudioBufferSourceNode : AudioScheduledSourceNode { constructor(BaseAudioContext context, optional AudioBufferSourceOptions options = {}); [SetterThrows] attribute AudioBuffer? buffer; readonly attribute AudioParam playbackRate; readonly attribute AudioParam detune; attribute boolean loop; attribute double loopStart; attribute double loopEnd; [Throws] undefined start(optional double when = 0, optional double grainOffset = 0, optional double grainDuration); }; // Mozilla extensions AudioBufferSourceNode includes AudioNodePassThrough; /* ---------------------- AudioContext ----------------------------- */ /* ./webidl/AudioContext.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://webaudio.github.io/web-audio-api/ * * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C * liability, trademark and document use rules apply. */ dictionary AudioContextOptions { float sampleRate; }; dictionary AudioTimestamp { double contextTime; DOMHighResTimeStamp performanceTime; }; [Pref="dom.webaudio.enabled", Exposed=Window] interface AudioContext : BaseAudioContext { [Throws] constructor(optional AudioContextOptions contextOptions = {}); readonly attribute double baseLatency; readonly attribute double outputLatency; AudioTimestamp getOutputTimestamp(); [NewObject] Promise suspend(); [NewObject] Promise close(); [NewObject, Throws] MediaElementAudioSourceNode createMediaElementSource(HTMLMediaElement mediaElement); [NewObject, Throws] MediaStreamAudioSourceNode createMediaStreamSource(MediaStream mediaStream); [NewObject, Throws] MediaStreamTrackAudioSourceNode createMediaStreamTrackSource(MediaStreamTrack mediaStreamTrack); [NewObject, Throws] MediaStreamAudioDestinationNode createMediaStreamDestination(); }; /* ---------------------- AudioData ----------------------------- */ /* ./webidl/AudioData.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://w3c.github.io/webcodecs/#audiodata */ // [Serializable, Transferable] are implemented without adding attributes here, // but directly with {Read,Write}StructuredClone and Transfer/FromTransfered. [Exposed=(Window,DedicatedWorker), Pref="dom.media.webcodecs.enabled"] interface AudioData { [Throws] constructor(AudioDataInit init); readonly attribute AudioSampleFormat? format; readonly attribute float sampleRate; readonly attribute unsigned long numberOfFrames; readonly attribute unsigned long numberOfChannels; readonly attribute unsigned long long duration; // microseconds readonly attribute long long timestamp; // microseconds [Throws] unsigned long allocationSize(AudioDataCopyToOptions options); [Throws] undefined copyTo( // bug 1696216: Should be `copyTo(AllowSharedBufferSource destination, ...)` ([AllowShared] ArrayBufferView or [AllowShared] ArrayBuffer) destination, AudioDataCopyToOptions options); [Throws] AudioData clone(); undefined close(); }; dictionary AudioDataInit { required AudioSampleFormat format; required float sampleRate; required [EnforceRange] unsigned long numberOfFrames; required [EnforceRange] unsigned long numberOfChannels; required [EnforceRange] long long timestamp; // microseconds // bug 1696216: Should be AllowSharedBufferSource required ([AllowShared] ArrayBufferView or [AllowShared] ArrayBuffer) data; sequence transfer = []; }; enum AudioSampleFormat { "u8", "s16", "s32", "f32", "u8-planar", "s16-planar", "s32-planar", "f32-planar", }; dictionary AudioDataCopyToOptions { required [EnforceRange] unsigned long planeIndex; [EnforceRange] unsigned long frameOffset = 0; [EnforceRange] unsigned long frameCount; AudioSampleFormat format; }; /* ---------------------- AudioDecoder ----------------------------- */ /* ./webidl/AudioDecoder.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://w3c.github.io/webcodecs/#audiodecoder */ [Exposed=(Window,DedicatedWorker), SecureContext, Pref="dom.media.webcodecs.enabled"] interface AudioDecoder : EventTarget { [Throws] constructor(AudioDecoderInit init); readonly attribute CodecState state; readonly attribute unsigned long decodeQueueSize; attribute EventHandler ondequeue; [Throws] undefined configure(AudioDecoderConfig config); [Throws] undefined decode(EncodedAudioChunk chunk); [NewObject, Throws] Promise flush(); [Throws] undefined reset(); [Throws] undefined close(); [NewObject, Throws] static Promise isConfigSupported(AudioDecoderConfig config); }; dictionary AudioDecoderInit { required AudioDataOutputCallback output; required WebCodecsErrorCallback error; }; callback AudioDataOutputCallback = undefined(AudioData output); dictionary AudioDecoderSupport { boolean supported; AudioDecoderConfig config; }; dictionary AudioDecoderConfig { required DOMString codec; required [EnforceRange] unsigned long sampleRate; required [EnforceRange] unsigned long numberOfChannels; // Bug 1696216: Should be AllowSharedBufferSource ([AllowShared] ArrayBufferView or [AllowShared] ArrayBuffer) description; }; /* ---------------------- AudioDestinationNode ----------------------------- */ /* ./webidl/AudioDestinationNode.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://webaudio.github.io/web-audio-api/ * * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C * liability, trademark and document use rules apply. */ [Pref="dom.webaudio.enabled", Exposed=Window] interface AudioDestinationNode : AudioNode { readonly attribute unsigned long maxChannelCount; }; /* ---------------------- AudioEncoder ----------------------------- */ /* ./webidl/AudioEncoder.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://w3c.github.io/webcodecs/#audioencoder * Some members of this API are codec-specific, in which case the source of the * IDL are in the codec-specific registry entries, that are listed in * https://w3c.github.io/webcodecs/codec_registry.html. Those members are * commented with a link of the document in which the member is listed. */ dictionary AudioEncoderSupport { boolean supported; AudioEncoderConfig config; }; dictionary AudioEncoderConfig { required DOMString codec; [EnforceRange] unsigned long sampleRate; [EnforceRange] unsigned long numberOfChannels; [EnforceRange] unsigned long long bitrate; BitrateMode bitrateMode = "variable"; OpusEncoderConfig opus; }; // Opus specific configuration options: // https://w3c.github.io/webcodecs/opus_codec_registration.html enum OpusBitstreamFormat { "opus", "ogg", }; dictionary OpusEncoderConfig { OpusBitstreamFormat format = "opus"; [EnforceRange] unsigned long long frameDuration = 20000; [EnforceRange] unsigned long complexity; [EnforceRange] unsigned long packetlossperc = 0; boolean useinbandfec = false; boolean usedtx = false; }; [Exposed=(Window,DedicatedWorker), SecureContext, Pref="dom.media.webcodecs.enabled"] interface AudioEncoder : EventTarget { [Throws] constructor(AudioEncoderInit init); readonly attribute CodecState state; readonly attribute unsigned long encodeQueueSize; attribute EventHandler ondequeue; [Throws] undefined configure(AudioEncoderConfig config); [Throws, BinaryName="AudioEncoder::EncodeAudioData"] undefined encode(AudioData data); [Throws] Promise flush(); [Throws] undefined reset(); [Throws] undefined close(); [NewObject, Throws] static Promise isConfigSupported(AudioEncoderConfig config); }; dictionary AudioEncoderInit { required EncodedAudioChunkOutputCallback output; required WebCodecsErrorCallback error; }; callback EncodedAudioChunkOutputCallback = undefined (EncodedAudioChunk output, optional EncodedAudioChunkMetadata metadata = {}); dictionary EncodedAudioChunkMetadata { AudioDecoderConfig decoderConfig; }; /* ---------------------- AudioListener ----------------------------- */ /* ./webidl/AudioListener.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://webaudio.github.io/web-audio-api/ * * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C * liability, trademark and document use rules apply. */ [Pref="dom.webaudio.enabled", Exposed=Window] interface AudioListener { // Uses a 3D cartesian coordinate system undefined setPosition(double x, double y, double z); undefined setOrientation(double x, double y, double z, double xUp, double yUp, double zUp); }; /* ---------------------- AudioNode ----------------------------- */ /* ./webidl/AudioNode.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://webaudio.github.io/web-audio-api/ * * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C * liability, trademark and document use rules apply. */ enum ChannelCountMode { "max", "clamped-max", "explicit" }; enum ChannelInterpretation { "speakers", "discrete" }; dictionary AudioNodeOptions { unsigned long channelCount; ChannelCountMode channelCountMode; ChannelInterpretation channelInterpretation; }; [Pref="dom.webaudio.enabled", Exposed=Window] interface AudioNode : EventTarget { [Throws] AudioNode connect(AudioNode destination, optional unsigned long output = 0, optional unsigned long input = 0); [Throws] undefined connect(AudioParam destination, optional unsigned long output = 0); [Throws] undefined disconnect(); [Throws] undefined disconnect(unsigned long output); [Throws] undefined disconnect(AudioNode destination); [Throws] undefined disconnect(AudioNode destination, unsigned long output); [Throws] undefined disconnect(AudioNode destination, unsigned long output, unsigned long input); [Throws] undefined disconnect(AudioParam destination); [Throws] undefined disconnect(AudioParam destination, unsigned long output); readonly attribute BaseAudioContext context; readonly attribute unsigned long numberOfInputs; readonly attribute unsigned long numberOfOutputs; // Channel up-mixing and down-mixing rules for all inputs. [SetterThrows] attribute unsigned long channelCount; [SetterThrows, BinaryName="channelCountModeValue"] attribute ChannelCountMode channelCountMode; [SetterThrows, BinaryName="channelInterpretationValue"] attribute ChannelInterpretation channelInterpretation; }; // Mozilla extension partial interface AudioNode { [ChromeOnly] readonly attribute unsigned long id; }; interface mixin AudioNodePassThrough { [ChromeOnly] attribute boolean passThrough; }; /* ---------------------- AudioParam ----------------------------- */ /* ./webidl/AudioParam.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://webaudio.github.io/web-audio-api/#enumdef-automationrate * https://webaudio.github.io/web-audio-api/#audioparam * * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C * liability, trademark and document use rules apply. */ enum AutomationRate { "a-rate", "k-rate" }; [Pref="dom.webaudio.enabled", Exposed=Window] interface AudioParam { [SetterThrows] attribute float value; readonly attribute float defaultValue; readonly attribute float minValue; readonly attribute float maxValue; // Parameter automation. [Throws] AudioParam setValueAtTime(float value, double startTime); [Throws] AudioParam linearRampToValueAtTime(float value, double endTime); [Throws] AudioParam exponentialRampToValueAtTime(float value, double endTime); // Exponentially approach the target value with a rate having the given time constant. [Throws] AudioParam setTargetAtTime(float target, double startTime, double timeConstant); // Sets an array of arbitrary parameter values starting at time for the given duration. // The number of values will be scaled to fit into the desired duration. [Throws] AudioParam setValueCurveAtTime(sequence values, double startTime, double duration); // Cancels all scheduled parameter changes with times greater than or equal to startTime. [Throws] AudioParam cancelScheduledValues(double startTime); }; // Mozilla extension partial interface AudioParam { // The ID of the AudioNode this AudioParam belongs to. [ChromeOnly] readonly attribute unsigned long parentNodeId; // The name of the AudioParam [ChromeOnly] readonly attribute DOMString name; }; partial interface AudioParam { // This attribute is used for mochitest only. [ChromeOnly] readonly attribute boolean isTrackSuspended; }; /* ---------------------- AudioParamDescriptor ----------------------------- */ /* ./webidl/AudioParamDescriptor.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://webaudio.github.io/web-audio-api/#dictdef-audioparamdescriptor * * Copyright © 2018 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C * liability, trademark and document use rules apply. */ [GenerateInit] dictionary AudioParamDescriptor { required DOMString name; float defaultValue = 0; float minValue = -3.4028235e38; float maxValue = 3.4028235e38; // AutomationRate for AudioWorklet is not needed until bug 1504984 is // implemented // AutomationRate automationRate = "a-rate"; }; /* ---------------------- AudioParamMap ----------------------------- */ /* ./webidl/AudioParamMap.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://webaudio.github.io/web-audio-api/#audioparammap * * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C * liability, trademark and document use rules apply. */ [SecureContext, Exposed=Window] interface AudioParamMap { readonly maplike; }; /* ---------------------- AudioProcessingEvent ----------------------------- */ /* ./webidl/AudioProcessingEvent.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://webaudio.github.io/web-audio-api/ * * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C * liability, trademark and document use rules apply. */ [Pref="dom.webaudio.enabled", Exposed=Window] interface AudioProcessingEvent : Event { readonly attribute double playbackTime; [Throws] readonly attribute AudioBuffer inputBuffer; [Throws] readonly attribute AudioBuffer outputBuffer; }; /* ---------------------- AudioScheduledSourceNode ----------------------------- */ /* ./webidl/AudioScheduledSourceNode.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://webaudio.github.io/web-audio-api/#idl-def-AudioScheduledSourceNode * * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C * liability, trademark and document use rules apply. */ [Exposed=Window] interface AudioScheduledSourceNode : AudioNode { attribute EventHandler onended; [Throws] undefined start (optional double when = 0); [Throws] undefined stop (optional double when = 0); }; /* ---------------------- AudioTrack ----------------------------- */ /* ./webidl/AudioTrack.webidl */ /* -*- 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/. * * The origin of this IDL file is * http://www.whatwg.org/specs/web-apps/current-work/#audiotrack */ [Pref="media.track.enabled", Exposed=Window] interface AudioTrack { readonly attribute DOMString id; readonly attribute DOMString kind; readonly attribute DOMString label; readonly attribute DOMString language; attribute boolean enabled; }; /* ---------------------- AudioTrackList ----------------------------- */ /* ./webidl/AudioTrackList.webidl */ /* -*- 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/. * * The origin of this IDL file is * http://www.whatwg.org/specs/web-apps/current-work/#audiotracklist */ [Pref="media.track.enabled", Exposed=Window] interface AudioTrackList : EventTarget { readonly attribute unsigned long length; getter AudioTrack (unsigned long index); AudioTrack? getTrackById(DOMString id); attribute EventHandler onchange; attribute EventHandler onaddtrack; attribute EventHandler onremovetrack; }; /* ---------------------- AudioWorklet ----------------------------- */ /* ./webidl/AudioWorklet.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://webaudio.github.io/web-audio-api/ * * Copyright © 2018 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C * liability, trademark and document use rules apply. */ [Exposed=Window, SecureContext] interface AudioWorklet : Worklet { }; /* ---------------------- AudioWorkletGlobalScope ----------------------------- */ /* ./webidl/AudioWorkletGlobalScope.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://webaudio.github.io/web-audio-api/#audioworkletglobalscope */ callback constructor AudioWorkletProcessorConstructor = AudioWorkletProcessor (object options); [Global=(Worklet,AudioWorklet),Exposed=AudioWorklet] interface AudioWorkletGlobalScope : WorkletGlobalScope { [Throws] undefined registerProcessor (DOMString name, AudioWorkletProcessorConstructor processorCtor); readonly attribute unsigned long long currentFrame; readonly attribute double currentTime; readonly attribute float sampleRate; }; /* ---------------------- AudioWorkletNode ----------------------------- */ /* ./webidl/AudioWorkletNode.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://webaudio.github.io/web-audio-api/ * * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C * liability, trademark and document use rules apply. */ [GenerateConversionToJS] dictionary AudioWorkletNodeOptions : AudioNodeOptions { unsigned long numberOfInputs = 1; unsigned long numberOfOutputs = 1; sequence outputChannelCount; record parameterData; object processorOptions; }; [SecureContext, Exposed=Window] interface AudioWorkletNode : AudioNode { [Throws] constructor(BaseAudioContext context, DOMString name, optional AudioWorkletNodeOptions options = {}); [Throws] readonly attribute AudioParamMap parameters; readonly attribute MessagePort port; attribute EventHandler onprocessorerror; }; /* ---------------------- AudioWorkletProcessor ----------------------------- */ /* ./webidl/AudioWorkletProcessor.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://webaudio.github.io/web-audio-api/#audioworkletprocessor * * Copyright © 2018 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C * liability, trademark and document use rules apply. */ [Exposed=AudioWorklet] interface AudioWorkletProcessor { [Throws] constructor(); readonly attribute MessagePort port; }; /* ---------------------- AutocompleteInfo ----------------------------- */ /* ./webidl/AutocompleteInfo.webidl */ /* -*- 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/. */ /** * This dictionary is used for the input, textarea and select element's * getAutocompleteInfo method. */ dictionary AutocompleteInfo { DOMString section = ""; DOMString addressType = ""; DOMString contactType = ""; DOMString fieldName = ""; DOMString credentialType = ""; boolean canAutomaticallyPersist = true; }; /* ---------------------- BarProp ----------------------------- */ /* ./webidl/BarProp.webidl */ /* -*- 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/. */ [Exposed=Window] interface BarProp { [Throws, NeedsCallerType] attribute boolean visible; }; /* ---------------------- BaseAudioContext ----------------------------- */ /* ./webidl/BaseAudioContext.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://webaudio.github.io/web-audio-api/#idl-def-BaseAudioContext * * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C * liability, trademark and document use rules apply. */ callback DecodeSuccessCallback = undefined (AudioBuffer decodedData); callback DecodeErrorCallback = undefined (DOMException error); enum AudioContextState { "suspended", "running", "closed" }; [Exposed=Window] interface BaseAudioContext : EventTarget { readonly attribute AudioDestinationNode destination; readonly attribute float sampleRate; readonly attribute double currentTime; readonly attribute AudioListener listener; readonly attribute AudioContextState state; [Throws, SameObject, SecureContext] readonly attribute AudioWorklet audioWorklet; [NewObject] Promise resume(); attribute EventHandler onstatechange; [NewObject, Throws] AudioBuffer createBuffer (unsigned long numberOfChannels, unsigned long length, float sampleRate); [NewObject] Promise decodeAudioData(ArrayBuffer audioData, optional DecodeSuccessCallback successCallback, optional DecodeErrorCallback errorCallback); // AudioNode creation [NewObject] AudioBufferSourceNode createBufferSource(); [NewObject] ConstantSourceNode createConstantSource(); [NewObject, Throws] ScriptProcessorNode createScriptProcessor(optional unsigned long bufferSize = 0, optional unsigned long numberOfInputChannels = 2, optional unsigned long numberOfOutputChannels = 2); [NewObject, Throws] AnalyserNode createAnalyser(); [NewObject, Throws] GainNode createGain(); [NewObject, Throws] DelayNode createDelay(optional double maxDelayTime = 1); // TODO: no = 1 [NewObject, Throws] BiquadFilterNode createBiquadFilter(); [NewObject, Throws] IIRFilterNode createIIRFilter(sequence feedforward, sequence feedback); [NewObject, Throws] WaveShaperNode createWaveShaper(); [NewObject, Throws] PannerNode createPanner(); [NewObject, Throws] StereoPannerNode createStereoPanner(); [NewObject, Throws] ConvolverNode createConvolver(); [NewObject, Throws] ChannelSplitterNode createChannelSplitter(optional unsigned long numberOfOutputs = 6); [NewObject, Throws] ChannelMergerNode createChannelMerger(optional unsigned long numberOfInputs = 6); [NewObject, Throws] DynamicsCompressorNode createDynamicsCompressor(); [NewObject, Throws] OscillatorNode createOscillator(); [NewObject, Throws] PeriodicWave createPeriodicWave(sequence real, sequence imag, optional PeriodicWaveConstraints constraints = {}); }; /* ---------------------- BaseKeyframeTypes ----------------------------- */ /* ./webidl/BaseKeyframeTypes.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://drafts.csswg.org/web-animations/#the-compositeoperation-enumeration * https://drafts.csswg.org/web-animations/#dictdef-basepropertyindexedkeyframe * https://drafts.csswg.org/web-animations/#dictdef-basekeyframe * https://drafts.csswg.org/web-animations/#dictdef-basecomputedkeyframe * * Copyright © 2016 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C * liability, trademark and document use rules apply. */ enum CompositeOperation { "replace", "add", "accumulate" }; // NOTE: The order of the values in this enum are important. // // We assume that CompositeOperation is a subset of CompositeOperationOrAuto so // that we can cast between the two types (provided the value is not "auto"). // // If that assumption ceases to hold we will need to update the conversion // in KeyframeUtils::GetAnimationPropertiesFromKeyframes. enum CompositeOperationOrAuto { "replace", "add", "accumulate", "auto" }; // The following dictionary types are not referred to by other .webidl files, // but we use it for manual JS->IDL and IDL->JS conversions in KeyframeEffect's // implementation. [GenerateInit] dictionary BasePropertyIndexedKeyframe { (double? or sequence) offset = []; (UTF8String or sequence) easing = []; (CompositeOperationOrAuto or sequence) composite = []; }; [GenerateInit] dictionary BaseKeyframe { double? offset = null; UTF8String easing = "linear"; [Pref="dom.animations-api.compositing.enabled"] CompositeOperationOrAuto composite = "auto"; // Non-standard extensions // Member to allow testing when StyleAnimationValue::ComputeValues fails. // // Note that we currently only apply this to shorthand properties since // it's easier to annotate shorthand property values and because we have // only ever observed ComputeValues failing on shorthand values. // // Bug 1216844 should remove this member since after that bug is fixed we will // have a well-defined behavior to use when animation endpoints are not // available. [ChromeOnly] boolean simulateComputeValuesFailure = false; }; [GenerateConversionToJS] dictionary BaseComputedKeyframe : BaseKeyframe { double computedOffset; }; /* ---------------------- BasicCardPayment ----------------------------- */ /* ./webidl/BasicCardPayment.webidl */ /* -*- 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/. * * The origin of this WebIDL file is * https://www.w3.org/TR/payment-method-basic-card/ */ [GenerateInit] dictionary BasicCardRequest { sequence supportedNetworks = []; boolean requestSecurityCode = true; }; [GenerateConversionToJS] dictionary BasicCardResponse { DOMString cardholderName = ""; required DOMString cardNumber; DOMString expiryMonth = ""; DOMString expiryYear = ""; DOMString cardSecurityCode = ""; PaymentAddress? billingAddress = null; }; [GenerateConversionToJS] dictionary BasicCardChangeDetails { PaymentAddress? billingAddress = null; }; [GenerateInit] dictionary BasicCardErrors { DOMString cardNumber; DOMString cardholderName; DOMString cardSecurityCode; DOMString expiryMonth; DOMString expiryYear; AddressErrors billingAddress; }; /* ---------------------- BatteryManager ----------------------------- */ /* ./webidl/BatteryManager.webidl */ /* -*- 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/. * * The origin of this IDL file is * http://www.w3.org/TR/battery-status/ * * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C * liability, trademark and document use rules apply. */ [ChromeOnly, Exposed=Window] interface BatteryManager : EventTarget { readonly attribute boolean charging; readonly attribute unrestricted double chargingTime; readonly attribute unrestricted double dischargingTime; readonly attribute double level; attribute EventHandler onchargingchange; attribute EventHandler onchargingtimechange; attribute EventHandler ondischargingtimechange; attribute EventHandler onlevelchange; }; /* ---------------------- BeforeUnloadEvent ----------------------------- */ /* ./webidl/BeforeUnloadEvent.webidl */ /* -*- 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/. * * For more information on this interface, please see * http://www.whatwg.org/specs/web-apps/current-work/#beforeunloadevent */ [Exposed=Window] interface BeforeUnloadEvent : Event { attribute DOMString returnValue; }; /* ---------------------- BiquadFilterNode ----------------------------- */ /* ./webidl/BiquadFilterNode.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://webaudio.github.io/web-audio-api/ * * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C * liability, trademark and document use rules apply. */ enum BiquadFilterType { "lowpass", "highpass", "bandpass", "lowshelf", "highshelf", "peaking", "notch", "allpass" }; dictionary BiquadFilterOptions : AudioNodeOptions { BiquadFilterType type = "lowpass"; float Q = 1; float detune = 0; float frequency = 350; float gain = 0; }; [Pref="dom.webaudio.enabled", Exposed=Window] interface BiquadFilterNode : AudioNode { [Throws] constructor(BaseAudioContext context, optional BiquadFilterOptions options = {}); attribute BiquadFilterType type; readonly attribute AudioParam frequency; // in Hertz readonly attribute AudioParam detune; // in Cents readonly attribute AudioParam Q; // Quality factor readonly attribute AudioParam gain; // in Decibels [Throws] undefined getFrequencyResponse(Float32Array frequencyHz, Float32Array magResponse, Float32Array phaseResponse); }; // Mozilla extension BiquadFilterNode includes AudioNodePassThrough; /* ---------------------- Blob ----------------------------- */ /* ./webidl/Blob.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://w3c.github.io/FileAPI/#blob * * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C * liability, trademark and document use rules apply. */ typedef (BufferSource or Blob or UTF8String) BlobPart; [Exposed=(Window,Worker)] interface Blob { [Throws] constructor(optional sequence blobParts, optional BlobPropertyBag options = {}); [GetterThrows] readonly attribute unsigned long long size; readonly attribute DOMString type; //slice Blob into byte-ranged chunks [Throws] Blob slice(optional [Clamp] long long start, optional [Clamp] long long end, optional DOMString contentType); // read from the Blob. [NewObject, Throws] ReadableStream stream(); [NewObject] Promise text(); [NewObject] Promise arrayBuffer(); }; enum EndingType { "transparent", "native" }; dictionary BlobPropertyBag { DOMString type = ""; EndingType endings = "transparent"; }; partial interface Blob { // This returns the type of BlobImpl used for this Blob. [ChromeOnly] readonly attribute DOMString blobImplType; }; /* ---------------------- BlobEvent ----------------------------- */ /* ./webidl/BlobEvent.webidl */ /* -*- 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/. * * The origin of this IDL file is: * https://w3c.github.io/mediacapture-record/#blobevent-section */ [Exposed=Window] interface BlobEvent : Event { constructor(DOMString type, BlobEventInit eventInitDict); readonly attribute Blob data; }; dictionary BlobEventInit : EventInit { required Blob data; }; /* ---------------------- BroadcastChannel ----------------------------- */ /* ./webidl/BroadcastChannel.webidl */ /* -*- 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/. * * For more information on this interface, please see * https://html.spec.whatwg.org/#broadcastchannel */ [Exposed=(Window,Worker)] interface BroadcastChannel : EventTarget { [Throws] constructor(DOMString channel); readonly attribute DOMString name; [Throws] undefined postMessage(any message); undefined close(); attribute EventHandler onmessage; attribute EventHandler onmessageerror; }; /* ---------------------- BrowserElementDictionaries ----------------------------- */ /* ./webidl/BrowserElementDictionaries.webidl */ /* -*- 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/. * * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C * liability, trademark and document use rules apply. */ [GenerateConversionToJS] dictionary OpenWindowEventDetail { DOMString url = ""; DOMString name = ""; DOMString features = ""; Node? frameElement = null; boolean forceNoReferrer = false; }; [GenerateConversionToJS] dictionary DOMWindowResizeEventDetail { long width = 0; long height = 0; }; /* ---------------------- Cache ----------------------------- */ /* ./webidl/Cache.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://w3c.github.io/ServiceWorker/#cache-interface */ [Exposed=(Window,Worker), Func="nsGlobalWindowInner::CachesEnabled"] interface Cache { [NewObject] Promise match(RequestInfo request, optional CacheQueryOptions options = {}); [NewObject] Promise> matchAll(optional RequestInfo request, optional CacheQueryOptions options = {}); [NewObject, NeedsCallerType] Promise add(RequestInfo request); [NewObject, NeedsCallerType] Promise addAll(sequence requests); [NewObject] Promise put(RequestInfo request, Response response); [NewObject] Promise delete(RequestInfo request, optional CacheQueryOptions options = {}); [NewObject] Promise> keys(optional RequestInfo request, optional CacheQueryOptions options = {}); }; dictionary CacheQueryOptions { boolean ignoreSearch = false; boolean ignoreMethod = false; boolean ignoreVary = false; }; dictionary CacheBatchOperation { DOMString type; Request request; Response response; CacheQueryOptions options; }; /* ---------------------- CacheStorage ----------------------------- */ /* ./webidl/CacheStorage.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://w3c.github.io/ServiceWorker/#cachestorage-interface */ interface Principal; [Exposed=(Window,Worker), Func="nsGlobalWindowInner::CachesEnabled"] interface CacheStorage { [Throws, ChromeOnly] constructor(CacheStorageNamespace namespace, Principal principal); [NewObject] Promise match(RequestInfo request, optional MultiCacheQueryOptions options = {}); [NewObject] Promise has(DOMString cacheName); [NewObject] Promise open(DOMString cacheName); [NewObject] Promise delete(DOMString cacheName); [NewObject] Promise> keys(); }; dictionary MultiCacheQueryOptions : CacheQueryOptions { DOMString cacheName; }; // chrome-only, gecko specific extension enum CacheStorageNamespace { "content", "chrome" }; /* ---------------------- CancelContentJSOptions ----------------------------- */ /* ./webidl/CancelContentJSOptions.webidl */ /* 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/. */ [GenerateInit] dictionary CancelContentJSOptions { long index = 0; URI? uri = null; long epoch = 0; }; /* ---------------------- CanvasCaptureMediaStream ----------------------------- */ /* ./webidl/CanvasCaptureMediaStream.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://w3c.github.io/mediacapture-fromelement/index.html * * Copyright © 2015 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved. * W3C liability, trademark and document use rules apply. */ [Exposed=Window] interface CanvasCaptureMediaStream : MediaStream { readonly attribute HTMLCanvasElement canvas; undefined requestFrame(); }; /* ---------------------- CanvasRenderingContext2D ----------------------------- */ /* ./webidl/CanvasRenderingContext2D.webidl */ /* -*- 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/. * * The origin of this IDL file is * http://www.whatwg.org/specs/web-apps/current-work/ * * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and * Opera Software ASA. You are granted a license to use, reproduce * and create derivative works of this document. */ enum CanvasWindingRule { "nonzero", "evenodd" }; enum CanvasLineCap { "butt", "round", "square" }; enum CanvasLineJoin { "round", "bevel", "miter" }; enum CanvasTextAlign { "start", "end", "left", "right", "center" }; enum CanvasTextBaseline { "top", "hanging", "middle", "alphabetic", "ideographic", "bottom" }; enum CanvasDirection { "ltr", "rtl", "inherit" }; enum CanvasFontKerning { "auto", "normal", "none" }; enum CanvasFontStretch { "ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "normal", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded" }; enum CanvasFontVariantCaps { "normal", "small-caps", "all-small-caps", "petite-caps", "all-petite-caps", "unicase", "titling-caps" }; enum CanvasTextRendering { "auto", "optimizeSpeed", "optimizeLegibility", "geometricPrecision" }; [GenerateInit] dictionary CanvasRenderingContext2DSettings { // signal if the canvas contains an alpha channel boolean alpha = true; boolean desynchronized = false; PredefinedColorSpace colorSpace = "srgb"; // whether or not we're planning to do a lot of readback operations boolean willReadFrequently = false; }; dictionary HitRegionOptions { Path2D? path = null; DOMString id = ""; Element? control = null; }; typedef (HTMLImageElement or SVGImageElement) HTMLOrSVGImageElement; typedef (HTMLOrSVGImageElement or HTMLCanvasElement or HTMLVideoElement or OffscreenCanvas or ImageBitmap or VideoFrame) CanvasImageSource; [Exposed=Window] interface CanvasRenderingContext2D { // back-reference to the canvas. Might be null if we're not // associated with a canvas. readonly attribute HTMLCanvasElement? canvas; CanvasRenderingContext2DSettings getContextAttributes(); // Show the caret if appropriate when drawing [Func="CanvasUtils::HasDrawWindowPrivilege"] const unsigned long DRAWWINDOW_DRAW_CARET = 0x01; // Don't flush pending layout notifications that could otherwise // be batched up [Func="CanvasUtils::HasDrawWindowPrivilege"] const unsigned long DRAWWINDOW_DO_NOT_FLUSH = 0x02; // Draw scrollbars and scroll the viewport if they are present [Func="CanvasUtils::HasDrawWindowPrivilege"] const unsigned long DRAWWINDOW_DRAW_VIEW = 0x04; // Use the widget layer manager if available. This means hardware // acceleration may be used, but it might actually be slower or // lower quality than normal. It will however more accurately reflect // the pixels rendered to the screen. [Func="CanvasUtils::HasDrawWindowPrivilege"] const unsigned long DRAWWINDOW_USE_WIDGET_LAYERS = 0x08; // Don't synchronously decode images - draw what we have [Func="CanvasUtils::HasDrawWindowPrivilege"] const unsigned long DRAWWINDOW_ASYNC_DECODE_IMAGES = 0x10; /** * Renders a region of a window into the canvas. The contents of * the window's viewport are rendered, ignoring viewport clipping * and scrolling. * * @param x * @param y * @param w * @param h specify the area of the window to render, in CSS * pixels. * * @param backgroundColor the canvas is filled with this color * before we render the window into it. This color may be * transparent/translucent. It is given as a CSS color string * (e.g., rgb() or rgba()). * * @param flags Used to better control the drawWindow call. * Flags can be ORed together. * * Of course, the rendering obeys the current scale, transform and * globalAlpha values. * * Hints: * -- If 'rgba(0,0,0,0)' is used for the background color, the * drawing will be transparent wherever the window is transparent. * -- Top-level browsed documents are usually not transparent * because the user's background-color preference is applied, * but IFRAMEs are transparent if the page doesn't set a background. * -- If an opaque color is used for the background color, rendering * will be faster because we won't have to compute the window's * transparency. * * This API cannot currently be used by Web content. It is chrome * and Web Extensions (with a permission) only. */ [Throws, NeedsSubjectPrincipal, Func="CanvasUtils::HasDrawWindowPrivilege"] undefined drawWindow(Window window, double x, double y, double w, double h, UTF8String bgColor, optional unsigned long flags = 0); /** * This causes a context that is currently using a hardware-accelerated * backend to fallback to a software one. All state should be preserved. */ [ChromeOnly] undefined demote(); }; CanvasRenderingContext2D includes CanvasState; CanvasRenderingContext2D includes CanvasTransform; CanvasRenderingContext2D includes CanvasCompositing; CanvasRenderingContext2D includes CanvasImageSmoothing; CanvasRenderingContext2D includes CanvasFillStrokeStyles; CanvasRenderingContext2D includes CanvasShadowStyles; CanvasRenderingContext2D includes CanvasFilters; CanvasRenderingContext2D includes CanvasRect; CanvasRenderingContext2D includes CanvasDrawPath; CanvasRenderingContext2D includes CanvasUserInterface; CanvasRenderingContext2D includes CanvasText; CanvasRenderingContext2D includes CanvasDrawImage; CanvasRenderingContext2D includes CanvasImageData; CanvasRenderingContext2D includes CanvasPathDrawingStyles; CanvasRenderingContext2D includes CanvasTextDrawingStyles; CanvasRenderingContext2D includes CanvasPathMethods; interface mixin CanvasState { // state undefined save(); // push state on state stack undefined restore(); // pop state stack and restore state undefined reset(); // reset the rendering context to its default state boolean isContextLost(); // return whether context is lost }; interface mixin CanvasTransform { // transformations (default transform is the identity matrix) [Throws, LenientFloat] undefined scale(double x, double y); [Throws, LenientFloat] undefined rotate(double angle); [Throws, LenientFloat] undefined translate(double x, double y); [Throws, LenientFloat] undefined transform(double a, double b, double c, double d, double e, double f); [NewObject, Throws] DOMMatrix getTransform(); [Throws, LenientFloat] undefined setTransform(double a, double b, double c, double d, double e, double f); [Throws] undefined setTransform(optional DOMMatrix2DInit transform = {}); [Throws] undefined resetTransform(); }; interface mixin CanvasCompositing { attribute unrestricted double globalAlpha; // (default 1.0) [Throws] attribute DOMString globalCompositeOperation; // (default source-over) }; interface mixin CanvasImageSmoothing { // drawing images attribute boolean imageSmoothingEnabled; }; interface mixin CanvasFillStrokeStyles { // colors and styles (see also the CanvasPathDrawingStyles interface) attribute (UTF8String or CanvasGradient or CanvasPattern) strokeStyle; // (default black) attribute (UTF8String or CanvasGradient or CanvasPattern) fillStyle; // (default black) [NewObject] CanvasGradient createLinearGradient(double x0, double y0, double x1, double y1); [NewObject, Throws] CanvasGradient createRadialGradient(double x0, double y0, double r0, double x1, double y1, double r1); [NewObject] CanvasGradient createConicGradient(double angle, double cx, double cy); [NewObject, Throws] CanvasPattern? createPattern(CanvasImageSource image, [LegacyNullToEmptyString] DOMString repetition); }; interface mixin CanvasShadowStyles { [LenientFloat] attribute double shadowOffsetX; // (default 0) [LenientFloat] attribute double shadowOffsetY; // (default 0) [LenientFloat] attribute double shadowBlur; // (default 0) attribute UTF8String shadowColor; // (default transparent black) }; interface mixin CanvasFilters { [SetterThrows] attribute UTF8String filter; // (default empty string = no filter) }; interface mixin CanvasRect { [LenientFloat] undefined clearRect(double x, double y, double w, double h); [LenientFloat] undefined fillRect(double x, double y, double w, double h); [LenientFloat] undefined strokeRect(double x, double y, double w, double h); }; interface mixin CanvasDrawPath { // path API (see also CanvasPathMethods) undefined beginPath(); undefined fill(optional CanvasWindingRule winding = "nonzero"); undefined fill(Path2D path, optional CanvasWindingRule winding = "nonzero"); undefined stroke(); undefined stroke(Path2D path); undefined clip(optional CanvasWindingRule winding = "nonzero"); undefined clip(Path2D path, optional CanvasWindingRule winding = "nonzero"); // NOT IMPLEMENTED undefined resetClip(); [NeedsSubjectPrincipal] boolean isPointInPath(unrestricted double x, unrestricted double y, optional CanvasWindingRule winding = "nonzero"); [NeedsSubjectPrincipal] // Only required because overloads can't have different extended attributes. boolean isPointInPath(Path2D path, unrestricted double x, unrestricted double y, optional CanvasWindingRule winding = "nonzero"); [NeedsSubjectPrincipal] boolean isPointInStroke(double x, double y); [NeedsSubjectPrincipal] // Only required because overloads can't have different extended attributes. boolean isPointInStroke(Path2D path, unrestricted double x, unrestricted double y); }; interface mixin CanvasUserInterface { [Throws] undefined drawFocusIfNeeded(Element element); // NOT IMPLEMENTED undefined scrollPathIntoView(); // NOT IMPLEMENTED undefined scrollPathIntoView(Path path); }; interface mixin CanvasText { // text (see also the CanvasPathDrawingStyles interface) [Throws, LenientFloat] undefined fillText(DOMString text, double x, double y, optional double maxWidth); [Throws, LenientFloat] undefined strokeText(DOMString text, double x, double y, optional double maxWidth); [NewObject, Throws] TextMetrics measureText(DOMString text); }; interface mixin CanvasDrawImage { [Throws, LenientFloat] undefined drawImage(CanvasImageSource image, double dx, double dy); [Throws, LenientFloat] undefined drawImage(CanvasImageSource image, double dx, double dy, double dw, double dh); [Throws, LenientFloat] undefined drawImage(CanvasImageSource image, double sx, double sy, double sw, double sh, double dx, double dy, double dw, double dh); }; // See https://github.com/whatwg/html/issues/6262 for [EnforceRange] usage. interface mixin CanvasImageData { // pixel manipulation [NewObject, Throws] ImageData createImageData([EnforceRange] long sw, [EnforceRange] long sh); [NewObject, Throws] ImageData createImageData(ImageData imagedata); [NewObject, Throws, NeedsSubjectPrincipal] ImageData getImageData([EnforceRange] long sx, [EnforceRange] long sy, [EnforceRange] long sw, [EnforceRange] long sh); [Throws] undefined putImageData(ImageData imagedata, [EnforceRange] long dx, [EnforceRange] long dy); [Throws] undefined putImageData(ImageData imagedata, [EnforceRange] long dx, [EnforceRange] long dy, [EnforceRange] long dirtyX, [EnforceRange] long dirtyY, [EnforceRange] long dirtyWidth, [EnforceRange] long dirtyHeight); }; interface mixin CanvasPathDrawingStyles { // line caps/joins [LenientFloat] attribute double lineWidth; // (default 1) attribute CanvasLineCap lineCap; // (default "butt") attribute CanvasLineJoin lineJoin; // (default "miter") [LenientFloat] attribute double miterLimit; // (default 10) // dashed lines [LenientFloat, Throws] undefined setLineDash(sequence segments); // default empty sequence getLineDash(); [LenientFloat] attribute double lineDashOffset; }; interface mixin CanvasTextDrawingStyles { // text [SetterThrows] attribute UTF8String font; // (default 10px sans-serif) attribute CanvasTextAlign textAlign; // (default: "start") attribute CanvasTextBaseline textBaseline; // (default: "alphabetic") attribute CanvasDirection direction; // (default: "inherit") attribute UTF8String letterSpacing; // default: "0px" attribute CanvasFontKerning fontKerning; // (default: "auto") attribute CanvasFontStretch fontStretch; // (default: "normal") attribute CanvasFontVariantCaps fontVariantCaps; // (default: "normal") attribute CanvasTextRendering textRendering; // (default: "auto") attribute UTF8String wordSpacing; // default: "0px" }; interface mixin CanvasPathMethods { // shared path API methods undefined closePath(); [LenientFloat] undefined moveTo(double x, double y); [LenientFloat] undefined lineTo(double x, double y); [LenientFloat] undefined quadraticCurveTo(double cpx, double cpy, double x, double y); [LenientFloat] undefined bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); [Throws, LenientFloat] undefined arcTo(double x1, double y1, double x2, double y2, double radius); // NOT IMPLEMENTED [LenientFloat] undefined arcTo(double x1, double y1, double x2, double y2, double radiusX, double radiusY, double rotation); [LenientFloat] undefined rect(double x, double y, double w, double h); [Throws] undefined roundRect(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h, optional (unrestricted double or DOMPointInit or sequence<(unrestricted double or DOMPointInit)>) radii = 0); [Throws, LenientFloat] undefined arc(double x, double y, double radius, double startAngle, double endAngle, optional boolean anticlockwise = false); [Throws, LenientFloat] undefined ellipse(double x, double y, double radiusX, double radiusY, double rotation, double startAngle, double endAngle, optional boolean anticlockwise = false); }; [Exposed=(Window,Worker), Func="mozilla::dom::OffscreenCanvas::PrefEnabledOnWorkerThread"] interface CanvasGradient { // opaque object [Throws] // addColorStop should take a double undefined addColorStop(float offset, UTF8String color); }; [Exposed=(Window,Worker), Func="mozilla::dom::OffscreenCanvas::PrefEnabledOnWorkerThread"] interface CanvasPattern { // opaque object // [Throws, LenientFloat] - could not do this overload because of bug 1020975 // undefined setTransform(double a, double b, double c, double d, double e, double f); [Throws] undefined setTransform(optional DOMMatrix2DInit matrix = {}); }; [Exposed=(Window,Worker)] interface TextMetrics { // x-direction readonly attribute double width; // advance width // [experimental] actualBoundingBox* attributes [Pref="dom.textMetrics.actualBoundingBox.enabled"] readonly attribute double actualBoundingBoxLeft; [Pref="dom.textMetrics.actualBoundingBox.enabled"] readonly attribute double actualBoundingBoxRight; // y-direction // [experimental] fontBoundingBox* attributes [Pref="dom.textMetrics.fontBoundingBox.enabled"] readonly attribute double fontBoundingBoxAscent; [Pref="dom.textMetrics.fontBoundingBox.enabled"] readonly attribute double fontBoundingBoxDescent; // [experimental] actualBoundingBox* attributes [Pref="dom.textMetrics.actualBoundingBox.enabled"] readonly attribute double actualBoundingBoxAscent; [Pref="dom.textMetrics.actualBoundingBox.enabled"] readonly attribute double actualBoundingBoxDescent; // [experimental] emHeight* attributes [Pref="dom.textMetrics.emHeight.enabled"] readonly attribute double emHeightAscent; [Pref="dom.textMetrics.emHeight.enabled"] readonly attribute double emHeightDescent; // [experimental] *Baseline attributes [Pref="dom.textMetrics.baselines.enabled"] readonly attribute double hangingBaseline; [Pref="dom.textMetrics.baselines.enabled"] readonly attribute double alphabeticBaseline; [Pref="dom.textMetrics.baselines.enabled"] readonly attribute double ideographicBaseline; }; [Exposed=(Window,Worker)] interface Path2D { constructor(); constructor(Path2D other); constructor(DOMString pathString); [Throws] undefined addPath(Path2D path, optional DOMMatrix2DInit transform = {}); }; Path2D includes CanvasPathMethods; /* ---------------------- CaretPosition ----------------------------- */ /* ./webidl/CaretPosition.webidl */ /* 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/. */ [Exposed=Window] interface CaretPosition { /** * The offsetNode could potentially be null due to anonymous content. */ readonly attribute Node? offsetNode; readonly attribute unsigned long offset; }; /** * Gecko specific methods and properties for CaretPosition. */ partial interface CaretPosition { DOMRect? getClientRect(); }; /* ---------------------- CaretStateChangedEvent ----------------------------- */ /* ./webidl/CaretStateChangedEvent.webidl */ /* -*- 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/. */ enum CaretChangedReason { "visibilitychange", "updateposition", "longpressonemptycontent", "taponcaret", "presscaret", "releasecaret", "scroll", "dragcaret" }; dictionary CaretStateChangedEventInit : EventInit { boolean collapsed = true; DOMRectReadOnly? boundingClientRect = null; CaretChangedReason reason = "visibilitychange"; boolean caretVisible = false; boolean caretVisuallyVisible = false; boolean selectionVisible = false; boolean selectionEditable = false; DOMString selectedTextContent = ""; long clientX = 0; long clientY = 0; }; [ChromeOnly, Exposed=Window] interface CaretStateChangedEvent : Event { constructor(DOMString type, optional CaretStateChangedEventInit eventInit = {}); readonly attribute boolean collapsed; /* The bounding client rect is relative to the visual viewport. */ readonly attribute DOMRectReadOnly? boundingClientRect; readonly attribute CaretChangedReason reason; readonly attribute boolean caretVisible; readonly attribute boolean caretVisuallyVisible; readonly attribute boolean selectionVisible; readonly attribute boolean selectionEditable; readonly attribute DOMString selectedTextContent; [Pref="layout.accessiblecaret.magnifier.enabled"] readonly attribute long clientX; [Pref="layout.accessiblecaret.magnifier.enabled"] readonly attribute long clientY; }; /* ---------------------- CDATASection ----------------------------- */ /* ./webidl/CDATASection.webidl */ /* -*- 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/. */ [Exposed=Window] interface CDATASection : Text { }; /* ---------------------- ChannelMergerNode ----------------------------- */ /* ./webidl/ChannelMergerNode.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://webaudio.github.io/web-audio-api/ * * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C * liability, trademark and document use rules apply. */ dictionary ChannelMergerOptions : AudioNodeOptions { unsigned long numberOfInputs = 6; }; [Pref="dom.webaudio.enabled", Exposed=Window] interface ChannelMergerNode : AudioNode { [Throws] constructor(BaseAudioContext context, optional ChannelMergerOptions options = {}); }; /* ---------------------- ChannelSplitterNode ----------------------------- */ /* ./webidl/ChannelSplitterNode.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://webaudio.github.io/web-audio-api/ * * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C * liability, trademark and document use rules apply. */ dictionary ChannelSplitterOptions : AudioNodeOptions { unsigned long numberOfOutputs = 6; }; [Pref="dom.webaudio.enabled", Exposed=Window] interface ChannelSplitterNode : AudioNode { [Throws] constructor(BaseAudioContext context, optional ChannelSplitterOptions options = {}); }; /* ---------------------- CharacterData ----------------------------- */ /* ./webidl/CharacterData.webidl */ /* -*- 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/. * * The origin of this IDL file is * http://dom.spec.whatwg.org/#characterdata * * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C * liability, trademark and document use rules apply. */ [Exposed=Window] interface CharacterData : Node { [Pure, SetterThrows] attribute [LegacyNullToEmptyString] DOMString data; [Pure] readonly attribute unsigned long length; [Throws] DOMString substringData(unsigned long offset, unsigned long count); [Throws] undefined appendData(DOMString data); [Throws] undefined insertData(unsigned long offset, DOMString data); [Throws] undefined deleteData(unsigned long offset, unsigned long count); [Throws] undefined replaceData(unsigned long offset, unsigned long count, DOMString data); }; CharacterData includes ChildNode; CharacterData includes NonDocumentTypeChildNode; /* ---------------------- CheckerboardReportService ----------------------------- */ /* ./webidl/CheckerboardReportService.webidl */ /* -*- 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/. */ /* * This file declares data structures used to communicate checkerboard reports * from C++ code to about:checkerboard (see bug 1238042). These dictionaries * are NOT exposed to standard web content. */ enum CheckerboardReason { "severe", "recent" }; // Individual checkerboard report. Contains fields for the severity of the // checkerboard event, the timestamp at which it was reported, the detailed // log of the event, and the reason this report was saved (currently either // "severe" or "recent"). dictionary CheckerboardReport { unsigned long severity; DOMTimeStamp timestamp; // milliseconds since epoch DOMString log; CheckerboardReason reason; }; // The guard function only allows creation of this interface on the // about:checkerboard page, and only if it's in the parent process. [Func="mozilla::dom::CheckerboardReportService::IsEnabled", Exposed=Window] interface CheckerboardReportService { constructor(); /** * Gets the available checkerboard reports. */ sequence getReports(); /** * Gets the state of the apz.record_checkerboarding pref. */ boolean isRecordingEnabled(); /** * Sets the state of the apz.record_checkerboarding pref. */ undefined setRecordingEnabled(boolean aEnabled); /** * Flush any in-progress checkerboard reports. Since this happens * asynchronously, the caller may register an observer with the observer * service to be notified when this operation is complete. The observer should * listen for the topic "APZ:FlushActiveCheckerboard:Done". Upon receiving * this notification, the caller may call getReports() to obtain the flushed * reports, along with any other reports that are available. */ undefined flushActiveReports(); }; /* ---------------------- ChildNode ----------------------------- */ /* ./webidl/ChildNode.webidl */ /* -*- 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/. * * The origin of this IDL file is * http://dom.spec.whatwg.org/#interface-childnode */ interface mixin ChildNode { [CEReactions, Throws, Unscopable] undefined before((Node or DOMString)... nodes); [CEReactions, Throws, Unscopable] undefined after((Node or DOMString)... nodes); [CEReactions, Throws, Unscopable] undefined replaceWith((Node or DOMString)... nodes); [CEReactions, Unscopable] undefined remove(); }; interface mixin NonDocumentTypeChildNode { [Pure] readonly attribute Element? previousElementSibling; [Pure] readonly attribute Element? nextElementSibling; }; /* ---------------------- Client ----------------------------- */ /* ./webidl/Client.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://w3c.github.io/ServiceWorker/#client-interface * */ [Exposed=ServiceWorker] interface Client { readonly attribute USVString url; // Remove frameType in bug 1290936 [BinaryName="GetFrameType"] readonly attribute FrameType frameType; readonly attribute ClientType type; readonly attribute DOMString id; // Implement reserved in bug 1264177 // readonly attribute boolean reserved; [Throws] undefined postMessage(any message, sequence transfer); [Throws] undefined postMessage(any message, optional StructuredSerializeOptions aOptions = {}); }; [Exposed=ServiceWorker] interface WindowClient : Client { [BinaryName="GetVisibilityState"] readonly attribute VisibilityState visibilityState; readonly attribute boolean focused; // Implement ancestorOrigins in bug 1264180 // [SameObject] readonly attribute FrozenArray ancestorOrigins; [Throws, NewObject, NeedsCallerType] Promise focus(); [Throws, NewObject] Promise navigate(USVString url); }; // Remove FrameType in bug 1290936 enum FrameType { "auxiliary", "top-level", "nested", "none" }; /* ---------------------- Clients ----------------------------- */ /* ./webidl/Clients.webidl */ /* -*- 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/. * * The origin of this IDL file is * http://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html * */ [Exposed=ServiceWorker] interface Clients { // The objects returned will be new instances every time [NewObject] Promise<(Client or undefined)> get(DOMString id); [NewObject] Promise> matchAll(optional ClientQueryOptions options = {}); [NewObject] Promise openWindow(USVString url); [NewObject] Promise claim(); }; dictionary ClientQueryOptions { boolean includeUncontrolled = false; ClientType type = "window"; }; enum ClientType { "window", "worker", "sharedworker", // https://github.com/w3c/ServiceWorker/issues/1036 "serviceworker", "all" }; /* ---------------------- Clipboard ----------------------------- */ /* ./webidl/Clipboard.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://w3c.github.io/clipboard-apis/ * * Copyright © 2018 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C * liability, trademark and document use rules apply. */ typedef sequence ClipboardItems; [SecureContext, Exposed=Window, InstrumentedProps=(read,readText,write)] interface Clipboard : EventTarget { [Pref="dom.events.asyncClipboard.clipboardItem", NewObject, NeedsSubjectPrincipal] Promise read(); [Func="Clipboard::ReadTextEnabled", NewObject, NeedsSubjectPrincipal] Promise readText(); [Pref="dom.events.asyncClipboard.clipboardItem", NewObject, NeedsSubjectPrincipal] Promise write(ClipboardItems data); [NewObject, NeedsSubjectPrincipal] Promise writeText(DOMString data); }; typedef (DOMString or Blob) ClipboardItemDataType; typedef Promise ClipboardItemData; // callback ClipboardItemDelayedCallback = ClipboardItemData (); [SecureContext, Exposed=Window, Pref="dom.events.asyncClipboard.clipboardItem"] interface ClipboardItem { [Throws] constructor(record items, optional ClipboardItemOptions options = {}); // static ClipboardItem createDelayed( // record items, // optional ClipboardItemOptions options = {}); readonly attribute PresentationStyle presentationStyle; // readonly attribute long long lastModified; // readonly attribute boolean delayed; // TODO: Use FrozenArray once available. (Bug 1236777) // readonly attribute FrozenArray types; [Frozen, Cached, Pure] readonly attribute sequence types; [NewObject] Promise getType(DOMString type); }; enum PresentationStyle { "unspecified", "inline", "attachment" }; dictionary ClipboardItemOptions { PresentationStyle presentationStyle = "unspecified"; }; /* ---------------------- ClipboardEvent ----------------------------- */ /* ./webidl/ClipboardEvent.webidl */ /* -*- 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/. * * For more information on this interface please see * http://dev.w3.org/2006/webapi/clipops/#x5-clipboard-event-interfaces * * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C * liability, trademark and document use rules apply. */ [Exposed=Window] interface ClipboardEvent : Event { [Throws] constructor(DOMString type, optional ClipboardEventInit eventInitDict = {}); readonly attribute DataTransfer? clipboardData; }; dictionary ClipboardEventInit : EventInit { DOMString data = ""; DOMString dataType = ""; }; /* ---------------------- CloseEvent ----------------------------- */ /* ./webidl/CloseEvent.webidl */ /* -*- 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/. * * The nsIDOMCloseEvent interface is the interface to the event * close on a WebSocket object. * * For more information on this interface, please see * http://www.whatwg.org/specs/web-apps/current-work/multipage/network.html#closeevent */ [LegacyEventInit, Exposed=(Window,Worker)] interface CloseEvent : Event { constructor(DOMString type, optional CloseEventInit eventInitDict = {}); readonly attribute boolean wasClean; readonly attribute unsigned short code; readonly attribute DOMString reason; }; dictionary CloseEventInit : EventInit { boolean wasClean = false; unsigned short code = 0; DOMString reason = ""; }; /* ---------------------- Comment ----------------------------- */ /* ./webidl/Comment.webidl */ /* -*- 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/. * * The origin of this IDL file is * http://dom.spec.whatwg.org/#comment * * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C * liability, trademark and document use rules apply. */ [Exposed=Window] interface Comment : CharacterData { [Throws] constructor(optional DOMString data = ""); }; /* ---------------------- CompositionEvent ----------------------------- */ /* ./webidl/CompositionEvent.webidl */ /* -*- 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/. * * https://w3c.github.io/uievents/#interface-compositionevent * * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C * liability, trademark and document use rules apply. */ [Exposed=Window] interface CompositionEvent : UIEvent { constructor(DOMString type, optional CompositionEventInit eventInitDict = {}); readonly attribute DOMString? data; // locale is currently non-standard readonly attribute DOMString locale; /** * ranges is trying to expose TextRangeArray in Gecko so a * js-plugin couble be able to know the clauses information */ [ChromeOnly,Cached,Pure] readonly attribute sequence ranges; }; dictionary CompositionEventInit : UIEventInit { DOMString data = ""; }; partial interface CompositionEvent { undefined initCompositionEvent(DOMString typeArg, optional boolean canBubbleArg = false, optional boolean cancelableArg = false, optional Window? viewArg = null, optional DOMString? dataArg = null, optional DOMString localeArg = ""); }; /* ---------------------- CompressionStream ----------------------------- */ /* ./webidl/CompressionStream.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://wicg.github.io/compression/#compression-stream */ enum CompressionFormat { "deflate", "deflate-raw", "gzip", }; [Exposed=*, Pref="dom.compression_streams.enabled"] interface CompressionStream { [Throws] constructor(CompressionFormat format); }; CompressionStream includes GenericTransformStream; /* ---------------------- Console ----------------------------- */ /* ./webidl/Console.webidl */ /* -*- Mode: IDL; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim: set ts=2 et sw=2 tw=80: */ /* 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/. * * For more information on this interface, please see * https://console.spec.whatwg.org/#console-namespace */ [Exposed=(Window,Worker,WorkerDebugger,Worklet), ClassString="Console", ProtoObjectHack] namespace console { // NOTE: if you touch this namespace, remember to update the ConsoleInstance // interface as well! - dom/chrome-webidl/ConsoleInstance.webidl // Logging [UseCounter] undefined assert(optional boolean condition = false, any... data); [UseCounter] undefined clear(); [UseCounter] undefined count(optional DOMString label = "default"); [UseCounter] undefined countReset(optional DOMString label = "default"); [UseCounter] undefined debug(any... data); [UseCounter] undefined error(any... data); [UseCounter] undefined info(any... data); [UseCounter] undefined log(any... data); [UseCounter] undefined table(any... data); // FIXME: The spec is still unclear about this. [UseCounter] undefined trace(any... data); [UseCounter] undefined warn(any... data); [UseCounter] undefined dir(any... data); // FIXME: This doesn't follow the spec yet. [UseCounter] undefined dirxml(any... data); // Grouping [UseCounter] undefined group(any... data); [UseCounter] undefined groupCollapsed(any... data); [UseCounter] undefined groupEnd(); // Timing [UseCounter] undefined time(optional DOMString label = "default"); [UseCounter] undefined timeLog(optional DOMString label = "default", any... data); [UseCounter] undefined timeEnd(optional DOMString label = "default"); // Mozilla only or Webcompat methods [UseCounter] undefined _exception(any... data); [UseCounter] undefined timeStamp(optional any data); [UseCounter] undefined profile(any... data); [UseCounter] undefined profileEnd(any... data); [ChromeOnly] const boolean IS_NATIVE_CONSOLE = true; [ChromeOnly, NewObject] ConsoleInstance createInstance(optional ConsoleInstanceOptions options = {}); }; /* ---------------------- ConstantSourceNode ----------------------------- */ /* ./webidl/ConstantSourceNode.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://webaudio.github.io/web-audio-api/ * * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C * liability, trademark and document use rules apply. */ dictionary ConstantSourceOptions { float offset = 1; }; [Pref="dom.webaudio.enabled", Exposed=Window] interface ConstantSourceNode : AudioScheduledSourceNode { constructor(BaseAudioContext context, optional ConstantSourceOptions options = {}); readonly attribute AudioParam offset; }; /* ---------------------- ContentVisibilityAutoStateChangeEvent ----------------------------- */ /* ./webidl/ContentVisibilityAutoStateChangeEvent.webidl */ /* -*- 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/. * * https://drafts.csswg.org/css-contain-2/#content-visibility-auto-state-changed */ [Exposed=Window, Pref="layout.css.content-visibility.enabled"] interface ContentVisibilityAutoStateChangeEvent : Event { constructor(DOMString type, optional ContentVisibilityAutoStateChangeEventInit eventInitDict = {}); readonly attribute boolean skipped; }; dictionary ContentVisibilityAutoStateChangeEventInit : EventInit { boolean skipped = false; }; /* ---------------------- ConvolverNode ----------------------------- */ /* ./webidl/ConvolverNode.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://webaudio.github.io/web-audio-api/ * * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C * liability, trademark and document use rules apply. */ dictionary ConvolverOptions : AudioNodeOptions { AudioBuffer? buffer; boolean disableNormalization = false; }; [Pref="dom.webaudio.enabled", Exposed=Window] interface ConvolverNode : AudioNode { [Throws] constructor(BaseAudioContext context, optional ConvolverOptions options = {}); [SetterThrows] attribute AudioBuffer? buffer; attribute boolean normalize; }; // Mozilla extension ConvolverNode includes AudioNodePassThrough; /* ---------------------- CreateOfferRequest ----------------------------- */ /* ./webidl/CreateOfferRequest.webidl */ /* -*- 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/. * * This is an internal IDL file */ [ChromeOnly, JSImplementation="@mozilla.org/dom/createofferrequest;1", Exposed=Window] interface CreateOfferRequest { readonly attribute unsigned long long windowID; readonly attribute unsigned long long innerWindowID; readonly attribute DOMString callID; readonly attribute boolean isSecure; }; /* ---------------------- CredentialManagement ----------------------------- */ /* ./webidl/CredentialManagement.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://w3c.github.io/webappsec-credential-management/ * and * https://w3c.github.io/webauthn/ * and * https://fedidcg.github.io/FedCM/ */ [Exposed=Window, SecureContext] interface Credential { readonly attribute USVString id; readonly attribute DOMString type; }; [Exposed=Window, SecureContext] interface CredentialsContainer { [NewObject] Promise get(optional CredentialRequestOptions options = {}); [NewObject] Promise create(optional CredentialCreationOptions options = {}); [NewObject] Promise store(Credential credential); [NewObject] Promise preventSilentAccess(); }; dictionary CredentialRequestOptions { CredentialMediationRequirement mediation = "optional"; AbortSignal signal; // This is taken from the partial definition in // https://w3c.github.io/webauthn/#sctn-credentialrequestoptions-extension [Pref="security.webauth.webauthn"] PublicKeyCredentialRequestOptions publicKey; // This is taken from the partial definition in // https://fedidcg.github.io/FedCM/#browser-api-credential-request-options [Pref="dom.security.credentialmanagement.identity.enabled"] IdentityCredentialRequestOptions identity; }; enum CredentialMediationRequirement { "silent", "optional", "conditional", "required" }; dictionary CredentialCreationOptions { // This is taken from the partial definition in // https://w3c.github.io/webauthn/#sctn-credentialcreationoptions-extension [Pref="security.webauth.webauthn"] PublicKeyCredentialCreationOptions publicKey; AbortSignal signal; }; /* ---------------------- Crypto ----------------------------- */ /* ./webidl/Crypto.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/Overview.html#crypto-interface */ [Exposed=(Window,Worker)] interface mixin GlobalCrypto { [Throws] readonly attribute Crypto crypto; }; [Exposed=(Window,Worker)] interface Crypto { [SecureContext] readonly attribute SubtleCrypto subtle; [Throws] ArrayBufferView getRandomValues(ArrayBufferView array); [SecureContext] UTF8String randomUUID(); }; /* ---------------------- CSPDictionaries ----------------------------- */ /* ./webidl/CSPDictionaries.webidl */ /* 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/. */ /** * Dictionary used to display CSP info. */ dictionary CSP { boolean report-only = false; sequence default-src; sequence script-src; sequence object-src; sequence style-src; sequence img-src; sequence media-src; sequence frame-src; sequence font-src; sequence connect-src; sequence report-uri; sequence frame-ancestors; // sequence reflected-xss; // not supported in Firefox sequence base-uri; sequence form-action; sequence referrer; sequence manifest-src; sequence upgrade-insecure-requests; sequence child-src; sequence block-all-mixed-content; sequence sandbox; sequence worker-src; sequence script-src-elem; sequence script-src-attr; }; [GenerateToJSON] dictionary CSPPolicies { sequence csp-policies; }; /* ---------------------- CSPReport ----------------------------- */ /* ./webidl/CSPReport.webidl */ /* 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/. */ /** * This dictionary holds the parameters used to send * CSP reports in JSON format. * * Based on https://w3c.github.io/webappsec-csp/#deprecated-serialize-violation */ dictionary CSPReportProperties { DOMString document-uri = ""; DOMString referrer = ""; DOMString blocked-uri = ""; DOMString effective-directive = ""; DOMString violated-directive = ""; DOMString original-policy= ""; SecurityPolicyViolationEventDisposition disposition = "report"; long status-code = 0; DOMString source-file; DOMString script-sample; long line-number; long column-number; }; [GenerateToJSON] dictionary CSPReport { // We always want to have a "csp-report" property, so just pre-initialize it // to an empty dictionary.. CSPReportProperties csp-report = {}; }; /* ---------------------- CSS ----------------------------- */ /* ./webidl/CSS.webidl */ /* -*- 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/. * * The origin of this IDL file is * http://dev.w3.org/csswg/css3-conditional/ * http://dev.w3.org/csswg/cssom/#the-css.escape%28%29-method * https://www.w3.org/TR/css-highlight-api-1/#registration * * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C * liability, trademark and document use rules apply. */ [Exposed=Window] namespace CSS { boolean supports(UTF8String property, UTF8String value); boolean supports(UTF8String conditionText); }; // http://dev.w3.org/csswg/cssom/#the-css.escape%28%29-method partial namespace CSS { DOMString escape(DOMString ident); }; // https://www.w3.org/TR/css-highlight-api-1/#registration partial namespace CSS { [Pref="dom.customHighlightAPI.enabled", GetterThrows] readonly attribute HighlightRegistry highlights; }; // https://drafts.css-houdini.org/css-properties-values-api-1/#registering-custom-properties // See https://github.com/w3c/css-houdini-drafts/pull/1100 for DOMString vs. UTF8String dictionary PropertyDefinition { required UTF8String name; UTF8String syntax = "*"; required boolean inherits; UTF8String initialValue; }; partial namespace CSS { [Pref="layout.css.properties-and-values.enabled", Throws] undefined registerProperty(PropertyDefinition definition); }; /* ---------------------- CSSAnimation ----------------------------- */ /* ./webidl/CSSAnimation.webidl */ /* -*- 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/. * * The origin of this IDL file is * http://dev.w3.org/csswg/css-animations-2/#the-CSSAnimation-interface * * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C * liability, trademark and document use rules apply. */ [HeaderFile="nsAnimationManager.h", Exposed=Window] interface CSSAnimation : Animation { [Constant] readonly attribute DOMString animationName; }; /* ---------------------- CSSConditionRule ----------------------------- */ /* ./webidl/CSSConditionRule.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://drafts.csswg.org/css-conditional/#the-cssconditionrule-interface */ // https://drafts.csswg.org/css-conditional/#the-cssconditionrule-interface [Exposed=Window] interface CSSConditionRule : CSSGroupingRule { readonly attribute UTF8String conditionText; }; /* ---------------------- CSSContainerRule ----------------------------- */ /* ./webidl/CSSContainerRule.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://drafts.csswg.org/css-contain-3/#the-csscontainerrule-interface */ // https://drafts.csswg.org/css-contain-3/#the-csscontainerrule-interface [Exposed=Window, Pref="layout.css.container-queries.enabled"] interface CSSContainerRule : CSSConditionRule { readonly attribute UTF8String containerName; readonly attribute UTF8String containerQuery; // Performs a container query look-up for an element. [ChromeOnly] Element? queryContainerFor(Element element); }; /* ---------------------- CSSCounterStyleRule ----------------------------- */ /* ./webidl/CSSCounterStyleRule.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://drafts.csswg.org/css-counter-styles-3/#the-csscounterstylerule-interface */ // https://drafts.csswg.org/css-counter-styles-3/#the-csscounterstylerule-interface [Exposed=Window] interface CSSCounterStyleRule : CSSRule { attribute DOMString name; attribute UTF8String system; attribute UTF8String symbols; attribute UTF8String additiveSymbols; attribute UTF8String negative; attribute UTF8String prefix; attribute UTF8String suffix; attribute UTF8String range; attribute UTF8String pad; attribute UTF8String speakAs; attribute UTF8String fallback; }; /* ---------------------- CSSFontFaceRule ----------------------------- */ /* ./webidl/CSSFontFaceRule.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://drafts.csswg.org/css-fonts/#om-fontface */ // https://drafts.csswg.org/css-fonts/#om-fontface // But we implement a very old draft, apparently.... // See bug 1058408 for implementing the current spec. [Exposed=Window] interface CSSFontFaceRule : CSSRule { [SameObject] readonly attribute CSSStyleDeclaration style; }; /* ---------------------- CSSFontFeatureValuesRule ----------------------------- */ /* ./webidl/CSSFontFeatureValuesRule.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://drafts.csswg.org/css-fonts/#om-fontfeaturevalues */ // https://drafts.csswg.org/css-fonts/#om-fontfeaturevalues // but we don't implement anything remotely resembling the spec. [Exposed=Window] interface CSSFontFeatureValuesRule : CSSRule { [SetterThrows] attribute UTF8String fontFamily; // Not yet implemented // readonly attribute CSSFontFeatureValuesMap annotation; // readonly attribute CSSFontFeatureValuesMap ornaments; // readonly attribute CSSFontFeatureValuesMap stylistic; // readonly attribute CSSFontFeatureValuesMap swash; // readonly attribute CSSFontFeatureValuesMap characterVariant; // readonly attribute CSSFontFeatureValuesMap styleset; }; partial interface CSSFontFeatureValuesRule { // Gecko addition? [SetterThrows] attribute UTF8String valueText; }; /* ---------------------- CSSFontPaletteValuesRule ----------------------------- */ /* ./webidl/CSSFontPaletteValuesRule.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://drafts.csswg.org/css-fonts/#om-fontpalettevalues */ [Exposed=Window, Pref="layout.css.font-palette.enabled"] interface CSSFontPaletteValuesRule : CSSRule { readonly attribute UTF8String name; readonly attribute UTF8String fontFamily; readonly attribute UTF8String basePalette; readonly attribute UTF8String overrideColors; }; /* ---------------------- CSSGroupingRule ----------------------------- */ /* ./webidl/CSSGroupingRule.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://drafts.csswg.org/cssom/#cssgroupingrule */ // https://drafts.csswg.org/cssom/#cssgroupingrule [Exposed=Window] interface CSSGroupingRule : CSSRule { [SameObject] readonly attribute CSSRuleList cssRules; [Throws] unsigned long insertRule(UTF8String rule, optional unsigned long index = 0); [Throws] undefined deleteRule(unsigned long index); }; /* ---------------------- CSSImportRule ----------------------------- */ /* ./webidl/CSSImportRule.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://drafts.csswg.org/cssom/#cssimportrule */ // https://drafts.csswg.org/cssom/#cssimportrule [Exposed=Window] interface CSSImportRule : CSSRule { readonly attribute DOMString href; // Per spec, the .media is never null, but in our implementation it can // be since stylesheet can be null, and in Stylo, media is derived from // the stylesheet. See . [SameObject, PutForwards=mediaText] readonly attribute MediaList? media; [SameObject, BinaryName="styleSheetForBindings"] readonly attribute CSSStyleSheet? styleSheet; readonly attribute UTF8String? layerName; readonly attribute UTF8String? supportsText; }; /* ---------------------- CSSKeyframeRule ----------------------------- */ /* ./webidl/CSSKeyframeRule.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://drafts.csswg.org/css-animations/#interface-csskeyframerule */ // https://drafts.csswg.org/css-animations/#interface-csskeyframerule [Exposed=Window] interface CSSKeyframeRule : CSSRule { attribute UTF8String keyText; [SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style; }; /* ---------------------- CSSKeyframesRule ----------------------------- */ /* ./webidl/CSSKeyframesRule.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://drafts.csswg.org/css-animations/#interface-csskeyframesrule */ // https://drafts.csswg.org/css-animations/#interface-csskeyframesrule [Exposed=Window] interface CSSKeyframesRule : CSSRule { attribute DOMString name; readonly attribute CSSRuleList cssRules; getter CSSKeyframeRule (unsigned long index); readonly attribute unsigned long length; undefined appendRule(DOMString rule); undefined deleteRule(DOMString select); CSSKeyframeRule? findRule(DOMString select); }; /* ---------------------- CSSLayerBlockRule ----------------------------- */ /* ./webidl/CSSLayerBlockRule.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://drafts.csswg.org/css-cascade-5/#the-csslayerblockrule-interface */ [Exposed=Window] interface CSSLayerBlockRule : CSSGroupingRule { readonly attribute UTF8String name; }; /* ---------------------- CSSLayerStatementRule ----------------------------- */ /* ./webidl/CSSLayerStatementRule.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://drafts.csswg.org/css-cascade-5/#the-csslayerstatementrule-interface */ [Exposed=Window] interface CSSLayerStatementRule : CSSRule { // readonly attribute FrozenArray nameList; [Frozen, Cached, Pure] readonly attribute sequence nameList; }; /* ---------------------- CSSMediaRule ----------------------------- */ /* ./webidl/CSSMediaRule.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://drafts.csswg.org/cssom/#the-cssmediarule-interface * https://drafts.csswg.org/css-conditional/#the-cssmediarule-interface */ // https://drafts.csswg.org/cssom/#the-cssmediarule-interface and // https://drafts.csswg.org/css-conditional/#the-cssmediarule-interface // except they disagree with each other. We're taking the inheritance from // css-conditional and the PutForwards behavior from cssom. [Exposed=Window] interface CSSMediaRule : CSSConditionRule { [SameObject, PutForwards=mediaText] readonly attribute MediaList media; }; /* ---------------------- CSSMozDocumentRule ----------------------------- */ /* ./webidl/CSSMozDocumentRule.webidl */ /* -*- 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/. */ // This is a non-standard interface for @-moz-document rules [Exposed=Window] interface CSSMozDocumentRule : CSSConditionRule { // XXX Add access to the URL list. }; /* ---------------------- CSSNamespaceRule ----------------------------- */ /* ./webidl/CSSNamespaceRule.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://drafts.csswg.org/cssom/#cssnamespacerule */ // https://drafts.csswg.org/cssom/#cssnamespacerule [Exposed=Window] interface CSSNamespaceRule : CSSRule { readonly attribute DOMString namespaceURI; readonly attribute DOMString prefix; }; /* ---------------------- CSSPageRule ----------------------------- */ /* ./webidl/CSSPageRule.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://drafts.csswg.org/cssom/#the-csspagerule-interface */ // https://drafts.csswg.org/cssom/#the-csspagerule-interface // Per spec, this should inherit from CSSGroupingRule, but we don't // implement this yet. [Exposed=Window] interface CSSPageRule : CSSRule { attribute UTF8String selectorText; [SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style; }; /* ---------------------- CSSPropertyRule ----------------------------- */ /* ./webidl/CSSPropertyRule.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://drafts.css-houdini.org/css-properties-values-api-1/#the-css-property-rule-interface */ // https://drafts.css-houdini.org/css-properties-values-api-1/#the-css-property-rule-interface [Exposed=Window, Pref="layout.css.properties-and-values.enabled"] interface CSSPropertyRule : CSSRule { readonly attribute UTF8String name; readonly attribute UTF8String syntax; readonly attribute boolean inherits; readonly attribute UTF8String? initialValue; }; /* ---------------------- CSSPseudoElement ----------------------------- */ /* ./webidl/CSSPseudoElement.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://drafts.csswg.org/css-pseudo-4/#csspseudoelement * * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C * liability, trademark and document use rules apply. */ [Pref="dom.css_pseudo_element.enabled", Exposed=Window] interface CSSPseudoElement { readonly attribute DOMString type; readonly attribute Element element; }; /* ---------------------- CSSRule ----------------------------- */ /* ./webidl/CSSRule.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://drafts.csswg.org/cssom/#the-cssrule-interface * https://drafts.csswg.org/css-animations/#interface-cssrule * https://drafts.csswg.org/css-counter-styles-3/#extentions-to-cssrule-interface * https://drafts.csswg.org/css-conditional-3/#extentions-to-cssrule-interface * https://drafts.csswg.org/css-fonts-3/#om-fontfeaturevalues */ // https://drafts.csswg.org/cssom/#the-cssrule-interface [Exposed=Window] interface CSSRule { const unsigned short STYLE_RULE = 1; const unsigned short CHARSET_RULE = 2; // historical const unsigned short IMPORT_RULE = 3; const unsigned short MEDIA_RULE = 4; const unsigned short FONT_FACE_RULE = 5; const unsigned short PAGE_RULE = 6; // FIXME: We don't support MARGIN_RULE yet. // XXXbz Should we expose the constant anyway? // const unsigned short MARGIN_RULE = 9; const unsigned short NAMESPACE_RULE = 10; [BinaryName="typeForBindings"] readonly attribute unsigned short type; attribute UTF8String cssText; readonly attribute CSSRule? parentRule; readonly attribute CSSStyleSheet? parentStyleSheet; }; // https://drafts.csswg.org/css-animations/#interface-cssrule partial interface CSSRule { const unsigned short KEYFRAMES_RULE = 7; const unsigned short KEYFRAME_RULE = 8; }; // https://drafts.csswg.org/css-counter-styles-3/#extentions-to-cssrule-interface partial interface CSSRule { const unsigned short COUNTER_STYLE_RULE = 11; }; // https://drafts.csswg.org/css-conditional-3/#extentions-to-cssrule-interface partial interface CSSRule { const unsigned short SUPPORTS_RULE = 12; }; // Non-standard extension for @-moz-document rules. partial interface CSSRule { [ChromeOnly] const unsigned short DOCUMENT_RULE = 13; }; // https://drafts.csswg.org/css-fonts-3/#om-fontfeaturevalues partial interface CSSRule { const unsigned short FONT_FEATURE_VALUES_RULE = 14; }; /* ---------------------- CSSRuleList ----------------------------- */ /* ./webidl/CSSRuleList.webidl */ /* -*- 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/. */ [Exposed=Window] interface CSSRuleList { readonly attribute unsigned long length; getter CSSRule? item(unsigned long index); }; /* ---------------------- CSSScopeRule ----------------------------- */ /* ./webidl/CSSScopeRule.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://drafts.csswg.org/css-cascade-6/#the-cssscoperule-interface */ [Exposed=Window, Pref="layout.css.at-scope.enabled"] interface CSSScopeRule : CSSGroupingRule { readonly attribute UTF8String? start; readonly attribute UTF8String? end; }; /* ---------------------- CSSStyleDeclaration ----------------------------- */ /* ./webidl/CSSStyleDeclaration.webidl */ /* -*- 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/. * * The origin of this IDL file is * http://dev.w3.org/csswg/cssom/ */ // Because of getComputedStyle, many CSSStyleDeclaration objects can be // short-living. [ProbablyShortLivingWrapper, Exposed=Window] interface CSSStyleDeclaration { [CEReactions, SetterNeedsSubjectPrincipal=NonSystem, SetterThrows] attribute UTF8String cssText; readonly attribute unsigned long length; getter UTF8String item(unsigned long index); [Throws, ChromeOnly] sequence getCSSImageURLs(UTF8String property); [ChromeOnly] readonly attribute float usedFontSize; UTF8String getPropertyValue(UTF8String property); UTF8String getPropertyPriority(UTF8String property); [CEReactions, NeedsSubjectPrincipal=NonSystem, Throws] undefined setProperty(UTF8String property, [LegacyNullToEmptyString] UTF8String value, optional [LegacyNullToEmptyString] UTF8String priority = ""); [CEReactions, Throws] UTF8String removeProperty(UTF8String property); readonly attribute CSSRule? parentRule; }; /* ---------------------- CSSStyleRule ----------------------------- */ /* ./webidl/CSSStyleRule.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://drafts.csswg.org/cssom/#the-cssstylerule-interface */ // https://drafts.csswg.org/cssom/#the-cssstylerule-interface [Exposed=Window] interface CSSStyleRule : CSSGroupingRule { attribute UTF8String selectorText; [SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style; [ChromeOnly] readonly attribute unsigned long selectorCount; [ChromeOnly] UTF8String selectorTextAt(unsigned long index, optional boolean desugared = false); [ChromeOnly] unsigned long long selectorSpecificityAt(unsigned long index, optional boolean desugared = false); [ChromeOnly] boolean selectorMatchesElement( unsigned long selectorIndex, Element element, optional [LegacyNullToEmptyString] DOMString pseudo = "", optional boolean includeVisitedStyle = false); [ChromeOnly] sequence getSelectorWarnings(); }; enum SelectorWarningKind { "UnconstrainedHas", }; dictionary SelectorWarning { required unsigned long index; required SelectorWarningKind kind; }; /* ---------------------- CSSStyleSheet ----------------------------- */ /* ./webidl/CSSStyleSheet.webidl */ /* -*- 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/. * * The origin of this IDL file is * http://dev.w3.org/csswg/cssom/ * https://wicg.github.io/construct-stylesheets/ */ enum CSSStyleSheetParsingMode { "author", "user", "agent" }; dictionary CSSStyleSheetInit { (MediaList or UTF8String) media = ""; boolean disabled = false; UTF8String baseURL; }; [Exposed=Window] interface CSSStyleSheet : StyleSheet { [Throws] constructor(optional CSSStyleSheetInit options = {}); [Pure, BinaryName="DOMOwnerRule"] readonly attribute CSSRule? ownerRule; [Throws, NeedsSubjectPrincipal] readonly attribute CSSRuleList cssRules; [ChromeOnly, BinaryName="parsingModeDOM"] readonly attribute CSSStyleSheetParsingMode parsingMode; [Throws, NeedsSubjectPrincipal] unsigned long insertRule(UTF8String rule, optional unsigned long index = 0); [Throws, NeedsSubjectPrincipal] undefined deleteRule(unsigned long index); [NewObject] Promise replace(UTF8String text); [Throws] undefined replaceSync(UTF8String text); // Non-standard WebKit things. [Throws, NeedsSubjectPrincipal, BinaryName="cssRules"] readonly attribute CSSRuleList rules; [Throws, NeedsSubjectPrincipal, BinaryName="deleteRule"] undefined removeRule(optional unsigned long index = 0); [Throws, NeedsSubjectPrincipal] long addRule(optional UTF8String selector = "undefined", optional UTF8String style = "undefined", optional unsigned long index); }; /* ---------------------- CSSSupportsRule ----------------------------- */ /* ./webidl/CSSSupportsRule.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://drafts.csswg.org/css-conditional/#the-csssupportsrule-interface */ // https://drafts.csswg.org/css-conditional/#the-csssupportsrule-interface [Exposed=Window] interface CSSSupportsRule : CSSConditionRule { }; /* ---------------------- CSSTransition ----------------------------- */ /* ./webidl/CSSTransition.webidl */ /* -*- 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/. * * The origin of this IDL file is * http://dev.w3.org/csswg/css-transitions-2/#the-CSSTransition-interface * * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C * liability, trademark and document use rules apply. */ [HeaderFile="nsTransitionManager.h", Exposed=Window] interface CSSTransition : Animation { [Constant] readonly attribute DOMString transitionProperty; }; /* ---------------------- CustomElementRegistry ----------------------------- */ /* ./webidl/CustomElementRegistry.webidl */ /* 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/. */ // https://html.spec.whatwg.org/#dom-window-customelements [Exposed=Window] interface CustomElementRegistry { [CEReactions, Throws, UseCounter] undefined define(DOMString name, CustomElementConstructor constructor, optional ElementDefinitionOptions options = {}); [ChromeOnly, Throws] undefined setElementCreationCallback(DOMString name, CustomElementCreationCallback callback); (CustomElementConstructor or undefined) get(DOMString name); DOMString? getName(CustomElementConstructor constructor); [Throws] Promise whenDefined(DOMString name); [CEReactions] undefined upgrade(Node root); }; dictionary ElementDefinitionOptions { DOMString extends; }; enum RestoreReason { "restore", "autocomplete", }; callback constructor CustomElementConstructor = any (); [MOZ_CAN_RUN_SCRIPT_BOUNDARY] callback CustomElementCreationCallback = undefined (DOMString name); [MOZ_CAN_RUN_SCRIPT_BOUNDARY] callback LifecycleConnectedCallback = undefined(); [MOZ_CAN_RUN_SCRIPT_BOUNDARY] callback LifecycleDisconnectedCallback = undefined(); [MOZ_CAN_RUN_SCRIPT_BOUNDARY] callback LifecycleAdoptedCallback = undefined(Document? oldDocument, Document? newDocment); [MOZ_CAN_RUN_SCRIPT_BOUNDARY] callback LifecycleAttributeChangedCallback = undefined(DOMString attrName, DOMString? oldValue, DOMString? newValue, DOMString? namespaceURI); [MOZ_CAN_RUN_SCRIPT_BOUNDARY] callback LifecycleFormAssociatedCallback = undefined(HTMLFormElement? form); [MOZ_CAN_RUN_SCRIPT_BOUNDARY] callback LifecycleFormResetCallback = undefined(); [MOZ_CAN_RUN_SCRIPT_BOUNDARY] callback LifecycleFormDisabledCallback = undefined(boolean disabled); [MOZ_CAN_RUN_SCRIPT_BOUNDARY] callback LifecycleFormStateRestoreCallback = undefined((File or USVString or FormData)? state, RestoreReason reason); [MOZ_CAN_RUN_SCRIPT_BOUNDARY] callback LifecycleGetCustomInterfaceCallback = object?(any iid); // Unsorted is necessary until https://github.com/whatwg/html/issues/3580 is resolved. [GenerateInit, Unsorted] dictionary LifecycleCallbacks { LifecycleConnectedCallback connectedCallback; LifecycleDisconnectedCallback disconnectedCallback; LifecycleAdoptedCallback adoptedCallback; LifecycleAttributeChangedCallback attributeChangedCallback; [ChromeOnly] LifecycleGetCustomInterfaceCallback getCustomInterfaceCallback; }; [GenerateInit, Unsorted] dictionary FormAssociatedLifecycleCallbacks { LifecycleFormAssociatedCallback formAssociatedCallback; LifecycleFormResetCallback formResetCallback; LifecycleFormDisabledCallback formDisabledCallback; LifecycleFormStateRestoreCallback formStateRestoreCallback; }; /* ---------------------- CustomEvent ----------------------------- */ /* ./webidl/CustomEvent.webidl */ /* -*- 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/. * * The origin of this IDL file is * http://www.w3.org/TR/2012/WD-dom-20120105/ * * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C * liability, trademark and document use rules apply. */ [Exposed=(Window, Worker)] interface CustomEvent : Event { constructor(DOMString type, optional CustomEventInit eventInitDict = {}); readonly attribute any detail; // initCustomEvent is a Gecko specific deprecated method. undefined initCustomEvent(DOMString type, optional boolean canBubble = false, optional boolean cancelable = false, optional any detail = null); }; dictionary CustomEventInit : EventInit { any detail = null; }; /* ---------------------- DataTransfer ----------------------------- */ /* ./webidl/DataTransfer.webidl */ /* -*- 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/. * * The origin of this IDL file is: * http://www.whatwg.org/specs/web-apps/current-work/#the-datatransfer-interface */ interface ContentSecurityPolicy; [Exposed=Window] interface DataTransfer { constructor(); attribute DOMString dropEffect; attribute DOMString effectAllowed; readonly attribute DataTransferItemList items; undefined setDragImage(Element image, long x, long y); [Frozen, Cached, Pure, NeedsCallerType] readonly attribute sequence types; [Throws, NeedsSubjectPrincipal] DOMString getData(DOMString format); [Throws, NeedsSubjectPrincipal] undefined setData(DOMString format, DOMString data); [Throws, NeedsSubjectPrincipal] undefined clearData(optional DOMString format); [NeedsSubjectPrincipal] readonly attribute FileList? files; }; // Mozilla specific stuff partial interface DataTransfer { /* * Set the drag source. Usually you would not change this, but it will * affect which node the drag and dragend events are fired at. The * default target is the node that was dragged. * * @param element drag source to use * @throws NO_MODIFICATION_ALLOWED_ERR if the item cannot be modified */ [Throws, UseCounter] undefined addElement(Element element); /** * The number of items being dragged. */ [ChromeOnly] readonly attribute unsigned long mozItemCount; /** * Sets the drag cursor state. Primarily used to control the cursor during * tab drags, but could be expanded to other uses. XXX Currently implemented * on Win32 only. * * Possible values: * auto - use default system behavior. * default - set the cursor to an arrow during the drag operation. * * Values other than 'default' are indentical to setting mozCursor to * 'auto'. */ [UseCounter] attribute DOMString mozCursor; /** * Holds a list of the format types of the data that is stored for an item * at the specified index. If the index is not in the range from 0 to * itemCount - 1, an empty string list is returned. */ [Throws, ChromeOnly] DOMStringList mozTypesAt(unsigned long index); /** * Remove the data associated with the given format for an item at the * specified index. The index is in the range from zero to itemCount - 1. * * If the last format for the item is removed, the entire item is removed, * reducing the itemCount by one. * * If format is empty, then the data associated with all formats is removed. * If the format is not found, then this method has no effect. * * @param format the format to remove * @throws NS_ERROR_DOM_INDEX_SIZE_ERR if index is greater or equal than itemCount * @throws NO_MODIFICATION_ALLOWED_ERR if the item cannot be modified */ [Throws, ChromeOnly] undefined mozClearDataAt(DOMString format, unsigned long index); /* * A data transfer may store multiple items, each at a given zero-based * index. setDataAt may only be called with an index argument less than * itemCount in which case an existing item is modified, or equal to * itemCount in which case a new item is added, and the itemCount is * incremented by one. * * Data should be added in order of preference, with the most specific * format added first and the least specific format added last. If data of * the given format already exists, it is replaced in the same position as * the old data. * * The data should be either a string, a primitive boolean or number type * (which will be converted into a string) or an nsISupports. * * @param format the format to add * @param data the data to add * @throws NS_ERROR_NULL_POINTER if the data is null * @throws NS_ERROR_DOM_INDEX_SIZE_ERR if index is greater than itemCount * @throws NO_MODIFICATION_ALLOWED_ERR if the item cannot be modified */ [Throws, ChromeOnly] undefined mozSetDataAt(DOMString format, any data, unsigned long index); /** * Retrieve the data associated with the given format for an item at the * specified index, or null if it does not exist. The index should be in the * range from zero to itemCount - 1. * * @param format the format of the data to look up * @returns the data of the given format, or null if it doesn't exist. * @throws NS_ERROR_DOM_INDEX_SIZE_ERR if index is greater or equal than itemCount */ [Throws, ChromeOnly] any mozGetDataAt(DOMString format, unsigned long index); /** * Update the drag image. Arguments are the same as setDragImage. This is only * valid within the parent chrome process. */ [ChromeOnly] undefined updateDragImage(Element image, long x, long y); /** * Will be true when the user has cancelled the drag (typically by pressing * Escape) and when the drag has been cancelled unexpectedly. This will be * false otherwise, including when the drop has been rejected by its target. * This property is only relevant for the dragend event. */ [UseCounter] readonly attribute boolean mozUserCancelled; /** * The node that the mouse was pressed over to begin the drag. For external * drags, or if the caller cannot access this node, this will be null. */ [UseCounter] readonly attribute Node? mozSourceNode; /** * The top-level window context that mouse was pressed over to begin the drag. * For external drags, this will be null. */ [ChromeOnly] readonly attribute WindowContext? sourceTopWindowContext; /** * The URI spec of the triggering principal. This may be different than * sourceNode's principal when sourceNode is xul:browser and the drag is * triggered in a browsing context inside it. */ [ChromeOnly] readonly attribute DOMString mozTriggeringPrincipalURISpec; [ChromeOnly] readonly attribute ContentSecurityPolicy? mozCSP; /** * Copy the given DataTransfer for the given event. Used by testing code for * creating emulated Drag and Drop events in the UI. * * NOTE: Don't expose a DataTransfer produced with this method to the web or * use this for non-testing purposes. It can easily be used to get the * DataTransfer into an invalid state, and is an unstable implementation * detail of EventUtils.synthesizeDrag. */ [Throws, ChromeOnly] DataTransfer mozCloneForEvent(DOMString event); /** * Whether to show the "fail" animation that returns a dragged item * to its source. Only works on macOS, and has to be set early in the drag * on that platform. * Defaults to true. */ [ChromeOnly] attribute boolean mozShowFailAnimation; }; /* ---------------------- DataTransferItem ----------------------------- */ /* ./webidl/DataTransferItem.webidl */ /* -*- 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/. * * The origin of this IDL file is: * https://html.spec.whatwg.org/multipage/interaction.html#the-datatransferitem-interface * https://wicg.github.io/entries-api/#idl-index */ [InstrumentedProps=(webkitGetAsEntry),Exposed=Window] interface DataTransferItem { readonly attribute DOMString kind; readonly attribute DOMString type; [Throws, NeedsSubjectPrincipal] undefined getAsString(FunctionStringCallback? callback); [Throws, NeedsSubjectPrincipal] File? getAsFile(); }; callback FunctionStringCallback = undefined (DOMString data); // https://wicg.github.io/entries-api/#idl-index partial interface DataTransferItem { [Pref="dom.webkitBlink.filesystem.enabled", BinaryName="getAsEntry", Throws, NeedsSubjectPrincipal] FileSystemEntry? webkitGetAsEntry(); }; /* ---------------------- DataTransferItemList ----------------------------- */ /* ./webidl/DataTransferItemList.webidl */ /* -*- 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/. * * The origin of this IDL file is: * https://html.spec.whatwg.org/multipage/interaction.html#the-datatransferitemlist-interface */ [Exposed=Window] interface DataTransferItemList { readonly attribute unsigned long length; getter DataTransferItem (unsigned long index); [Throws, NeedsSubjectPrincipal] DataTransferItem? add(DOMString data, DOMString type); [Throws, NeedsSubjectPrincipal] DataTransferItem? add(File data); [Throws, NeedsSubjectPrincipal] undefined remove(unsigned long index); [Throws, NeedsSubjectPrincipal] undefined clear(); }; /* ---------------------- DecoderDoctorNotification ----------------------------- */ /* ./webidl/DecoderDoctorNotification.webidl */ /* -*- 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/. */ enum DecoderDoctorNotificationType { "cannot-play", "platform-decoder-not-found", "can-play-but-some-missing-decoders", "cannot-initialize-pulseaudio", "unsupported-libavcodec", "decode-error", "decode-warning", }; enum DecoderDoctorReportType { "mediawidevinenowmf", "mediawmfneeded", "mediaplatformdecodernotfound", "mediacannotplaynodecoders", "medianodecoders", "mediacannotinitializepulseaudio", "mediaunsupportedlibavcodec", "mediadecodeerror", "mediadecodewarning", }; [GenerateToJSON] dictionary DecoderDoctorNotification { required DecoderDoctorNotificationType type; // True when the issue has been solved. required boolean isSolved; // Key from dom.properties, used for telemetry and prefs. required DOMString decoderDoctorReportId; // If provided, formats (or key systems) at issue. DOMString formats; // If provided, technical details about the decode-error/warning. DOMString decodeIssue; // If provided, URL of the document where the issue happened. DOMString docURL; // If provided, URL of the media resource that caused a decode-error/warning. DOMString resourceURL; }; /* ---------------------- DecompressionStream ----------------------------- */ /* ./webidl/DecompressionStream.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://wicg.github.io/compression/#decompression-stream */ [Exposed=*, Pref="dom.compression_streams.enabled"] interface DecompressionStream { [Throws] constructor(CompressionFormat format); }; DecompressionStream includes GenericTransformStream; /* ---------------------- DedicatedWorkerGlobalScope ----------------------------- */ /* ./webidl/DedicatedWorkerGlobalScope.webidl */ /* -*- 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/. * * The origin of this IDL file is * http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#the-workerglobalscope-common-interface * * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and Opera * Software ASA. * You are granted a license to use, reproduce and create derivative works of * this document. */ [Global=(Worker,DedicatedWorker), Exposed=DedicatedWorker] interface DedicatedWorkerGlobalScope : WorkerGlobalScope { [Replaceable] readonly attribute DOMString name; [Throws] undefined postMessage(any message, sequence transfer); [Throws] undefined postMessage(any message, optional StructuredSerializeOptions options = {}); undefined close(); attribute EventHandler onmessage; attribute EventHandler onmessageerror; }; // https://w3c.github.io/webrtc-encoded-transform/#RTCEncodedAudioFrame-methods partial interface DedicatedWorkerGlobalScope { [Pref="media.peerconnection.enabled", Pref="media.peerconnection.scripttransform.enabled"] attribute EventHandler onrtctransform; }; // https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#animation-frames DedicatedWorkerGlobalScope includes AnimationFrameProvider; /* ---------------------- DelayNode ----------------------------- */ /* ./webidl/DelayNode.webidl */ /* -*- 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/. * * The origin of this IDL file is * https://webaudio.github.io/web-audio-api/ * * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C * liability, trademark and document use rules apply. */ dictionary DelayOptions : AudioNodeOptions { double maxDelayTime = 1; double delayTime = 0; }; [Pref="dom.webaudio.enabled", Exposed=Window] interface DelayNode : AudioNode { [Throws] constructor(BaseAudioContext context, optional DelayOptions options = {}); readonly attribute AudioParam delayTime; }; // Mozilla extension DelayNode includes AudioNodePassThrough; /* ---------------------- DeviceLightEvent ----------------------------- */ /* ./webidl/DeviceLightEvent.webidl */ /* -*- 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/. */ [Pref="device.sensors.ambientLight.enabled", Func="nsGlobalWindowInner::DeviceSensorsEnabled", Exposed=Window] interface DeviceLightEvent : Event { constructor(DOMString type, optional DeviceLightEventInit eventInitDict = {}); readonly attribute unrestricted double value; }; dictionary DeviceLightEventInit : EventInit { unrestricted double value = Infinity; }; /* ---------------------- DeviceMotionEvent ----------------------------- */ /* ./webidl/DeviceMotionEvent.webidl */ /* -*- 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/. * * https://w3c.github.io/deviceorientation/ */ [LegacyNoInterfaceObject, Exposed=Window] interface DeviceAcceleration { readonly attribute double? x; readonly attribute double? y; readonly attribute double? z; }; [LegacyNoInterfaceObject, Exposed=Window] interface DeviceRotationRate { readonly attribute double? alpha; readonly attribute double? beta; readonly attribute double? gamma; }; [Pref="device.sensors.motion.enabled", Func="nsGlobalWindowInner::DeviceSensorsEnabled", Exposed=Window] interface DeviceMotionEvent : Event { constructor(DOMString type, optional DeviceMotionEventInit eventInitDict = {}); readonly attribute DeviceAcceleration? acceleration; readonly attribute DeviceAcceleration? accelerationIncludingGravity; readonly attribute DeviceRotationRate? rotationRate; readonly attribute double? interval; }; dictionary DeviceAccelerationInit { double? x = null; double? y = null; double? z = null; }; dictionary DeviceRotationRateInit { double? alpha = null; double? beta = null; double? gamma = null; }; dictionary DeviceMotionEventInit : EventInit { // FIXME: bug 1493860: should this "= {}" be here? DeviceAccelerationInit acceleration = {}; // FIXME: bug 1493860: should this "= {}" be here? DeviceAccelerationInit accelerationIncludingGravity = {}; // FIXME: bug 1493860: should this "= {}" be here? DeviceRotationRateInit rotationRate = {}; double? interval = null; }; // Mozilla extensions. partial interface DeviceMotionEvent { undefined initDeviceMotionEvent(DOMString type, optional boolean canBubble = false, optional boolean cancelable = false, optional DeviceAccelerationInit acceleration = {}, optional DeviceAccelerationInit accelerationIncludingGravity = {}, optional DeviceRotationRateInit rotationRate = {}, optional double? interval = null); }; /* ---------------------- DeviceOrientationEvent ----------------------------- */ /* ./webidl/DeviceOrientationEvent.webidl */ /* -*- 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/. */ [Pref="device.sensors.orientation.enabled", Func="nsGlobalWindowInner::DeviceSensorsEnabled", LegacyEventInit, Exposed=Window] interface DeviceOrientationEvent : Event { constructor(DOMString type, optional DeviceOrientationEventInit eventInitDict = {}); readonly attribute double? alpha; readonly attribute double? beta; readonly attribute double? gamma; readonly attribute boolean absolute; // initDeviceOrientationEvent is a Gecko specific deprecated method. undefined initDeviceOrientationEvent(DOMString type, optional boolean canBubble = false, optional boolean cancelable = false, optional double? alpha = null, optional double? beta = null, optional double? gamma = null, optional boolean absolute = false); }; dictionary DeviceOrientationEventInit : EventInit { double? alpha = null; double? beta = null; double? gamma = null; boolean absolute = false; }; /* ---------------------- Directory ----------------------------- */ /* ./webidl/Directory.webidl */ /* -*- 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/. */ /* * All functions on Directory that accept DOMString arguments for file or * directory names only allow relative path to current directory itself. The * path should be a descendent path like "path/to/file.txt" and not contain a * segment of ".." or ".". So the paths aren't allowed to walk up the directory * tree. For example, paths like "../foo", "..", "/foo/bar" or "foo/../bar" are * not allowed. * * http://w3c.github.io/filesystem-api/#idl-def-Directory * https://microsoftedge.github.io/directory-upload/proposal.html#directory-interface */ [Exposed=(Window,Worker)] interface Directory { // This ChromeOnly constructor is used by the MockFilePicker for testing only. [Throws, ChromeOnly] constructor(DOMString path); /* * The leaf name of the directory. */ [Throws] readonly attribute DOMString name; }; [Exposed=(Window,Worker)] partial interface Directory { // Already defined in the main interface declaration: //readonly attribute DOMString name; /* * The path of the Directory (includes both its basename and leafname). * The path begins with the name of the ancestor Directory that was * originally exposed to content (say via a directory picker) and traversed * to obtain this Directory. Full filesystem paths are not exposed to * unprivilaged content. */ [Throws] readonly attribute DOMString path; /* * Getter for the immediate children of this directory. */ [NewObject] Promise> getFilesAndDirectories(); [NewObject] Promise> getFiles(optional boolean recursiveFlag = false); }; /* ---------------------- Document ----------------------------- */ /* ./webidl/Document.webidl */ /* -*- 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/. * * https://dom.spec.whatwg.org/#interface-document * https://html.spec.whatwg.org/multipage/dom.html#the-document-object * https://html.spec.whatwg.org/multipage/obsolete.html#other-elements%2C-attributes-and-apis * https://fullscreen.spec.whatwg.org/#api * https://w3c.github.io/pointerlock/#extensions-to-the-document-interface * https://w3c.github.io/pointerlock/#extensions-to-the-documentorshadowroot-mixin * https://w3c.github.io/page-visibility/#extensions-to-the-document-interface * https://drafts.csswg.org/cssom/#extensions-to-the-document-interface * https://drafts.csswg.org/cssom-view/#extensions-to-the-document-interface * https://wicg.github.io/feature-policy/#policy * https://wicg.github.io/scroll-to-text-fragment/#feature-detectability */ interface ContentSecurityPolicy; interface Principal; interface WindowProxy; interface nsISupports; interface URI; interface nsIDocShell; interface nsILoadGroup; interface nsIReferrerInfo; interface nsICookieJarSettings; interface nsIPermissionDelegateHandler; interface XULCommandDispatcher; enum VisibilityState { "hidden", "visible" }; /* https://dom.spec.whatwg.org/#dictdef-elementcreationoptions */ dictionary ElementCreationOptions { DOMString is; [ChromeOnly] DOMString pseudo; }; /* https://dom.spec.whatwg.org/#interface-document */ [Exposed=Window, InstrumentedProps=(caretRangeFromPoint, exitPictureInPicture, featurePolicy, onbeforecopy, onbeforecut, onbeforepaste, oncancel, onfreeze, onmousewheel, onresume, onsearch, onwebkitfullscreenchange, onwebkitfullscreenerror, pictureInPictureElement, pictureInPictureEnabled, registerElement, wasDiscarded, webkitCancelFullScreen, webkitCurrentFullScreenElement, webkitExitFullscreen, webkitFullscreenElement, webkitFullscreenEnabled, webkitHidden, webkitIsFullScreen, webkitVisibilityState, xmlEncoding, xmlStandalone, xmlVersion)] interface Document : Node { [Throws] constructor(); [Throws] readonly attribute DOMImplementation implementation; [Pure, Throws, BinaryName="documentURIFromJS", NeedsCallerType] readonly attribute DOMString URL; [Pure, Throws, BinaryName="documentURIFromJS", NeedsCallerType] readonly attribute DOMString documentURI; [Pure] readonly attribute DOMString compatMode; [Pure] readonly attribute DOMString characterSet; [Pure,BinaryName="characterSet"] readonly attribute DOMString charset; // legacy alias of .characterSet [Pure,BinaryName="characterSet"] readonly attribute DOMString inputEncoding; // legacy alias of .characterSet [Pure] readonly attribute DOMString contentType; [Pure] readonly attribute DocumentType? doctype; [Pure] readonly attribute Element? documentElement; [Pure] HTMLCollection getElementsByTagName(DOMString localName); [Pure, Throws] HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName); [Pure] HTMLCollection getElementsByClassName(DOMString classNames); // These DOM methods cannot be accessed by UA Widget scripts // because the DOM element reflectors will be in the content scope, // instead of the desired UA Widget scope. [CEReactions, NewObject, Throws, Func="IsNotUAWidget"] Element createElement(DOMString localName, optional (ElementCreationOptions or DOMString) options = {}); [CEReactions, NewObject, Throws, Func="IsNotUAWidget"] Element createElementNS(DOMString? namespace, DOMString qualifiedName, optional (ElementCreationOptions or DOMString) options = {}); [NewObject] DocumentFragment createDocumentFragment(); [NewObject, Func="IsNotUAWidget"] Text createTextNode(DOMString data); [NewObject, Func="IsNotUAWidget"] Comment createComment(DOMString data); [NewObject, Throws] ProcessingInstruction createProcessingInstruction(DOMString target, DOMString data); [CEReactions, Throws, Func="IsNotUAWidget"] Node importNode(Node node, optional boolean deep = false); [CEReactions, Throws, Func="IsNotUAWidget"] Node adoptNode(Node node); [NewObject, Throws, NeedsCallerType] Event createEvent(DOMString interface); [NewObject, Throws] Range createRange(); // NodeFilter.SHOW_ALL = 0xFFFFFFFF [NewObject, Throws] NodeIterator createNodeIterator(Node root, optional unsigned long whatToShow = 0xFFFFFFFF, optional NodeFilter? filter = null); [NewObject, Throws] TreeWalker createTreeWalker(Node root, optional unsigned long whatToShow = 0xFFFFFFFF, optional NodeFilter? filter = null); // NEW // No support for prepend/append yet // undefined prepend((Node or DOMString)... nodes); // undefined append((Node or DOMString)... nodes); // These are not in the spec, but leave them for now for backwards compat. // So sort of like Gecko extensions [NewObject, Throws] CDATASection createCDATASection(DOMString data); [NewObject, Throws] Attr createAttribute(DOMString name); [NewObject, Throws] Attr createAttributeNS(DOMString? namespace, DOMString name); }; // https://html.spec.whatwg.org/multipage/dom.html#the-document-object partial interface Document { [Pref="dom.webcomponents.shadowdom.declarative.enabled"] static Document parseHTMLUnsafe(DOMString html); [PutForwards=href, LegacyUnforgeable] readonly attribute Location? location; [SetterThrows] attribute DOMString domain; readonly attribute DOMString referrer; [Throws] attribute DOMString cookie; readonly attribute DOMString lastModified; readonly attribute DOMString readyState; // DOM tree accessors //(Not proxy yet)getter object (DOMString name); [CEReactions, SetterThrows, Pure] attribute DOMString title; [CEReactions, Pure] attribute DOMString dir; [CEReactions, Pure, SetterThrows] attribute HTMLElement? body; [Pure] readonly attribute HTMLHeadElement? head; [SameObject] readonly attribute HTMLCollection images; [SameObject] readonly attribute HTMLCollection embeds; [SameObject] readonly attribute HTMLCollection plugins; [SameObject] readonly attribute HTMLCollection links; [SameObject] readonly attribute HTMLCollection forms; [SameObject] readonly attribute HTMLCollection scripts; [Pure] NodeList getElementsByName(DOMString elementName); //(Not implemented)readonly attribute DOMElementMap cssElementMap; // dynamic markup insertion [CEReactions, Throws] Document open(optional DOMString unused1, optional DOMString unused2); // both arguments are ignored [CEReactions, Throws] WindowProxy? open(USVString url, DOMString name, DOMString features); [CEReactions, Throws] undefined close(); [CEReactions, Throws] undefined write(DOMString... text); [CEReactions, Throws] undefined writeln(DOMString... text); // user interaction [Pure] readonly attribute WindowProxy? defaultView; [Throws] boolean hasFocus(); [CEReactions, SetterThrows, SetterNeedsSubjectPrincipal] attribute DOMString designMode; [CEReactions, Throws, NeedsSubjectPrincipal] boolean execCommand(DOMString commandId, optional boolean showUI = false, optional DOMString value = ""); [Throws, NeedsSubjectPrincipal] boolean queryCommandEnabled(DOMString commandId); [Throws] boolean queryCommandIndeterm(DOMString commandId); [Throws] boolean queryCommandState(DOMString commandId); [Throws, NeedsCallerType] boolean queryCommandSupported(DOMString commandId); [Throws] DOMString queryCommandValue(DOMString commandId); //(Not implemented)readonly attribute HTMLCollection commands; // special event handler IDL attributes that only apply to Document objects [LegacyLenientThis] attribute EventHandler onreadystatechange; // Gecko extensions? attribute EventHandler onbeforescriptexecute; attribute EventHandler onafterscriptexecute; /** * True if this document is synthetic : stand alone image, video, audio file, * etc. */ [Func="IsChromeOrUAWidget"] readonly attribute boolean mozSyntheticDocument; /** * Returns the script element whose script is currently being processed. * * @see */ [Pure] readonly attribute Element? currentScript; /** * Release the current mouse capture if it is on an element within this * document. * * @see */ [Deprecated=DocumentReleaseCapture, Pref="dom.mouse_capture.enabled"] undefined releaseCapture(); /** * Use the given DOM element as the source image of target |-moz-element()|. * * This function introduces a new special ID (called "image element ID"), * which is only used by |-moz-element()|, and associates it with the given * DOM element. Image elements ID's have the higher precedence than general * HTML id's, so if |document.mozSetImageElement(, )| is called, * |-moz-element(#)| uses || as the source image even if there * is another element with id attribute = ||. To unregister an image * element ID ||, call |document.mozSetImageElement(, null)|. * * Example: * *
* * @param aImageElementId an image element ID to associate with * |aImageElement| * @param aImageElement a DOM element to be used as the source image of * |-moz-element(#aImageElementId)|. If this is null, the function will * unregister the image element ID |aImageElementId|. * * @see */ [UseCounter] undefined mozSetImageElement(DOMString aImageElementId, Element? aImageElement); [ChromeOnly] readonly attribute URI? documentURIObject; /** * Current referrer policy - one of the referrer policy value from * ReferrerPolicy.webidl. */ [ChromeOnly] readonly attribute ReferrerPolicy referrerPolicy; /** * Current referrer info, which holds all referrer related information * including referrer policy and raw referrer of document. */ [ChromeOnly] readonly attribute nsIReferrerInfo referrerInfo; }; // https://html.spec.whatwg.org/multipage/obsolete.html#other-elements%2C-attributes-and-apis partial interface Document { [CEReactions] attribute [LegacyNullToEmptyString] DOMString fgColor; [CEReactions] attribute [LegacyNullToEmptyString] DOMString linkColor; [CEReactions] attribute [LegacyNullToEmptyString] DOMString vlinkColor; [CEReactions] attribute [LegacyNullToEmptyString] DOMString alinkColor; [CEReactions] attribute [LegacyNullToEmptyString] DOMString bgColor; [SameObject] readonly attribute HTMLCollection anchors; [SameObject] readonly attribute HTMLCollection applets; undefined clear(); // @deprecated These are old Netscape 4 methods. Do not use, // the implementation is no-op. // XXXbz do we actually need these anymore? undefined captureEvents(); undefined releaseEvents(); [SameObject] readonly attribute HTMLAllCollection all; }; // https://fullscreen.spec.whatwg.org/#api partial interface Document { // Note: Per spec the 'S' in these two is lowercase, but the "Moz" // versions have it uppercase. [LegacyLenientSetter, Unscopable] readonly attribute boolean fullscreen; [BinaryName="fullscreen"] readonly attribute boolean mozFullScreen; [LegacyLenientSetter, NeedsCallerType] readonly attribute boolean fullscreenEnabled; [BinaryName="fullscreenEnabled", NeedsCallerType] readonly attribute boolean mozFullScreenEnabled; [NewObject] Promise exitFullscreen(); [NewObject, BinaryName="exitFullscreen"] Promise mozCancelFullScreen(); // Events handlers attribute EventHandler onfullscreenchange; attribute EventHandler onfullscreenerror; }; // https://w3c.github.io/pointerlock/#extensions-to-the-document-interface // https://w3c.github.io/pointerlock/#extensions-to-the-documentorshadowroot-mixin partial interface Document { undefined exitPointerLock(); // Event handlers attribute EventHandler onpointerlockchange; attribute EventHandler onpointerlockerror; }; // Mozilla-internal document extensions specific to error pages. partial interface Document { [Func="Document::CallerIsTrustedAboutCertError", NewObject] Promise addCertException(boolean isTemporary); [Func="Document::CallerIsTrustedAboutHttpsOnlyError"] undefined reloadWithHttpsOnlyException(); [Func="Document::CallerIsTrustedAboutCertError", Throws] FailedCertSecurityInfo getFailedCertSecurityInfo(); [Func="Document::CallerIsTrustedAboutNetError", Throws] NetErrorInfo getNetErrorInfo(); }; // https://w3c.github.io/page-visibility/#extensions-to-the-document-interface partial interface Document { readonly attribute boolean hidden; readonly attribute VisibilityState visibilityState; attribute EventHandler onvisibilitychange; }; // https://drafts.csswg.org/cssom/#extensions-to-the-document-interface partial interface Document { attribute DOMString? selectedStyleSheetSet; readonly attribute DOMString? lastStyleSheetSet; readonly attribute DOMString? preferredStyleSheetSet; [Constant] readonly attribute DOMStringList styleSheetSets; undefined enableStyleSheetsForSet (DOMString? name); }; // https://drafts.csswg.org/cssom-view/#extensions-to-the-document-interface partial interface Document { CaretPosition? caretPositionFromPoint (float x, float y); readonly attribute Element? scrollingElement; }; // https://drafts.csswg.org/web-animations/#extensions-to-the-document-interface partial interface Document { [Func="Document::AreWebAnimationsTimelinesEnabled"] readonly attribute DocumentTimeline timeline; }; // https://svgwg.org/svg2-draft/struct.html#InterfaceDocumentExtensions partial interface Document { [BinaryName="SVGRootElement"] readonly attribute SVGSVGElement? rootElement; }; // Mozilla extensions of various sorts partial interface Document { // Creates a new XUL element regardless of the document's default type. [ChromeOnly, CEReactions, NewObject, Throws] Element createXULElement(DOMString localName, optional (ElementCreationOptions or DOMString) options = {}); // Wether the document was loaded using a nsXULPrototypeDocument. [ChromeOnly] readonly attribute boolean loadedFromPrototype; // The principal to use for the storage area of this document [ChromeOnly] readonly attribute Principal effectiveStoragePrincipal; // You should probably not be using this principal getter since it performs // no checks to ensure that the partitioned principal should really be used // here. It is only designed to be used in very specific circumstances, such // as when inheriting the document/storage principal. [ChromeOnly] readonly attribute Principal partitionedPrincipal; // The cookieJarSettings of this document [ChromeOnly] readonly attribute nsICookieJarSettings cookieJarSettings; // Touch bits // XXXbz I can't find the sane spec for this stuff, so just cribbing // from our xpidl for now. [NewObject, Func="nsGenericHTMLElement::LegacyTouchAPIEnabled"] Touch createTouch(optional Window? view = null, optional EventTarget? target = null, optional long identifier = 0, optional long pageX = 0, optional long pageY = 0, optional long screenX = 0, optional long screenY = 0, optional long clientX = 0, optional long clientY = 0, optional long radiusX = 0, optional long radiusY = 0, optional float rotationAngle = 0, optional float force = 0); // XXXbz a hack to get around the fact that we don't support variadics as // distinguishing arguments yet. Once this hack is removed. we can also // remove the corresponding overload on Document, since Touch... and // sequence look the same in the C++. [NewObject, Func="nsGenericHTMLElement::LegacyTouchAPIEnabled"] TouchList createTouchList(Touch touch, Touch... touches); // XXXbz and another hack for the fact that we can't usefully have optional // distinguishing arguments but need a working zero-arg form of // createTouchList(). [NewObject, Func="nsGenericHTMLElement::LegacyTouchAPIEnabled"] TouchList createTouchList(); [NewObject, Func="nsGenericHTMLElement::LegacyTouchAPIEnabled"] TouchList createTouchList(sequence touches); [ChromeOnly] attribute boolean styleSheetChangeEventsEnabled; [ChromeOnly] attribute boolean devToolsAnonymousAndShadowEventsEnabled; [ChromeOnly, BinaryName="contentLanguageForBindings"] readonly attribute DOMString contentLanguage; [ChromeOnly] readonly attribute nsILoadGroup? documentLoadGroup; // Blocks the initial document parser until the given promise is settled. [ChromeOnly, NewObject] Promise blockParsing(Promise promise, optional BlockParsingOptions options = {}); [Func="nsContentUtils::IsSystemOrPDFJS", BinaryName="blockUnblockOnloadForSystemOrPDFJS"] undefined blockUnblockOnload(boolean block); // like documentURI, except that for error pages, it returns the URI we were // trying to load when we hit an error, rather than the error page's own URI. [ChromeOnly] readonly attribute URI? mozDocumentURIIfNotForErrorPages; // A promise that is resolved when we have both fired DOMContentLoaded and // are ready to start layout. // This is used for the "document_idle" webextension script injection point. [ChromeOnly, Throws] readonly attribute Promise documentReadyForIdle; // Lazily created command dispatcher, returns null if the document is not // chrome privileged. [ChromeOnly] readonly attribute XULCommandDispatcher? commandDispatcher; [ChromeOnly] attribute boolean devToolsWatchingDOMMutations; /** * Returns all the shadow roots connected to the document, in no particular * order, and without regard to open/closed-ness. Also returns UA widgets * (like