Files
servo/components/script_bindings/codegen/Bindings.conf
Tim van der Lippe 6f43bba0f4 script: Pass &mut JSContext to more attribute setters (#44494)
Part of #42812

Testing: it compiles

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2026-04-25 12:51:02 +00:00

1287 lines
29 KiB
Plaintext

# 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/.
# DOM Bindings Configuration.
#
# The WebIDL interfaces are defined in dom/webidls. For each such interface,
# there is a corresponding entry in the configuration table below.
# The configuration table maps each interface name to a |descriptor|.
#
# Valid fields for all descriptors:
# * outerObjectHook: string to use in place of default value for outerObject and thisObject
# JS class hooks
DOMInterfaces = {
'AbortController': {
'realm':['Abort'],
},
'AbortSignal': {
'weakReferenceable': True,
'canGc':['Abort', 'Any', 'Timeout'],
'cx': ['ThrowIfAborted'],
},
'AbstractRange': {
'weakReferenceable': True,
},
'Attr': {
'cx':['SetValue'],
},
'AudioBuffer': {
'canGc':['CopyToChannel', 'GetChannelData'],
},
'AudioContext': {
'realm': ['Close', 'Suspend'],
'cx':['Constructor', 'CreateMediaElementSource', 'CreateMediaStreamDestination', 'CreateMediaStreamSource', 'CreateMediaStreamTrackSource'],
},
'BaseAudioContext': {
'inRealms': ['DecodeAudioData', 'Resume', 'ParseFromString', 'GetBounds', 'GetClientRects'],
'canGc': ['CreateChannelMerger', 'CreateOscillator', 'CreateStereoPanner', 'CreateGain', 'CreateIIRFilter', 'CreateBiquadFilter', 'CreateBufferSource', 'CreateAnalyser', 'CreatePanner', 'CreateChannelSplitter', 'CreateBuffer', 'CreateConstantSource', 'Resume', 'DecodeAudioData', 'Destination', 'Listener'],
},
'Blob': {
'weakReferenceable': True,
'canGc': ['ArrayBuffer', 'Bytes'],
'inRealms': ['Bytes', 'ArrayBuffer'],
'realm': ['Text'],
'cx': ['Stream', 'Slice', 'Constructor']
},
'Bluetooth': {
'realm': ['GetAvailability', 'RequestDevice'],
},
'BluetoothAdvertisingEvent': {
'cx': ['Constructor'],
},
'BluetoothDevice': {
'realm': ['WatchAdvertisements'],
'cx': ['GetGatt'],
},
'BluetoothRemoteGATTCharacteristic': {
'realm': ['ReadValue', 'StartNotifications', 'StopNotifications', 'WriteValue', 'GetDescriptor', 'GetDescriptors'],
},
'BluetoothRemoteGATTDescriptor': {
'realm': ['ReadValue', 'WriteValue'],
},
'BluetoothRemoteGATTServer': {
'realm': ['Connect', 'GetPrimaryService', 'GetPrimaryServices'],
'cx': ['Disconnect'],
},
'BluetoothRemoteGATTService': {
'realm': ['GetCharacteristic', 'GetCharacteristics', 'GetIncludedService', 'GetIncludedServices']
},
'BroadcastChannel': {
'cx': ['PostMessage'],
},
'ByteLengthQueuingStrategy': {
'cx': ['GetSize'],
},
'CanvasRenderingContext2D': {
'cx': ['GetTransform', 'MeasureText', 'CreateLinearGradient', 'CreatePattern', 'CreateRadialGradient'],
'canGc': ['CreateImageData', 'GetImageData', 'CreateImageData_',],
},
'CharacterData': {
'cx': ['After', 'Before', 'Remove', 'ReplaceWith'],
},
'Clipboard': {
'realm': ['ReadText', 'WriteText']
},
'ClipboardItem': {
'cx': ['Constructor', 'Types'],
'realm': ['GetType']
},
'Comment': {
'cx': ['Constructor']
},
'CompressionStream': {
'cx': ['Constructor'],
},
'CookieStore': {
'cx': ['Set', 'Set_', 'Get', 'Get_', 'GetAll', 'GetAll_', 'Delete', 'Delete_'],
},
'CountQueuingStrategy': {
'cx': ['GetSize'],
},
'Credential': {
'canGc': ['IsConditionalMediationAvailable', 'WillRequestConditionalCreation'],
},
'CSS': {
'cx': ['PaintWorklet'],
},
'CSSGroupingRule': {
'cx': ['CssRules', 'InsertRule', 'DeleteRule'],
},
'CSSKeyframeRule': {
'cx': ['Style'],
},
'CSSKeyframesRule': {
'cx': ['AppendRule', 'CssRules', 'DeleteRule', 'FindRule'],
},
'CSSLayerStatementRule': {
'canGc': ['NameList'],
},
'CSSMediaRule': {
'cx': ['Media'],
},
'CSSNestedDeclarations': {
'cx': ['Style'],
},
'CSSRuleList': {
'cx': ['Item', 'IndexedGetter'],
},
'CSSStyleRule': {
'cx': ['Style'],
},
'CSSStyleSheet': {
'realm': ['Replace'],
'cx': ['AddRule', 'DeleteRule', 'GetCssRules', 'GetRules', 'InsertRule', 'RemoveRule'],
},
'Crypto': {
'cx': ['Subtle'],
},
'CSSStyleDeclaration': {
'implicitCxSetters': True,
'cx': ['RemoveProperty', 'SetProperty']
},
'CustomElementRegistry': {
'inRealms': ['WhenDefined'],
'canGc': ['Define', 'WhenDefined'],
},
'DataTransfer': {
'canGc': ['Files', 'Types']
},
'DataTransferItem': {
'canGc': ['GetAsFile']
},
'DataTransferItemList': {
'canGc': ['IndexedGetter', 'Add', 'Add_']
},
'DebuggerGlobalScope': {
'useSystemCompartment': True,
},
'DecompressionStream': {
'cx': ['Constructor'],
},
'DedicatedWorkerGlobalScope': {
'cx': ['PostMessage', 'PostMessage_'],
},
'Document': {
'additionalTraits': ["crate::interfaces::DocumentHelpers"],
'canGc': ['CreateRange', 'SetBgColor', 'SetFgColor', 'Fonts', 'ExitFullscreen', 'CreateExpression', 'CreateNSResolver', 'Evaluate', 'StyleSheets', 'Implementation', 'GetElementsByTagName', 'GetElementsByTagNameNS', 'GetElementsByClassName', 'CreateNodeIterator', 'GetElementsByName', 'Images', 'Embeds', 'Plugins', 'Links', 'Forms', 'Scripts', 'Anchors', 'Applets', 'Children', 'GetSelection', 'NamedGetter', 'AdoptedStyleSheets', 'SetAdoptedStyleSheets'],
'cx': [
'AdoptNode',
'Append',
'Close',
'CreateAttribute',
'CreateAttributeNS',
'CreateCDATASection',
'CreateComment',
'CreateDocumentFragment',
'CreateElement',
'CreateElementNS',
'CreateEvent',
'CreateProcessingInstruction',
'CreateTextNode',
'ExecCommand',
'GetLocation',
'ImportNode',
'MoveBefore',
'Open',
'Open_',
'ParseHTMLUnsafe',
'Prepend',
'QueryCommandEnabled',
'QueryCommandState',
'QueryCommandValue',
'ReplaceChildren',
'SetBody',
'SetTitle',
'Write',
'Writeln',
],
},
'DissimilarOriginWindow': {
'canGc': ['Location'],
'cx': ['PostMessage', 'PostMessage_', 'SetOpener', 'Opener']
},
'DocumentFragment': {
'canGc': ['Children'],
'cx': ['Append', 'Constructor', 'MoveBefore', 'Prepend', 'ReplaceChildren']
},
'DocumentType': {
'cx': ['After', 'Before', 'Remove', 'ReplaceWith']
},
'DOMImplementation': {
'cx': ['CreateDocument', 'CreateDocumentType', 'CreateHTMLDocument'],
},
'DOMMatrix': {
'canGc': ['FromMatrix', 'FromFloat32Array', 'FromFloat64Array'],
},
'DOMMatrixReadOnly': {
'canGc': ['Multiply', 'Inverse', 'Scale', 'Translate', 'Rotate', 'RotateFromVector','FlipY', 'ScaleNonUniform', 'Scale3d', 'RotateAxisAngle', 'SkewX', 'SkewY', 'FlipX', 'TransformPoint', 'FromFloat32Array', 'FromFloat64Array', 'FromMatrix', 'ToFloat32Array', 'ToFloat64Array'],
},
'DOMParser': {
'cx': ['ParseFromString'],
},
'DOMPoint': {
'canGc': ['FromPoint'],
},
'DOMPointReadOnly': {
'canGc': ['FromPoint', 'MatrixTransform'],
},
'DOMQuad': {
'canGc': ['FromRect', 'FromQuad', 'GetBounds'],
},
'DOMRect': {
'canGc': ['FromRect'],
},
'DOMRectReadOnly': {
'canGc': ['FromRect'],
},
'DOMStringMap': {
'cx': ['NamedDeleter', 'NamedSetter']
},
"DOMTokenList": {
'canGc': ['SetValue', 'Add', 'Remove', 'Toggle', 'Replace']
},
'Element': {
'cx': ['GetHTML', 'GetInnerHTML', 'GetOuterHTML', 'SetHTMLUnsafe', 'SetInnerHTML', 'SetOuterHTML', 'InsertAdjacentHTML', 'ToggleAttribute', 'SetAttribute', 'SetAttributeNS', 'SetAttributeNode', 'SetAttributeNodeNS', 'RemoveAttributeNS', 'RemoveAttributeNode', 'SetRole', 'SetAriaAtomic', 'SetAriaAutoComplete', 'SetAriaBrailleLabel', 'SetAriaBrailleRoleDescription', 'SetAriaBusy', 'SetAriaChecked', 'SetAriaColCount', 'SetAriaColIndex', 'SetAriaColIndexText', 'SetAriaColSpan', 'SetAriaCurrent', 'SetAriaDescription', 'SetAriaDisabled', 'SetAriaExpanded', 'SetAriaHasPopup', 'SetAriaHidden', 'SetAriaInvalid', 'SetAriaKeyShortcuts', 'SetAriaLabel', 'SetAriaLevel', 'SetAriaLive', 'SetAriaModal', 'SetAriaMultiLine', 'SetAriaMultiSelectable', 'SetAriaOrientation', 'SetAriaPlaceholder', 'SetAriaPosInSet', 'SetAriaPressed','SetAriaReadOnly', 'SetAriaRelevant', 'SetAriaRequired', 'SetAriaRoleDescription', 'SetAriaRowCount', 'SetAriaRowIndex', 'SetAriaRowIndexText', 'SetAriaRowSpan', 'SetAriaSelected', 'SetAriaSetSize','SetAriaSort', 'SetAriaValueMax', 'SetAriaValueMin', 'SetAriaValueNow', 'SetAriaValueText', 'ReplaceWith', 'MoveBefore', 'InsertAdjacentElement', 'InsertAdjacentText', 'Before', 'After', 'Prepend', 'Remove', 'ReplaceChildren', 'Append', 'AttachShadow'],
'canGc': ['GetClientRects', 'GetBoundingClientRect', 'SetId','SetClassName', 'RequestFullscreen', 'ClassList', 'Attributes', 'GetElementsByTagName', 'GetElementsByTagNameNS', 'GetElementsByClassName', 'Children', 'RemoveAttribute'],
},
'ElementInternals': {
'canGc': ['GetLabels', 'GetValidity', 'SetValidity', 'States'],
'cx': ['CheckValidity', 'ReportValidity'],
},
'EventSource': {
'weakReferenceable': True,
},
'EventTarget': {
'canGc': ['DispatchEvent'],
},
'ExtendableMessageEvent': {
'canGc': ['Ports'],
},
'FakeXRDevice': {
'canGc': ['Disconnect'],
},
'File': {
'weakReferenceable': True,
},
'FileReader': {
'canGc': ['Abort', 'ReadAsArrayBuffer', 'ReadAsDataURL', 'ReadAsText'],
},
'FileReaderSync': {
'canGc': ['ReadAsArrayBuffer'],
},
'FontFaceSet': {
'canGc': ['Load'],
},
'Gamepad': {
'canGc': ['Axes']
},
'GamepadHapticActuator': {
'inRealms': ['PlayEffect', 'Reset'],
'canGc': ['PlayEffect', 'Reset', 'Effects'],
},
'Geolocation': {
'canGc': ['GetCurrentPosition', 'WatchPosition'],
},
'GlobalScope': {
'additionalTraits': ['crate::interfaces::GlobalScopeHelpers<Self>'],
},
'GPU': {
'inRealms': ['RequestAdapter'],
'canGc': ['RequestAdapter', 'WgslLanguageFeatures'],
},
'GPUAdapter': {
'inRealms': ['RequestDevice'],
'canGc': ['RequestDevice'],
},
'GPUBuffer': {
'inRealms': ['MapAsync'],
'canGc': ['GetMappedRange', 'MapAsync'],
'allowDropImpl': True,
},
'GPUCanvasContext': {
'weakReferenceable': True,
},
'GPUCompilationInfo': {
'canGc': ['Messages'],
},
'GPUDevice': {
'inRealms': [
'CreateComputePipelineAsync',
'CreateRenderPipelineAsync',
'CreateShaderModule', # Creates promise for compilation info
'PopErrorScope'
],
'canGc': [
'CreateComputePipelineAsync',
'CreateRenderPipelineAsync',
'CreateShaderModule',
'PopErrorScope'
],
'weakReferenceable': True, # for usage in GlobalScope https://github.com/servo/servo/issues/32519
},
'GPUQueue': {
'canGc': ['OnSubmittedWorkDone'],
},
'History': {
'cx': ['PushState', 'ReplaceState', 'GetState', 'Go']
},
"HTMLAnchorElement": {
"canGc": ["SetRel","SetHref", 'SetHash', 'SetHost', 'SetHostname', 'SetPassword', 'SetPathname', 'SetPort', 'SetProtocol', 'SetSearch', 'SetUsername', 'RelList'],
'cx': ["SetText"]
},
"HTMLAreaElement": {
"canGc": ['SetText', 'SetRel', 'SetHref', 'SetHash', 'SetHost', 'SetHostname', 'SetPassword', 'SetPathname', 'SetPort', 'SetProtocol', 'SetSearch', 'SetUsername', 'RelList']
},
"HTMLAudioElement": {
'cx': ['Audio'],
'weakReferenceable': True,
},
"HTMLBodyElement": {
'implicitCxSetters': True,
},
'HTMLButtonElement': {
'canGc': ['SetBackground', 'SetCustomValidity', 'Validity'],
'cx': ['CheckValidity', 'ReportValidity'],
},
'HTMLCanvasElement': {
'cx': ['CaptureStream'],
'canGc': ['GetContext', 'SetHeight', 'SetWidth', 'TransferControlToOffscreen'],
'weakReferenceable': True,
},
'HTMLDataListElement': {
"canGc": ["Options"]
},
'HTMLDialogElement': {
'canGc': ['Close', 'Show', 'ShowModal'],
},
'HTMLDocument': {
'canGc': ['NamedGetter'],
'cx': ['GetLocation'],
},
'HTMLElement': {
'canGc': [
'AttachInternals',
'Blur',
'Click',
'Dataset',
'Focus',
'GetOnblur',
'GetOnerror',
'GetOnfocus',
'GetOnload',
'GetOnresize',
'GetOnscroll',
'SetAutofocus',
'SetContentEditable',
'SetTabIndex',
'SetTranslate',
'Style',
],
'cx': ['SetInnerText', 'SetOuterText']
},
'HTMLFieldSetElement': {
'canGc': ['Elements', 'SetCustomValidity', 'Validity'],
'cx': ['CheckValidity', 'ReportValidity'],
},
'HTMLFontElement': {
'implicitCxSetters': True,
},
'HTMLFormControlsCollection': {
'canGc': ['NamedGetter', 'NamedItem'],
},
'HTMLFormElement': {
'canGc': ['Elements', 'IndexedGetter', 'NamedGetter', 'RequestSubmit', 'Submit', 'Reset', 'SetRel', 'RelList'],
'cx': ['CheckValidity', 'ReportValidity'],
},
'HTMLFrameSetElement': {
'implicitCxSetters': True,
},
'HTMLIFrameElement': {
'cx': ['Sandbox', 'SetSrcdoc'],
},
'HTMLHRElement': {
'implicitCxSetters': True,
},
'HTMLImageElement': {
'cx': ['Decode', 'Image', 'ReportValidity', 'SetCrossOrigin'],
},
'HTMLInputElement': {
'canGc': ['SetValue', 'SetValueAsNumber', 'SetValueAsDate', 'StepUp', 'StepDown','GetLabels', 'SetCustomValidity', 'Validity', 'SetChecked'],
'cx': ['CheckValidity', 'ReportValidity'],
},
'HTMLLIElement': {
'implicitCxSetters': True,
},
'HTMLLinkElement': {
'canGc': ['Blocking', 'GetSheet', 'SetRel','RelList'],
'cx': ['SetCrossOrigin'],
},
'HTMLMapElement': {
'implicitCxSetters': True,
'cx': ['Areas'],
},
'HTMLMediaElement': {
'canGc': ['AddTextTrack', 'AudioTracks', 'Buffered', 'Played', 'Seekable', 'TextTracks', 'VideoTracks'],
'realm': ['Play'],
'weakReferenceable': True,
'cx': ['SetCrossOrigin', 'SetSrcObject', 'Load', 'Pause'],
},
'HTMLMeterElement': {
'canGc': ['SetValue', 'SetMin', 'SetMax', 'SetLow', 'SetHigh', 'SetOptimum'],
'cx': ['CheckValidity', 'ReportValidity'],
},
'HTMLObjectElement': {
'canGc': ['SetCustomValidity', 'Validity'],
'cx': ['CheckValidity', 'ReportValidity'],
},
'HTMLOptionElement': {
'canGc': ['SetSelected'],
'cx': ['Option', 'SetText'],
},
'HTMLOptionsCollection': {
'cx': ['Add', 'IndexedSetter', 'Remove', 'SetLength', 'SetSelectedIndex']
},
'HTMLOutputElement': {
'canGc': ['SetCustomValidity', 'Validity'],
'cx': ['CheckValidity', 'ReportValidity', 'SetDefaultValue', 'SetValue'],
},
'HTMLPreElement': {
'implicitCxSetters': True,
},
'HTMLProgressElement': {
'canGc': ['SetValue', 'SetMax']
},
'HTMLScriptElement': {
'canGc': ['SetAsync'],
'cx': ['Blocking', 'SetCrossOrigin', 'SetInnerText', 'SetSrc', 'SetText', 'SetTextContent'],
},
'HTMLSelectElement': {
'canGc': ['SetCustomValidity', 'SetValue', 'Validity'],
'cx': ['Add', 'CheckValidity', 'IndexedSetter', 'Remove', 'Remove_', 'ReportValidity', 'SetLength', 'SetSelectedIndex'],
},
'HTMLStyleElement': {
'canGc': ['Blocking'],
},
'HTMLTableElement': {
'canGc': ['InsertCell', 'InsertRow'],
'cx': [
'CreateCaption',
'CreateTBody',
'CreateTFoot',
'CreateTHead',
'DeleteCaption',
'DeleteRow',
'DeleteTFoot',
'DeleteTHead',
'InsertRow',
],
'implicitCxSetters': True,
},
'HTMLTableCellElement': {
'implicitCxSetters': True,
},
'HTMLTableColElement': {
'implicitCxSetters': True,
},
'HTMLTableRowElement': {
'cx': ['DeleteCell', 'InsertCell'],
'implicitCxSetters': True,
},
'HTMLTableSectionElement': {
'cx': ['DeleteRow', 'InsertRow']
},
'HTMLTemplateElement': {
'cx': ['Content'],
},
'HTMLTextAreaElement': {
'canGc': ['SetCustomValidity', 'SetValue', 'Validity'],
'cx': ['CheckValidity', 'ReportValidity', 'SetDefaultValue'],
},
'HTMLTitleElement': {
'cx': ['SetText']
},
'HTMLVideoElement': {
'weakReferenceable': True,
},
'IDBCursor': {
'cx': ['Key', 'PrimaryKey']
},
'IDBDatabase': {
'canGc': ['ObjectStoreNames'],
'cx': ['CreateObjectStore'],
},
'IDBFactory': {
'cx': ['Cmp', 'Databases'],
},
'IDBIndex': {
'canGc': ['KeyPath'],
},
'IDBKeyRange': {
'cx': ['Lower', 'Upper', 'Only', 'LowerBound', 'UpperBound', 'Bound', 'Includes']
},
'IDBObjectStore': {
'canGc': ['IndexNames'],
'cx': ['CreateIndex', 'Put', 'Add', 'Delete', 'Clear', 'Get', 'GetKey', 'GetAll', 'GetAllKeys', 'Count', 'OpenCursor', 'OpenKeyCursor', 'KeyPath'],
},
'IDBTransaction': {
'canGc': ['ObjectStore']
},
'IntersectionObserver': {
'canGc': ['Thresholds']
},
'KeyboardEvent': {
'cx': ['Constructor'],
},
'LayoutResult': {
'canGc': ['Phases']
},
'Location': {
'cx': ['Assign', 'Reload', 'Replace', 'SetHash', 'SetHost', 'SetHostname', 'SetHref', 'SetPathname', 'SetPort', 'SetProtocol', 'SetSearch'],
},
'MediaDevices': {
'realm': ['GetUserMedia'],
'canGc': ['EnumerateDevices'],
'inRealms': ['GetUserMedia', 'GetClientRects', 'GetBoundingClientRect'],
},
'MediaElementAudioSourceNode': {
'cx': ['Constructor'],
},
'MediaStreamAudioSourceNode': {
'cx': ['Constructor'],
},
'MediaStreamAudioDestinationNode': {
'cx': ['Constructor'],
},
'MediaStreamTrackAudioSourceNode': {
'cx': ['Constructor'],
},
'MediaQueryList': {
'weakReferenceable': True,
},
'MediaSession': {
'canGc': ['GetMetadata'],
},
'MediaStreamTrack': {
'cx': ['Clone'],
},
'MediaStream': {
'cx': ['Constructor', 'Constructor_', 'Constructor__', 'Clone'],
},
'MessagePort': {
'weakReferenceable': True,
'canGc': ['Close', 'GetOnmessage'],
'cx': ['PostMessage', 'PostMessage_', 'SetOnmessage', 'Start']
},
'MessageEvent': {
'canGc': ['Ports'],
},
'MouseEvent': {
'cx': ['Constructor'],
},
'NamedNodeMap': {
'cx': ['SetNamedItem', 'SetNamedItemNS', 'RemoveNamedItem', 'RemoveNamedItemNS', 'RemoveAttribute'],
},
'NavigationPreloadManager': {
'inRealms': ['Disable', 'Enable', 'GetState', 'SetHeaderValue'],
'canGc': ['Disable', 'Enable', 'GetState', 'SetHeaderValue'],
},
'Navigator': {
'inRealms': ['GetVRDisplays'],
'canGc': ['Languages', 'SendBeacon', 'UserActivation'],
'cx': ['Clipboard', 'Storage', 'WakeLock'],
},
'WakeLock': {
'realm': ['Request'],
},
'Node': {
'canGc': ['ChildNodes'],
'cx': ['AppendChild', 'CloneNode', 'InsertBefore', 'Normalize', 'RemoveChild', 'ReplaceChild', 'SetNodeValue', 'SetTextContent']
},
'NodeIterator': {
'cx': ['NextNode', 'PreviousNode'],
},
'Notification': {
'cx': ['Actions', 'Constructor', 'RequestPermission', 'Vibrate']
},
'OfflineAudioContext': {
'inRealms': ['StartRendering'],
'canGc': ['StartRendering'],
},
'OffscreenCanvas': {
'canGc': ['ConvertToBlob', 'GetContext', 'SetHeight', 'SetWidth', 'TransferToImageBitmap'],
},
'OffscreenCanvasRenderingContext2D': {
'cx': ['CreateImageData', 'CreateImageData_', 'GetImageData', 'GetTransform', 'MeasureText', 'CreateLinearGradient', 'CreatePattern', 'CreateRadialGradient'],
},
'PaintRenderingContext2D': {
'cx': ['CreateLinearGradient', 'CreatePattern', 'CreateRadialGradient', 'GetTransform'],
},
'PaintWorkletGlobalScope': {
'cx': ['RegisterPaint'],
},
'PerformanceObserver': {
'canGc': ['SupportedEntryTypes'],
},
'Permissions': {
'cx': ['Query', 'Request', 'Revoke'],
},
'Promise': {
'spiderMonkeyInterface': True,
'additionalTraits': ["js::conversions::FromJSValConvertibleRc"],
'allowDropImpl': True,
},
'RadioNodeList': {
'canGc': ['SetValue'],
},
'Range': {
'canGc': ['CloneRange', 'GetClientRects', 'GetBoundingClientRect'],
'weakReferenceable': True,
'cx': ['CloneContents', 'CreateContextualFragment', 'DeleteContents', 'ExtractContents', 'InsertNode', 'SurroundContents'],
},
'Request': {
'canGc': ['Headers', 'Text', 'Blob', 'FormData', 'Json', 'ArrayBuffer', 'Clone', 'Bytes'],
},
'Response': {
'canGc': ['Error', 'Redirect', 'Clone', 'CreateFromJson', 'Text', 'Blob', 'FormData', 'Json', 'ArrayBuffer', 'Headers', 'Bytes'],
},
'RTCPeerConnection': {
'inRealms': ['AddIceCandidate', 'CreateAnswer', 'CreateOffer', 'SetLocalDescription', 'SetRemoteDescription'],
'canGc': ['Close', 'AddIceCandidate', 'CreateAnswer', 'CreateOffer', 'SetLocalDescription', 'SetRemoteDescription'],
'weakReferenceable': True,
},
'RTCRtpSender': {
'canGc': ['SetParameters'],
},
'RTCTrackEvent': {
'cx': ['Constructor'],
},
'Sanitizer': {
'cx': ['Constructor'],
},
'Selection': {
'canGc': ['Collapse', 'CollapseToEnd', 'CollapseToStart', 'Extend', 'SelectAllChildren', 'SetBaseAndExtent', 'SetPosition'],
'cx': ['DeleteFromDocument']
},
'ServiceWorker': {
'cx': ['PostMessage', 'PostMessage_'],
},
'ServiceWorkerContainer': {
'realm': ['Register'],
},
'ServoInternals': {
'inRealms': ['ReportMemory'],
'canGc': ['ReportMemory'],
'additionalTraits': ['crate::interfaces::ServoInternalsHelpers'],
},
'ServoTestUtils': {
'canGc': ['ForceLayout'],
},
'ShadowRoot': {
'canGc': ['AdoptedStyleSheets', 'SetAdoptedStyleSheets'],
'cx': ['GetHTML', 'GetInnerHTML', 'SetHTMLUnsafe', 'SetInnerHTML'],
},
'StaticRange': {
'weakReferenceable': True,
},
'StorageManager': {
'inRealms': ['Persisted', 'Persist', 'Estimate'],
'canGc': ['Persisted', 'Persist', 'Estimate'],
},
'StyleSheet': {
'cx': ['Media'],
},
'SubtleCrypto': {
'realm': ['Encrypt', 'Decrypt', 'Sign', 'Verify', 'GenerateKey', 'DeriveKey', 'DeriveBits', 'Digest', 'ImportKey', 'ExportKey', 'WrapKey', 'UnwrapKey', 'EncapsulateKey', 'EncapsulateBits', 'DecapsulateKey', 'DecapsulateBits', 'GetPublicKey'],
'cx': ['Supports', 'Supports_'],
},
'SVGElement': {
'canGc': ['Focus', 'SetAutofocus', 'SetTabIndex'],
'cx': ['Blur', 'Focus'],
},
#FIXME(jdm): This should be 'register': False, but then we don't generate enum types
'TestBinding': {
'inRealms': ['PromiseAttribute', 'PromiseNativeHandler'],
'canGc': ['InterfaceAttribute', 'GetInterfaceAttributeNullable', 'ReceiveInterface', 'ReceiveInterfaceSequence', 'ReceiveNullableInterface', 'PromiseAttribute', 'PromiseNativeHandler', 'PromiseResolveNative', 'PromiseRejectNative', 'PromiseRejectWithTypeError'],
'additionalTraits': ['crate::interfaces::TestBindingHelpers'],
'cx': ['Constructor', 'Constructor_', 'Constructor__'],
},
'TestWorklet': {
'cx': ['Constructor'],
'realm': ['AddModule'],
},
'Text': {
'cx': ['Constructor', 'SplitText'],
'cx_no_gc': ['WholeText']
},
'TextDecoderStream': {
'cx': ['Constructor'],
},
'TextEncoder': {
'canGc': ['Encode']
},
'TextEncoderStream': {
'cx': ['Constructor'],
},
'TransformStream': {
'cx': ['Constructor'],
},
'TreeWalker': {
'cx': ['ParentNode', 'PreviousNode', 'NextNode', 'FirstChild', 'LastChild', 'PreviousSibling', 'NextSibling']
},
'TrustedTypePolicy': {
'cx': ['CreateHTML', 'CreateScript', 'CreateScriptURL']
},
'TrustedTypePolicyFactory': {
'cx': ['CreatePolicy', 'EmptyHTML', 'EmptyScript']
},
'URL': {
'weakReferenceable': True,
'canGc': ['Parse', 'SearchParams'],
},
'WebGLRenderingContext': {
'canGc': ['MakeXRCompatible'],
'weakReferenceable': True,
},
'WebGL2RenderingContext': {
'canGc': ['MakeXRCompatible'],
'additionalTraits': ['crate::interfaces::WebGL2RenderingContextHelpers'],
},
'WebGLShader': {
'weakReferenceable': True,
},
'WebGLSync': {
'allowDropImpl': True,
},
'WebGLTexture': {
'allowDropImpl': True,
},
'WebGLTransformFeedback': {
'allowDropImpl': True,
},
'Window': {
'canGc': ['CookieStore', 'FetchLater', 'GetVisualViewport', 'ReportError', 'Screen', 'StructuredClone'],
'additionalTraits': ['crate::interfaces::WindowHelpers'],
'realm': ['CreateImageBitmap', 'CreateImageBitmap_', 'WebdriverCallback', 'GetOpener', 'Fetch'],
'cx': [
'Focus',
'GetLocalStorage',
'GetSessionStorage',
'Location',
'Open',
'PostMessage',
'PostMessage_',
'SetInterval',
'SetTimeout',
'Stop',
'TrustedTypes',
'WebdriverException'
]
},
'WindowProxy' : {
'path': 'crate::dom::windowproxy::WindowProxy',
'register': False,
},
'SharedWorker': {
'cx': ['Constructor'],
},
'SharedWorkerGlobalScope': {
},
'Worker': {
'cx': ['Constructor', 'PostMessage', 'PostMessage_'],
},
'WorkerGlobalScope': {
'cx': ['ImportScripts', 'SetInterval', 'SetTimeout', 'TrustedTypes'],
'canGc': ['ReportError', 'StructuredClone'],
'realm': ['CreateImageBitmap', 'CreateImageBitmap_', 'Fetch'],
},
'Worklet': {
'realm': ['AddModule'],
},
'XMLDocument': {
'canGc': ['NamedGetter'],
'cx': ['GetLocation'],
},
'XMLHttpRequest': {
'cx': ['Abort', 'Open', 'Open_', 'Send', 'GetResponseXML', 'Response'],
},
'XPathEvaluator': {
'canGc': ['CreateExpression', 'Evaluate'],
},
'XPathExpression': {
'canGc': ['Evaluate'],
},
'XRBoundedReferenceSpace': {
'canGc': ['BoundsGeometry'],
},
'XRFrame': {
'canGc': ['GetViewerPose', 'GetPose', 'GetJointPose'],
},
'XRHitTestResult': {
'canGc': ['GetPose'],
},
'XRRay': {
'canGc': ['Origin', 'Direction', 'Matrix'],
},
'XRReferenceSpace': {
'canGc': ['GetOffsetReferenceSpace'],
},
'XRRenderState': {
'canGc': ['Layers'],
},
'XRRigidTransform': {
'canGc': ['Position', 'Orientation', 'Inverse', 'Matrix'],
},
'XRSession': {
'inRealms': ['RequestReferenceSpace', 'UpdateRenderState', 'UpdateTargetFrameRate'],
'canGc': ['End', 'RequestReferenceSpace', 'UpdateTargetFrameRate', 'RequestHitTestSource', 'GetSupportedFrameRates', 'EnabledFeatures'],
},
'XRSystem': {
'inRealms': ['RequestSession'],
'canGc': ['RequestSession', 'IsSessionSupported'],
},
'XRTest': {
'canGc': ['SimulateDeviceConnection', 'DisconnectAllDevices', 'SimulateUserActivation'],
},
'XRView': {
'canGc': ['ProjectionMatrix'],
},
'ReadableStream': {
'canGc': ['GetReader', 'Tee'],
'realm': ['PipeTo', 'PipeThrough'],
'cx': ['Cancel']
},
"ReadableStreamDefaultController": {
"canGc": ["Close"],
"cx": ["Enqueue", "Error"]
},
"ReadableByteStreamController": {
"canGc": ["GetByobRequest", "Close"],
"cx": ["Enqueue", "Error"]
},
"ReadableStreamBYOBRequest": {
"canGc": ["Respond", "RespondWithNewView"]
},
"ReadableStreamBYOBReader": {
"canGc": ["ReleaseLock"],
"cx": ["Read", "Cancel"]
},
"ReadableStreamDefaultReader": {
"canGc": ["ReleaseLock"],
"cx": ["Read", "Cancel"]
},
'ResizeObserverEntry': {
'canGc': ['BorderBoxSize', 'ContentBoxSize', 'DevicePixelContentBoxSize'],
},
'WebSocket': {
'weakReferenceable': True,
},
'WritableStream': {
'canGc': ['Close', 'GetWriter'],
'cx': ['Constructor'],
'inRealms': ['GetWriter'],
'realm': ['Abort', 'Close']
},
'WritableStreamDefaultController': {
'realm': ['Error']
},
'WritableStreamDefaultWriter': {
'canGc': ['ReleaseLock'],
'realm': ['Abort', 'Close', 'Write'],
},
'TransformStreamDefaultController': {
'cx': ['Enqueue', 'Error', 'Terminate']
},
'WorkerNavigator': {
'canGc': ['Languages'],
'cx': ['Storage'],
},
}
Dictionaries = {
'AudioNodeOptions': {
'derives': ['Clone', 'Copy'],
},
'ChannelMergerOptions': {
'derives': ['Clone', 'Copy'],
},
'ConstantSourceOptions': {
'derives': ['Clone', 'Copy'],
},
'CSPViolationReportBody': {
'derives': ['Clone', 'MallocSizeOf'],
},
'EventListenerOptions': {
'derives': ['Clone', 'MallocSizeOf'],
},
'FocusOptions': {
'derives': ['Clone', 'Copy', 'MallocSizeOf']
},
'FontFaceDescriptors': {
'derives': ['Clone', 'MallocSizeOf']
},
'GainOptions': {
'derives': ['Clone', 'Copy'],
},
'GPUCanvasConfiguration': {
'derives': ['Clone']
},
'GPUExtent3DDict': {
'derives': ["MallocSizeOf"],
},
'GPUObjectDescriptorBase': {
'derives': ['MallocSizeOf']
},
'GPUTextureDescriptor': {
'derives': ["MallocSizeOf"],
},
'HeadersInit': {
'derives': ["Clone"],
},
'IIRFilterOptions': {
'derives': ['Clone'],
},
'RecommendedBreakpointLocation': {
'derives': ['Debug'],
},
'PauseFrameResult': {
'derives': ['Debug'],
},
'Report': {
'derives': ['Clone', 'MallocSizeOf'],
},
'ReportBody': {
'derives': ['Clone', 'MallocSizeOf'],
},
'SanitizerAttributeNamespace': {
'derives': ['Clone', 'MallocSizeOf', 'PartialEq']
},
'SanitizerConfig': {
'derives': ['Clone', 'MallocSizeOf']
},
'SanitizerElementNamespace': {
'derives': ['Clone', 'MallocSizeOf', 'PartialEq'],
},
'SanitizerElementNamespaceWithAttributes': {
'derives': ['Clone', 'MallocSizeOf', 'PartialEq'],
},
'ScrollOptions': {
'derives': ['Clone'],
},
'ScrollToOptions': {
'derives': ['Clone'],
},
'StereoPannerOptions': {
'derives': ['Clone', 'Copy'],
},
'URLPatternInit': {
'derives': ['Clone'],
},
'XRWebGLLayerInit': {
'derives': ['Clone', 'Copy'],
},
}
Enums = {
'GPUFeatureName': {
'derives': ['Eq', 'Hash', ]
},
'PermissionName': {
'derives': ['Eq', 'Hash']
}
}
Unions = {
'ByteStringSequenceSequenceOrByteStringByteStringRecord': {
'derives': ['Clone']
},
'ElementOrDocument': {
'derives': ['Clone', 'MallocSizeOf', 'PartialEq']
},
'HTMLCanvasElementOrOffscreenCanvas': {
'derives': ['Clone', 'MallocSizeOf']
},
'StringOrSanitizerAttributeNamespace': {
'derives': ['Clone', 'MallocSizeOf', 'PartialEq'],
},
'StringOrSanitizerElementNamespace': {
'derives': ['Clone', 'MallocSizeOf', 'PartialEq'],
},
'StringOrSanitizerElementNamespaceWithAttributes': {
'derives': ['Clone', 'MallocSizeOf', 'PartialEq'],
},
'RangeEnforcedUnsignedLongSequenceOrGPUExtent3DDict': {
'derives': ['MallocSizeOf']
},
'StringOrUnsignedLong': {
'derives': ['Clone'],
},
}