Require default dictionary value for optional dicts

This commit is contained in:
Kagami Sascha Rosylight 2019-07-06 16:20:50 +09:00
parent 56f31c85ef
commit 01151274f1
71 changed files with 105 additions and 98 deletions

6
Cargo.lock generated
View file

@ -3969,7 +3969,7 @@ dependencies = [
name = "script_plugins" name = "script_plugins"
version = "0.0.1" version = "0.0.1"
dependencies = [ dependencies = [
"weedle 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "weedle 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -5534,7 +5534,7 @@ dependencies = [
[[package]] [[package]]
name = "weedle" name = "weedle"
version = "0.9.0" version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"nom 4.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "nom 4.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
@ -6180,7 +6180,7 @@ dependencies = [
"checksum webrender_build 0.0.1 (git+https://github.com/jdm/webrender?branch=servo-hl)" = "<none>" "checksum webrender_build 0.0.1 (git+https://github.com/jdm/webrender?branch=servo-hl)" = "<none>"
"checksum webxr 0.0.1 (git+https://github.com/servo/webxr)" = "<none>" "checksum webxr 0.0.1 (git+https://github.com/servo/webxr)" = "<none>"
"checksum webxr-api 0.0.1 (git+https://github.com/servo/webxr)" = "<none>" "checksum webxr-api 0.0.1 (git+https://github.com/servo/webxr)" = "<none>"
"checksum weedle 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bcc44aa200daee8b1f3a004beaf16554369746f1b4486f0cf93b0caf8a3c2d1e" "checksum weedle 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3bb43f70885151e629e2a19ce9e50bd730fd436cfd4b666894c9ce4de9141164"
"checksum which 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b57acb10231b9493c8472b20cb57317d0679a49e0bdbee44b3b803a6473af164" "checksum which 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b57acb10231b9493c8472b20cb57317d0679a49e0bdbee44b3b803a6473af164"
"checksum winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "f10e386af2b13e47c89e7236a7a14a086791a2b88ebad6df9bf42040195cf770" "checksum winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "f10e386af2b13e47c89e7236a7a14a086791a2b88ebad6df9bf42040195cf770"
"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"

View file

@ -17,6 +17,7 @@ import functools
from WebIDL import ( from WebIDL import (
BuiltinTypes, BuiltinTypes,
IDLBuiltinType, IDLBuiltinType,
IDLDefaultDictionaryValue,
IDLEmptySequenceValue, IDLEmptySequenceValue,
IDLInterfaceMember, IDLInterfaceMember,
IDLNullableType, IDLNullableType,
@ -678,13 +679,16 @@ def getJSToNativeConversionInfo(type, descriptorProvider, failureCode=None,
return None return None
if isinstance(defaultValue, IDLNullValue): if isinstance(defaultValue, IDLNullValue):
assert type.nullable() or type.isDictionary() assert type.nullable()
return nullValue
elif isinstance(defaultValue, IDLDefaultDictionaryValue):
assert type.isDictionary()
return nullValue return nullValue
elif isinstance(defaultValue, IDLEmptySequenceValue): elif isinstance(defaultValue, IDLEmptySequenceValue):
assert type.isSequence() assert type.isSequence()
return "Vec::new()" return "Vec::new()"
raise TypeError("Can't handle non-null or non-empty sequence default value here") raise TypeError("Can't handle non-null, non-empty sequence or non-empty dictionary default value here")
# A helper function for wrapping up the template body for # A helper function for wrapping up the template body for
# possibly-nullable objecty stuff # possibly-nullable objecty stuff
@ -747,17 +751,19 @@ def getJSToNativeConversionInfo(type, descriptorProvider, failureCode=None,
for memberType in type.unroll().flatMemberTypes for memberType in type.unroll().flatMemberTypes
if memberType.isDictionary() if memberType.isDictionary()
] ]
if defaultValue and not isinstance(defaultValue, IDLNullValue): if (defaultValue and
not isinstance(defaultValue, IDLNullValue) and
not isinstance(defaultValue, IDLDefaultDictionaryValue)):
tag = defaultValue.type.tag() tag = defaultValue.type.tag()
if tag is IDLType.Tags.bool: if tag is IDLType.Tags.bool:
default = "%s::Boolean(%s)" % ( default = "%s::Boolean(%s)" % (
union_native_type(type), union_native_type(type),
"true" if defaultValue.value else "false") "true" if defaultValue.value else "false")
else: else:
raise("We don't currently support default values that aren't null or boolean") raise("We don't currently support default values that aren't null, boolean or default dictionary")
elif dictionaries: elif dictionaries:
if defaultValue: if defaultValue:
assert isinstance(defaultValue, IDLNullValue) assert isinstance(defaultValue, IDLDefaultDictionaryValue)
dictionary, = dictionaries dictionary, = dictionaries
default = "%s::%s(%s::%s::empty())" % ( default = "%s::%s(%s::%s::empty())" % (
union_native_type(type), union_native_type(type),

View file

@ -14,7 +14,7 @@ dictionary AnalyserOptions : AudioNodeOptions {
}; };
[Exposed=Window, [Exposed=Window,
Constructor (BaseAudioContext context, optional AnalyserOptions options)] Constructor (BaseAudioContext context, optional AnalyserOptions options = {})]
interface AnalyserNode : AudioNode { interface AnalyserNode : AudioNode {
void getFloatFrequencyData (Float32Array array); void getFloatFrequencyData (Float32Array array);
void getByteFrequencyData (Uint8Array array); void getByteFrequencyData (Uint8Array array);

View file

@ -16,7 +16,7 @@ dictionary AudioBufferSourceOptions {
}; };
[Exposed=Window, [Exposed=Window,
Constructor (BaseAudioContext context, optional AudioBufferSourceOptions options)] Constructor (BaseAudioContext context, optional AudioBufferSourceOptions options = {})]
interface AudioBufferSourceNode : AudioScheduledSourceNode { interface AudioBufferSourceNode : AudioScheduledSourceNode {
[Throws] attribute AudioBuffer? buffer; [Throws] attribute AudioBuffer? buffer;
readonly attribute AudioParam playbackRate; readonly attribute AudioParam playbackRate;

View file

@ -23,7 +23,7 @@ dictionary AudioTimestamp {
}; };
[Exposed=Window, [Exposed=Window,
Constructor(optional AudioContextOptions contextOptions)] Constructor(optional AudioContextOptions contextOptions = {})]
interface AudioContext : BaseAudioContext { interface AudioContext : BaseAudioContext {
readonly attribute double baseLatency; readonly attribute double baseLatency;
readonly attribute double outputLatency; readonly attribute double outputLatency;

View file

@ -26,7 +26,7 @@ dictionary BiquadFilterOptions : AudioNodeOptions {
}; };
[Exposed=Window, [Exposed=Window,
Constructor (BaseAudioContext context, optional BiquadFilterOptions options)] Constructor (BaseAudioContext context, optional BiquadFilterOptions options = {})]
interface BiquadFilterNode : AudioNode { interface BiquadFilterNode : AudioNode {
attribute BiquadFilterType type; attribute BiquadFilterType type;
readonly attribute AudioParam frequency; readonly attribute AudioParam frequency;

View file

@ -5,7 +5,7 @@
// https://w3c.github.io/FileAPI/#blob // https://w3c.github.io/FileAPI/#blob
[Constructor(optional sequence<BlobPart> blobParts, [Constructor(optional sequence<BlobPart> blobParts,
optional BlobPropertyBag options), optional BlobPropertyBag options = {}),
Exposed=(Window,Worker)] Exposed=(Window,Worker)]
interface Blob { interface Blob {

View file

@ -34,7 +34,7 @@ interface Bluetooth : EventTarget {
// [SecureContext, SameObject] // [SecureContext, SameObject]
// readonly attribute BluetoothDevice? referringDevice; // readonly attribute BluetoothDevice? referringDevice;
[SecureContext] [SecureContext]
Promise<BluetoothDevice> requestDevice(optional RequestDeviceOptions options); Promise<BluetoothDevice> requestDevice(optional RequestDeviceOptions options = {});
}; };
// Bluetooth implements BluetoothDeviceEventHandlers; // Bluetooth implements BluetoothDeviceEventHandlers;

View file

@ -11,6 +11,6 @@ dictionary ChannelMergerOptions : AudioNodeOptions {
}; };
[Exposed=Window, [Exposed=Window,
Constructor (BaseAudioContext context, optional ChannelMergerOptions options)] Constructor (BaseAudioContext context, optional ChannelMergerOptions options = {})]
interface ChannelMergerNode : AudioNode { interface ChannelMergerNode : AudioNode {
}; };

View file

@ -11,6 +11,6 @@ dictionary ChannelSplitterOptions : AudioNodeOptions {
}; };
[Exposed=Window, [Exposed=Window,
Constructor (BaseAudioContext context, optional ChannelSplitterOptions options)] Constructor (BaseAudioContext context, optional ChannelSplitterOptions options = {})]
interface ChannelSplitterNode : AudioNode { interface ChannelSplitterNode : AudioNode {
}; };

View file

@ -3,7 +3,7 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
//https://html.spec.whatwg.org/multipage/#the-closeevent-interfaces //https://html.spec.whatwg.org/multipage/#the-closeevent-interfaces
[Constructor(DOMString type, optional CloseEventInit eventInitDict), Exposed=(Window,Worker)] [Constructor(DOMString type, optional CloseEventInit eventInitDict = {}), Exposed=(Window,Worker)]
interface CloseEvent : Event { interface CloseEvent : Event {
readonly attribute boolean wasClean; readonly attribute boolean wasClean;
readonly attribute unsigned short code; readonly attribute unsigned short code;

View file

@ -8,7 +8,7 @@
*/ */
// https://w3c.github.io/uievents/#idl-compositionevent // https://w3c.github.io/uievents/#idl-compositionevent
[Pref="dom.compositionevent.enabled", Constructor(DOMString type, optional CompositionEventInit eventInitDict)] [Pref="dom.compositionevent.enabled", Constructor(DOMString type, optional CompositionEventInit eventInitDict = {})]
interface CompositionEvent : UIEvent { interface CompositionEvent : UIEvent {
readonly attribute DOMString data; readonly attribute DOMString data;
}; };

View file

@ -6,7 +6,7 @@
[Pref="dom.customelements.enabled"] [Pref="dom.customelements.enabled"]
interface CustomElementRegistry { interface CustomElementRegistry {
[Throws, CEReactions] [Throws, CEReactions]
void define(DOMString name, CustomElementConstructor constructor_, optional ElementDefinitionOptions options); void define(DOMString name, CustomElementConstructor constructor_, optional ElementDefinitionOptions options = {});
any get(DOMString name); any get(DOMString name);

View file

@ -13,7 +13,7 @@
* http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0. * http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0.
*/ */
[Constructor(DOMString type, optional CustomEventInit eventInitDict), [Constructor(DOMString type, optional CustomEventInit eventInitDict = {}),
Exposed=(Window,Worker)] Exposed=(Window,Worker)]
interface CustomEvent : Event { interface CustomEvent : Event {
readonly attribute any detail; readonly attribute any detail;

View file

@ -14,7 +14,7 @@
Exposed=(Window,Worker)] Exposed=(Window,Worker)]
interface DOMMatrix : DOMMatrixReadOnly { interface DOMMatrix : DOMMatrixReadOnly {
[NewObject, Throws] static DOMMatrix fromMatrix(optional DOMMatrixInit other); [NewObject, Throws] static DOMMatrix fromMatrix(optional DOMMatrixInit other = {});
[NewObject, Throws] static DOMMatrix fromFloat32Array(Float32Array array32); [NewObject, Throws] static DOMMatrix fromFloat32Array(Float32Array array32);
[NewObject, Throws] static DOMMatrix fromFloat64Array(Float64Array array64); [NewObject, Throws] static DOMMatrix fromFloat64Array(Float64Array array64);
@ -44,8 +44,8 @@ interface DOMMatrix : DOMMatrixReadOnly {
inherit attribute unrestricted double m44; inherit attribute unrestricted double m44;
// Mutable transform methods // Mutable transform methods
[Throws] DOMMatrix multiplySelf(optional DOMMatrixInit other); [Throws] DOMMatrix multiplySelf(optional DOMMatrixInit other = {});
[Throws] DOMMatrix preMultiplySelf(optional DOMMatrixInit other); [Throws] DOMMatrix preMultiplySelf(optional DOMMatrixInit other = {});
DOMMatrix translateSelf(optional unrestricted double tx = 0, DOMMatrix translateSelf(optional unrestricted double tx = 0,
optional unrestricted double ty = 0, optional unrestricted double ty = 0,
optional unrestricted double tz = 0); optional unrestricted double tz = 0);

View file

@ -14,7 +14,7 @@
Exposed=(Window,Worker)] Exposed=(Window,Worker)]
interface DOMMatrixReadOnly { interface DOMMatrixReadOnly {
[NewObject, Throws] static DOMMatrixReadOnly fromMatrix(optional DOMMatrixInit other); [NewObject, Throws] static DOMMatrixReadOnly fromMatrix(optional DOMMatrixInit other = {});
[NewObject, Throws] static DOMMatrixReadOnly fromFloat32Array(Float32Array array32); [NewObject, Throws] static DOMMatrixReadOnly fromFloat32Array(Float32Array array32);
[NewObject, Throws] static DOMMatrixReadOnly fromFloat64Array(Float64Array array64); [NewObject, Throws] static DOMMatrixReadOnly fromFloat64Array(Float64Array array64);
@ -73,12 +73,12 @@ interface DOMMatrixReadOnly {
optional unrestricted double angle = 0); optional unrestricted double angle = 0);
DOMMatrix skewX(optional unrestricted double sx = 0); DOMMatrix skewX(optional unrestricted double sx = 0);
DOMMatrix skewY(optional unrestricted double sy = 0); DOMMatrix skewY(optional unrestricted double sy = 0);
[Throws] DOMMatrix multiply(optional DOMMatrixInit other); [Throws] DOMMatrix multiply(optional DOMMatrixInit other = {});
DOMMatrix flipX(); DOMMatrix flipX();
DOMMatrix flipY(); DOMMatrix flipY();
DOMMatrix inverse(); DOMMatrix inverse();
DOMPoint transformPoint(optional DOMPointInit point); DOMPoint transformPoint(optional DOMPointInit point = {});
Float32Array toFloat32Array(); Float32Array toFloat32Array();
Float64Array toFloat64Array(); Float64Array toFloat64Array();
// stringifier; // stringifier;

View file

@ -14,7 +14,7 @@
optional unrestricted double z = 0, optional unrestricted double w = 1), optional unrestricted double z = 0, optional unrestricted double w = 1),
Exposed=(Window,Worker)] Exposed=(Window,Worker)]
interface DOMPoint : DOMPointReadOnly { interface DOMPoint : DOMPointReadOnly {
[NewObject] static DOMPoint fromPoint(optional DOMPointInit other = null); [NewObject] static DOMPoint fromPoint(optional DOMPointInit other = {});
inherit attribute unrestricted double x; inherit attribute unrestricted double x;
inherit attribute unrestricted double y; inherit attribute unrestricted double y;

View file

@ -14,7 +14,7 @@
optional unrestricted double z = 0, optional unrestricted double w = 1), optional unrestricted double z = 0, optional unrestricted double w = 1),
Exposed=(Window,Worker)] Exposed=(Window,Worker)]
interface DOMPointReadOnly { interface DOMPointReadOnly {
[NewObject] static DOMPointReadOnly fromPoint(optional DOMPointInit other = null); [NewObject] static DOMPointReadOnly fromPoint(optional DOMPointInit other = {});
readonly attribute unrestricted double x; readonly attribute unrestricted double x;
readonly attribute unrestricted double y; readonly attribute unrestricted double y;

View file

@ -10,12 +10,12 @@
* related or neighboring rights to this work. * related or neighboring rights to this work.
*/ */
[Constructor(optional DOMPointInit p1, optional DOMPointInit p2, [Constructor(optional DOMPointInit p1 = {}, optional DOMPointInit p2 = {},
optional DOMPointInit p3, optional DOMPointInit p4), optional DOMPointInit p3 = {}, optional DOMPointInit p4 = {}),
Exposed=(Window,Worker)] Exposed=(Window,Worker)]
interface DOMQuad { interface DOMQuad {
[NewObject] static DOMQuad fromRect(optional DOMRectInit other); [NewObject] static DOMQuad fromRect(optional DOMRectInit other = {});
[NewObject] static DOMQuad fromQuad(optional DOMQuadInit other); [NewObject] static DOMQuad fromQuad(optional DOMQuadInit other = {});
[SameObject] readonly attribute DOMPoint p1; [SameObject] readonly attribute DOMPoint p1;
[SameObject] readonly attribute DOMPoint p2; [SameObject] readonly attribute DOMPoint p2;
@ -25,8 +25,8 @@ interface DOMQuad {
}; };
dictionary DOMQuadInit { dictionary DOMQuadInit {
DOMPointInit p1 = null; DOMPointInit p1 = {};
DOMPointInit p2 = null; DOMPointInit p2 = {};
DOMPointInit p3 = null; DOMPointInit p3 = {};
DOMPointInit p4 = null; DOMPointInit p4 = {};
}; };

View file

@ -33,9 +33,9 @@ interface Document : Node {
HTMLCollection getElementsByClassName(DOMString classNames); HTMLCollection getElementsByClassName(DOMString classNames);
[CEReactions, NewObject, Throws] [CEReactions, NewObject, Throws]
Element createElement(DOMString localName, optional ElementCreationOptions options); Element createElement(DOMString localName, optional ElementCreationOptions options = {});
[CEReactions, NewObject, Throws] [CEReactions, NewObject, Throws]
Element createElementNS(DOMString? namespace, DOMString qualifiedName, optional ElementCreationOptions options); Element createElementNS(DOMString? namespace, DOMString qualifiedName, optional ElementCreationOptions options = {});
[NewObject] [NewObject]
DocumentFragment createDocumentFragment(); DocumentFragment createDocumentFragment();
[NewObject] [NewObject]

View file

@ -91,12 +91,12 @@ partial interface Element {
[NewObject] [NewObject]
DOMRect getBoundingClientRect(); DOMRect getBoundingClientRect();
void scroll(optional ScrollToOptions options); void scroll(optional ScrollToOptions options = {});
void scroll(unrestricted double x, unrestricted double y); void scroll(unrestricted double x, unrestricted double y);
void scrollTo(optional ScrollToOptions options); void scrollTo(optional ScrollToOptions options = {});
void scrollTo(unrestricted double x, unrestricted double y); void scrollTo(unrestricted double x, unrestricted double y);
void scrollBy(optional ScrollToOptions options); void scrollBy(optional ScrollToOptions options = {});
void scrollBy(unrestricted double x, unrestricted double y); void scrollBy(unrestricted double x, unrestricted double y);
attribute unrestricted double scrollTop; attribute unrestricted double scrollTop;
attribute unrestricted double scrollLeft; attribute unrestricted double scrollLeft;

View file

@ -4,7 +4,7 @@
// https://html.spec.whatwg.org/multipage/#the-errorevent-interface // https://html.spec.whatwg.org/multipage/#the-errorevent-interface
[Constructor(DOMString type, optional ErrorEventInit eventInitDict), Exposed=(Window,Worker)] [Constructor(DOMString type, optional ErrorEventInit eventInitDict = {}), Exposed=(Window,Worker)]
interface ErrorEvent : Event { interface ErrorEvent : Event {
readonly attribute DOMString message; readonly attribute DOMString message;
readonly attribute DOMString filename; readonly attribute DOMString filename;

View file

@ -6,7 +6,7 @@
* https://dom.spec.whatwg.org/#event * https://dom.spec.whatwg.org/#event
*/ */
[Constructor(DOMString type, optional EventInit eventInitDict), Exposed=(Window,Worker)] [Constructor(DOMString type, optional EventInit eventInitDict = {}), Exposed=(Window,Worker)]
interface Event { interface Event {
[Pure] [Pure]
readonly attribute DOMString type; readonly attribute DOMString type;

View file

@ -6,7 +6,7 @@
* https://html.spec.whatwg.org/multipage/#eventsource * https://html.spec.whatwg.org/multipage/#eventsource
*/ */
[Constructor(DOMString url, optional EventSourceInit eventSourceInitDict), [Constructor(DOMString url, optional EventSourceInit eventSourceInitDict = {}),
Exposed=(Window,Worker)] Exposed=(Window,Worker)]
interface EventSource : EventTarget { interface EventSource : EventTarget {
readonly attribute DOMString url; readonly attribute DOMString url;

View file

@ -10,13 +10,13 @@ interface EventTarget {
void addEventListener( void addEventListener(
DOMString type, DOMString type,
EventListener? callback, EventListener? callback,
optional (AddEventListenerOptions or boolean) options optional (AddEventListenerOptions or boolean) options = {}
); );
void removeEventListener( void removeEventListener(
DOMString type, DOMString type,
EventListener? callback, EventListener? callback,
optional (EventListenerOptions or boolean) options optional (EventListenerOptions or boolean) options = {}
); );
[Throws] [Throws]

View file

@ -5,7 +5,7 @@
// https://w3c.github.io/ServiceWorker/#extendable-event // https://w3c.github.io/ServiceWorker/#extendable-event
[Constructor(DOMString type, [Constructor(DOMString type,
optional ExtendableEventInit eventInitDict), optional ExtendableEventInit eventInitDict = {}),
Exposed=ServiceWorker, Exposed=ServiceWorker,
Pref="dom.serviceworker.enabled"] Pref="dom.serviceworker.enabled"]
interface ExtendableEvent : Event { interface ExtendableEvent : Event {

View file

@ -4,7 +4,7 @@
// https://w3c.github.io/ServiceWorker/#extendablemessage-event-section // https://w3c.github.io/ServiceWorker/#extendablemessage-event-section
[Constructor(DOMString type, optional ExtendableMessageEventInit eventInitDict), [Constructor(DOMString type, optional ExtendableMessageEventInit eventInitDict = {}),
Exposed=ServiceWorker, Exposed=ServiceWorker,
Pref="dom.serviceworker.enabled"] Pref="dom.serviceworker.enabled"]
interface ExtendableMessageEvent : ExtendableEvent { interface ExtendableMessageEvent : ExtendableEvent {

View file

@ -7,5 +7,5 @@
[Exposed=(Window,Worker)] [Exposed=(Window,Worker)]
partial interface WindowOrWorkerGlobalScope { partial interface WindowOrWorkerGlobalScope {
[NewObject] Promise<Response> fetch(RequestInfo input, optional RequestInit init); [NewObject] Promise<Response> fetch(RequestInfo input, optional RequestInit init = {});
}; };

View file

@ -6,7 +6,7 @@
[Constructor(sequence<BlobPart> fileBits, [Constructor(sequence<BlobPart> fileBits,
DOMString fileName, DOMString fileName,
optional FilePropertyBag options), optional FilePropertyBag options = {}),
Exposed=(Window,Worker)] Exposed=(Window,Worker)]
interface File : Blob { interface File : Blob {
readonly attribute DOMString name; readonly attribute DOMString name;

View file

@ -3,7 +3,7 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
// https://w3c.github.io/uievents/#interface-FocusEvent // https://w3c.github.io/uievents/#interface-FocusEvent
[Constructor(DOMString typeArg, optional FocusEventInit focusEventInitDict), [Constructor(DOMString typeArg, optional FocusEventInit focusEventInitDict = {}),
Exposed=Window] Exposed=Window]
interface FocusEvent : UIEvent { interface FocusEvent : UIEvent {
readonly attribute EventTarget? relatedTarget; readonly attribute EventTarget? relatedTarget;

View file

@ -4,7 +4,7 @@
// https://html.spec.whatwg.org/multipage/#the-formdataevent-interface // https://html.spec.whatwg.org/multipage/#the-formdataevent-interface
[Exposed=Window, [Exposed=Window,
Constructor(DOMString type, optional FormDataEventInit eventInitDict)] Constructor(DOMString type, optional FormDataEventInit eventInitDict = {})]
interface FormDataEvent : Event { interface FormDataEvent : Event {
readonly attribute FormData formData; readonly attribute FormData formData;
}; };

View file

@ -11,7 +11,7 @@ dictionary GainOptions : AudioNodeOptions {
}; };
[Exposed=Window, [Exposed=Window,
Constructor (BaseAudioContext context, optional GainOptions options)] Constructor (BaseAudioContext context, optional GainOptions options = {})]
interface GainNode : AudioNode { interface GainNode : AudioNode {
readonly attribute AudioParam gain; readonly attribute AudioParam gain;
}; };

View file

@ -3,7 +3,7 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#hashchangeevent // https://html.spec.whatwg.org/multipage/#hashchangeevent
[Constructor(DOMString type, optional HashChangeEventInit eventInitDict), [Constructor(DOMString type, optional HashChangeEventInit eventInitDict = {}),
Exposed=Window] Exposed=Window]
interface HashChangeEvent : Event { interface HashChangeEvent : Event {
readonly attribute USVString oldURL; readonly attribute USVString oldURL;

View file

@ -8,7 +8,7 @@
*/ */
// https://w3c.github.io/uievents/#idl-inputevent // https://w3c.github.io/uievents/#idl-inputevent
[Constructor(DOMString type, optional InputEventInit eventInitDict)] [Constructor(DOMString type, optional InputEventInit eventInitDict = {})]
interface InputEvent : UIEvent { interface InputEvent : UIEvent {
readonly attribute DOMString? data; readonly attribute DOMString? data;
readonly attribute boolean isComposing; readonly attribute boolean isComposing;

View file

@ -7,7 +7,7 @@
* *
*/ */
[Constructor(DOMString typeArg, optional KeyboardEventInit keyboardEventInitDict)] [Constructor(DOMString typeArg, optional KeyboardEventInit keyboardEventInitDict = {})]
interface KeyboardEvent : UIEvent { interface KeyboardEvent : UIEvent {
// KeyLocationCode // KeyLocationCode
const unsigned long DOM_KEY_LOCATION_STANDARD = 0x00; const unsigned long DOM_KEY_LOCATION_STANDARD = 0x00;

View file

@ -18,7 +18,7 @@ partial interface Navigator {
partial interface MediaDevices { partial interface MediaDevices {
// MediaTrackSupportedConstraints getSupportedConstraints(); // MediaTrackSupportedConstraints getSupportedConstraints();
Promise<MediaStream> getUserMedia(optional MediaStreamConstraints constraints); Promise<MediaStream> getUserMedia(optional MediaStreamConstraints constraints = {});
}; };

View file

@ -3,7 +3,7 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
// https://drafts.csswg.org/cssom-view/#dom-mediaquerylistevent-mediaquerylistevent // https://drafts.csswg.org/cssom-view/#dom-mediaquerylistevent-mediaquerylistevent
[Constructor(DOMString type, optional MediaQueryListEventInit eventInitDict), Exposed=(Window)] [Constructor(DOMString type, optional MediaQueryListEventInit eventInitDict = {}), Exposed=(Window)]
interface MediaQueryListEvent : Event { interface MediaQueryListEvent : Event {
readonly attribute DOMString media; readonly attribute DOMString media;
readonly attribute boolean matches; readonly attribute boolean matches;

View file

@ -3,7 +3,7 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#messageevent // https://html.spec.whatwg.org/multipage/#messageevent
[Constructor(DOMString type, optional MessageEventInit eventInitDict), Exposed=(Window,Worker)] [Constructor(DOMString type, optional MessageEventInit eventInitDict = {}), Exposed=(Window,Worker)]
interface MessageEvent : Event { interface MessageEvent : Event {
readonly attribute any data; readonly attribute any data;
readonly attribute DOMString origin; readonly attribute DOMString origin;

View file

@ -3,7 +3,7 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
// https://w3c.github.io/uievents/#interface-mouseevent // https://w3c.github.io/uievents/#interface-mouseevent
[Constructor(DOMString typeArg, optional MouseEventInit mouseEventInitDict), [Constructor(DOMString typeArg, optional MouseEventInit mouseEventInitDict = {}),
Exposed=Window] Exposed=Window]
interface MouseEvent : UIEvent { interface MouseEvent : UIEvent {
readonly attribute long screenX; readonly attribute long screenX;

View file

@ -10,7 +10,7 @@
[Pref="dom.mutation_observer.enabled", Constructor(MutationCallback callback)] [Pref="dom.mutation_observer.enabled", Constructor(MutationCallback callback)]
interface MutationObserver { interface MutationObserver {
[Throws] [Throws]
void observe(Node target, optional MutationObserverInit options); void observe(Node target, optional MutationObserverInit options = {});
void disconnect(); void disconnect();
sequence<MutationRecord> takeRecords(); sequence<MutationRecord> takeRecords();
}; };

View file

@ -32,7 +32,7 @@ interface Node : EventTarget {
readonly attribute Document? ownerDocument; readonly attribute Document? ownerDocument;
[Pure] [Pure]
Node getRootNode(optional GetRootNodeOptions options); Node getRootNode(optional GetRootNodeOptions options = {});
[Pure] [Pure]
readonly attribute Node? parentNode; readonly attribute Node? parentNode;

View file

@ -22,7 +22,7 @@ dictionary OscillatorOptions : AudioNodeOptions {
}; };
[Exposed=Window, [Exposed=Window,
Constructor (BaseAudioContext context, optional OscillatorOptions options)] Constructor (BaseAudioContext context, optional OscillatorOptions options = {})]
interface OscillatorNode : AudioScheduledSourceNode { interface OscillatorNode : AudioScheduledSourceNode {
[SetterThrows] [SetterThrows]
attribute OscillatorType type; attribute OscillatorType type;

View file

@ -3,7 +3,7 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#the-pagetransitionevent-interface // https://html.spec.whatwg.org/multipage/#the-pagetransitionevent-interface
[Constructor(DOMString type, optional PageTransitionEventInit eventInitDict), [Constructor(DOMString type, optional PageTransitionEventInit eventInitDict = {}),
Exposed=Window] Exposed=Window]
interface PageTransitionEvent : Event { interface PageTransitionEvent : Event {
readonly attribute boolean persisted; readonly attribute boolean persisted;

View file

@ -35,7 +35,7 @@ enum PanningModelType {
}; };
[Exposed=Window, [Exposed=Window,
Constructor (BaseAudioContext context, optional PannerOptions options)] Constructor (BaseAudioContext context, optional PannerOptions options = {})]
interface PannerNode : AudioNode { interface PannerNode : AudioNode {
attribute PanningModelType panningModel; attribute PanningModelType panningModel;
readonly attribute AudioParam positionX; readonly attribute AudioParam positionX;

View file

@ -3,7 +3,7 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#the-popstateevent-interface // https://html.spec.whatwg.org/multipage/#the-popstateevent-interface
[Constructor(DOMString type, optional PopStateEventInit eventInitDict), [Constructor(DOMString type, optional PopStateEventInit eventInitDict = {}),
Exposed=Window] Exposed=Window]
interface PopStateEvent : Event { interface PopStateEvent : Event {
readonly attribute any state; readonly attribute any state;

View file

@ -12,7 +12,7 @@
* http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0. * http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0.
*/ */
[Constructor(DOMString type, optional ProgressEventInit eventInitDict), [Constructor(DOMString type, optional ProgressEventInit eventInitDict = {}),
Exposed=(Window,Worker)] Exposed=(Window,Worker)]
interface ProgressEvent : Event { interface ProgressEvent : Event {
readonly attribute boolean lengthComputable; readonly attribute boolean lengthComputable;

View file

@ -4,7 +4,7 @@
// https://html.spec.whatwg.org/multipage/#the-promiserejectionevent-interface // https://html.spec.whatwg.org/multipage/#the-promiserejectionevent-interface
[Constructor(DOMString type, optional PromiseRejectionEventInit eventInitDict), Exposed=(Window,Worker)] [Constructor(DOMString type, optional PromiseRejectionEventInit eventInitDict = {}), Exposed=(Window,Worker)]
interface PromiseRejectionEvent : Event { interface PromiseRejectionEvent : Event {
readonly attribute Promise<any> promise; readonly attribute Promise<any> promise;
readonly attribute any reason; readonly attribute any reason;

View file

@ -5,7 +5,7 @@
// https://w3c.github.io/webrtc-pc/#rtcicecandidate-interface // https://w3c.github.io/webrtc-pc/#rtcicecandidate-interface
[Constructor(optional RTCIceCandidateInit candidateInitDict), [Constructor(optional RTCIceCandidateInit candidateInitDict = {}),
Exposed=Window, Pref="dom.webrtc.enabled"] Exposed=Window, Pref="dom.webrtc.enabled"]
interface RTCIceCandidate { interface RTCIceCandidate {
readonly attribute DOMString candidate; readonly attribute DOMString candidate;

View file

@ -4,11 +4,11 @@
// https://w3c.github.io/webrtc-pc/#interface-definition // https://w3c.github.io/webrtc-pc/#interface-definition
[Constructor(optional RTCConfiguration configuration), [Constructor(optional RTCConfiguration configuration = {}),
Exposed=Window, Pref="dom.webrtc.enabled"] Exposed=Window, Pref="dom.webrtc.enabled"]
interface RTCPeerConnection : EventTarget { interface RTCPeerConnection : EventTarget {
Promise<RTCSessionDescriptionInit> createOffer(optional RTCOfferOptions options); Promise<RTCSessionDescriptionInit> createOffer(optional RTCOfferOptions options = {});
Promise<RTCSessionDescriptionInit> createAnswer(optional RTCAnswerOptions options); Promise<RTCSessionDescriptionInit> createAnswer(optional RTCAnswerOptions options = {});
Promise<void> setLocalDescription(RTCSessionDescriptionInit description); Promise<void> setLocalDescription(RTCSessionDescriptionInit description);
readonly attribute RTCSessionDescription? localDescription; readonly attribute RTCSessionDescription? localDescription;
// readonly attribute RTCSessionDescription? currentLocalDescription; // readonly attribute RTCSessionDescription? currentLocalDescription;
@ -17,7 +17,7 @@ interface RTCPeerConnection : EventTarget {
readonly attribute RTCSessionDescription? remoteDescription; readonly attribute RTCSessionDescription? remoteDescription;
// readonly attribute RTCSessionDescription? currentRemoteDescription; // readonly attribute RTCSessionDescription? currentRemoteDescription;
// readonly attribute RTCSessionDescription? pendingRemoteDescription; // readonly attribute RTCSessionDescription? pendingRemoteDescription;
Promise<void> addIceCandidate(optional RTCIceCandidateInit candidate); Promise<void> addIceCandidate(optional RTCIceCandidateInit candidate = {});
readonly attribute RTCSignalingState signalingState; readonly attribute RTCSignalingState signalingState;
readonly attribute RTCIceGatheringState iceGatheringState; readonly attribute RTCIceGatheringState iceGatheringState;
readonly attribute RTCIceConnectionState iceConnectionState; readonly attribute RTCIceConnectionState iceConnectionState;

View file

@ -4,7 +4,7 @@
// https://w3c.github.io/webrtc-pc/#rtcpeerconnectioniceevent // https://w3c.github.io/webrtc-pc/#rtcpeerconnectioniceevent
[Constructor(DOMString type, optional RTCPeerConnectionIceEventInit eventInitDict), [Constructor(DOMString type, optional RTCPeerConnectionIceEventInit eventInitDict = {}),
Exposed=Window, Pref="dom.webrtc.enabled"] Exposed=Window, Pref="dom.webrtc.enabled"]
interface RTCPeerConnectionIceEvent : Event { interface RTCPeerConnectionIceEvent : Event {
readonly attribute RTCIceCandidate? candidate; readonly attribute RTCIceCandidate? candidate;

View file

@ -6,7 +6,7 @@
typedef (Request or USVString) RequestInfo; typedef (Request or USVString) RequestInfo;
[Constructor(RequestInfo input, optional RequestInit init), [Constructor(RequestInfo input, optional RequestInit init = {}),
Exposed=(Window,Worker)] Exposed=(Window,Worker)]
interface Request { interface Request {

View file

@ -4,7 +4,7 @@
// https://fetch.spec.whatwg.org/#response-class // https://fetch.spec.whatwg.org/#response-class
[Constructor(optional BodyInit? body = null, optional ResponseInit init), [Constructor(optional BodyInit? body = null, optional ResponseInit init = {}),
Exposed=(Window,Worker)] Exposed=(Window,Worker)]
interface Response { interface Response {
[NewObject] static Response error(); [NewObject] static Response error();

View file

@ -8,7 +8,8 @@ interface ServiceWorkerContainer : EventTarget {
readonly attribute ServiceWorker? controller; readonly attribute ServiceWorker? controller;
//readonly attribute Promise<ServiceWorkerRegistration> ready; //readonly attribute Promise<ServiceWorkerRegistration> ready;
[NewObject] Promise<ServiceWorkerRegistration> register(USVString scriptURL, optional RegistrationOptions options); [NewObject] Promise<ServiceWorkerRegistration> register(USVString scriptURL,
optional RegistrationOptions options = {});
//[NewObject] Promise<any> getRegistration(optional USVString clientURL = ""); //[NewObject] Promise<any> getRegistration(optional USVString clientURL = "");
//[NewObject] Promise<FrozenArray<ServiceWorkerRegistration>> getRegistrations(); //[NewObject] Promise<FrozenArray<ServiceWorkerRegistration>> getRegistrations();

View file

@ -11,7 +11,7 @@ dictionary StereoPannerOptions: AudioNodeOptions {
}; };
[Exposed=Window, [Exposed=Window,
Constructor (BaseAudioContext context, optional StereoPannerOptions options)] Constructor (BaseAudioContext context, optional StereoPannerOptions options = {})]
interface StereoPannerNode : AudioScheduledSourceNode { interface StereoPannerNode : AudioScheduledSourceNode {
readonly attribute AudioParam pan; readonly attribute AudioParam pan;
}; };

View file

@ -9,7 +9,7 @@
* Event sent to a window when a storage area changes. * Event sent to a window when a storage area changes.
*/ */
[Constructor(DOMString type, optional StorageEventInit eventInitDict), Exposed=Window] [Constructor(DOMString type, optional StorageEventInit eventInitDict = {}), Exposed=Window]
interface StorageEvent : Event { interface StorageEvent : Event {
readonly attribute DOMString? key; readonly attribute DOMString? key;
readonly attribute DOMString? oldValue; readonly attribute DOMString? oldValue;

View file

@ -32,7 +32,7 @@ dictionary TestDictionary {
Blob interfaceValue; Blob interfaceValue;
any anyValue; any anyValue;
object objectValue; object objectValue;
TestDictionaryDefaults dict = null; TestDictionaryDefaults dict = {};
sequence<TestDictionaryDefaults> seqDict; sequence<TestDictionaryDefaults> seqDict;
// Testing codegen to import Element correctly, ensure no other code references Element directly // Testing codegen to import Element correctly, ensure no other code references Element directly
sequence<Element> elementSequence; sequence<Element> elementSequence;

View file

@ -7,6 +7,6 @@
[Pref="dom.worklet.testing.enabled", Exposed=(Window), Constructor] [Pref="dom.worklet.testing.enabled", Exposed=(Window), Constructor]
interface TestWorklet { interface TestWorklet {
[NewObject] Promise<void> addModule(USVString moduleURL, optional WorkletOptions options); [NewObject] Promise<void> addModule(USVString moduleURL, optional WorkletOptions options = {});
DOMString? lookup(DOMString key); DOMString? lookup(DOMString key);
}; };

View file

@ -12,11 +12,11 @@ dictionary TextDecodeOptions {
boolean stream = false; boolean stream = false;
}; };
[Constructor(optional DOMString label = "utf-8", optional TextDecoderOptions options), Exposed=(Window,Worker)] [Constructor(optional DOMString label = "utf-8", optional TextDecoderOptions options = {}), Exposed=(Window,Worker)]
interface TextDecoder { interface TextDecoder {
readonly attribute DOMString encoding; readonly attribute DOMString encoding;
readonly attribute boolean fatal; readonly attribute boolean fatal;
readonly attribute boolean ignoreBOM; readonly attribute boolean ignoreBOM;
[Throws] [Throws]
USVString decode(optional BufferSource input, optional TextDecodeOptions options); USVString decode(optional BufferSource input, optional TextDecodeOptions options = {});
}; };

View file

@ -5,7 +5,7 @@
// https://html.spec.whatwg.org/multipage/#the-trackevent-interface // https://html.spec.whatwg.org/multipage/#the-trackevent-interface
[Exposed=Window, [Exposed=Window,
Constructor(DOMString type, optional TrackEventInit eventInitDict)] Constructor(DOMString type, optional TrackEventInit eventInitDict = {})]
interface TrackEvent : Event { interface TrackEvent : Event {
readonly attribute (VideoTrack or AudioTrack or TextTrack)? track; readonly attribute (VideoTrack or AudioTrack or TextTrack)? track;
}; };

View file

@ -6,7 +6,7 @@
* https://dom.spec.whatwg.org/#event * https://dom.spec.whatwg.org/#event
*/ */
[Constructor(DOMString type, optional TransitionEventInit transitionEventInitDict), [Constructor(DOMString type, optional TransitionEventInit transitionEventInitDict = {}),
Exposed=Window] Exposed=Window]
interface TransitionEvent : Event { interface TransitionEvent : Event {
readonly attribute DOMString propertyName; readonly attribute DOMString propertyName;

View file

@ -3,7 +3,7 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
// https://w3c.github.io/uievents/#interface-uievent // https://w3c.github.io/uievents/#interface-uievent
[Constructor(DOMString type, optional UIEventInit eventInitDict)] [Constructor(DOMString type, optional UIEventInit eventInitDict = {})]
interface UIEvent : Event { interface UIEvent : Event {
// readonly attribute WindowProxy? view; // readonly attribute WindowProxy? view;
readonly attribute Window? view; readonly attribute Window? view;

View file

@ -3,7 +3,7 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.15 // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.15
[Constructor(DOMString type, optional WebGLContextEventInit eventInit), [Constructor(DOMString type, optional WebGLContextEventInit eventInit = {}),
Exposed=Window] Exposed=Window]
interface WebGLContextEvent : Event { interface WebGLContextEvent : Event {
readonly attribute DOMString statusMessage; readonly attribute DOMString statusMessage;

View file

@ -3,7 +3,7 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
// https://w3c.github.io/uievents/#interface-wheelevent // https://w3c.github.io/uievents/#interface-wheelevent
[Constructor(DOMString typeArg, optional WheelEventInit wheelEventInitDict), [Constructor(DOMString typeArg, optional WheelEventInit wheelEventInitDict = {}),
Exposed=Window] Exposed=Window]
interface WheelEvent : MouseEvent { interface WheelEvent : MouseEvent {
const unsigned long DOM_DELTA_PIXEL = 0x00; const unsigned long DOM_DELTA_PIXEL = 0x00;

View file

@ -118,11 +118,11 @@ partial interface Window {
[Replaceable] readonly attribute long pageXOffset; [Replaceable] readonly attribute long pageXOffset;
[Replaceable] readonly attribute long scrollY; [Replaceable] readonly attribute long scrollY;
[Replaceable] readonly attribute long pageYOffset; [Replaceable] readonly attribute long pageYOffset;
void scroll(optional ScrollToOptions options); void scroll(optional ScrollToOptions options = {});
void scroll(unrestricted double x, unrestricted double y); void scroll(unrestricted double x, unrestricted double y);
void scrollTo(optional ScrollToOptions options); void scrollTo(optional ScrollToOptions options = {});
void scrollTo(unrestricted double x, unrestricted double y); void scrollTo(unrestricted double x, unrestricted double y);
void scrollBy(optional ScrollToOptions options); void scrollBy(optional ScrollToOptions options = {});
void scrollBy(unrestricted double x, unrestricted double y); void scrollBy(unrestricted double x, unrestricted double y);
// client // client

View file

@ -9,7 +9,7 @@ interface AbstractWorker {
}; };
// https://html.spec.whatwg.org/multipage/#worker // https://html.spec.whatwg.org/multipage/#worker
[Constructor(USVString scriptURL, optional WorkerOptions options), Exposed=(Window,Worker)] [Constructor(USVString scriptURL, optional WorkerOptions options = {}), Exposed=(Window,Worker)]
interface Worker : EventTarget { interface Worker : EventTarget {
void terminate(); void terminate();

View file

@ -5,7 +5,7 @@
// https://drafts.css-houdini.org/worklets/#worklet // https://drafts.css-houdini.org/worklets/#worklet
[Pref="dom.worklet.enabled", Exposed=(Window)] [Pref="dom.worklet.enabled", Exposed=(Window)]
interface Worklet { interface Worklet {
[NewObject] Promise<void> addModule(USVString moduleURL, optional WorkletOptions options); [NewObject] Promise<void> addModule(USVString moduleURL, optional WorkletOptions options = {});
}; };
dictionary WorkletOptions { dictionary WorkletOptions {

View file

@ -7,7 +7,7 @@
interface XR: EventTarget { interface XR: EventTarget {
// Methods // Methods
Promise<void> supportsSessionMode(XRSessionMode mode); Promise<void> supportsSessionMode(XRSessionMode mode);
Promise<XRSession> requestSession(optional XRSessionCreationOptions parameters); Promise<XRSession> requestSession(optional XRSessionCreationOptions parameters = {});
// Events // Events
// attribute EventHandler ondevicechange; // attribute EventHandler ondevicechange;

View file

@ -5,7 +5,7 @@
// https://immersive-web.github.io/webxr/#xrrigidtransform-interface // https://immersive-web.github.io/webxr/#xrrigidtransform-interface
[SecureContext, Exposed=Window, Pref="dom.webxr.enabled", [SecureContext, Exposed=Window, Pref="dom.webxr.enabled",
Constructor(optional DOMPointInit position, optional DOMPointInit orientation)] Constructor(optional DOMPointInit position = {}, optional DOMPointInit orientation = {})]
interface XRRigidTransform { interface XRRigidTransform {
readonly attribute DOMPointReadOnly position; readonly attribute DOMPointReadOnly position;
readonly attribute DOMPointReadOnly orientation; readonly attribute DOMPointReadOnly orientation;

View file

@ -29,7 +29,7 @@ interface XRSession : EventTarget {
// FrozenArray<XRInputSource> getInputSources(); // FrozenArray<XRInputSource> getInputSources();
sequence<XRInputSource> getInputSources(); sequence<XRInputSource> getInputSources();
void updateRenderState(optional XRRenderStateInit state); void updateRenderState(optional XRRenderStateInit state = {});
long requestAnimationFrame(XRFrameRequestCallback callback); long requestAnimationFrame(XRFrameRequestCallback callback);
void cancelAnimationFrame(long handle); void cancelAnimationFrame(long handle);

View file

@ -19,7 +19,7 @@ dictionary XRWebGLLayerInit {
[SecureContext, Exposed=Window, Constructor(XRSession session, [SecureContext, Exposed=Window, Constructor(XRSession session,
XRWebGLRenderingContext context, XRWebGLRenderingContext context,
optional XRWebGLLayerInit layerInit), optional XRWebGLLayerInit layerInit = {}),
Pref="dom.webxr.enabled"] Pref="dom.webxr.enabled"]
interface XRWebGLLayer : XRLayer { interface XRWebGLLayer : XRLayer {
// // Attributes // // Attributes

View file

@ -14,4 +14,4 @@ unrooted_must_root_lint = []
webidl_lint = [] webidl_lint = []
[dependencies] [dependencies]
weedle = "0.9" weedle = "0.10"