From a657d4b7288657c7e1995d3d522fa6de6ed605ee Mon Sep 17 00:00:00 2001 From: daxpedda Date: Wed, 19 Jun 2024 18:23:17 +0200 Subject: [PATCH] Deprecate builder-pattern setters for WebIDL dictionaries --- CHANGELOG.md | 3 + .../features/gen_AddEventListenerOptions.rs | 27 +- .../web-sys/src/features/gen_AesCbcParams.rs | 18 +- .../web-sys/src/features/gen_AesCtrParams.rs | 27 +- .../src/features/gen_AesDerivedKeyParams.rs | 18 +- .../web-sys/src/features/gen_AesGcmParams.rs | 36 +- .../src/features/gen_AesKeyAlgorithm.rs | 18 +- .../src/features/gen_AesKeyGenParams.rs | 18 +- crates/web-sys/src/features/gen_Algorithm.rs | 9 +- .../features/gen_AllowedBluetoothDevice.rs | 48 +- .../src/features/gen_AllowedUsbDevice.rs | 48 +- .../src/features/gen_AnalyserOptions.rs | 63 +-- .../src/features/gen_AnimationEventInit.rs | 54 ++- .../gen_AnimationPlaybackEventInit.rs | 45 +- .../features/gen_AnimationPropertyDetails.rs | 36 +- .../gen_AnimationPropertyValueDetails.rs | 36 +- .../src/features/gen_AssignedNodesOptions.rs | 9 +- .../src/features/gen_AttributeNameValue.rs | 18 +- .../src/features/gen_AudioBufferOptions.rs | 27 +- .../features/gen_AudioBufferSourceOptions.rs | 54 ++- .../src/features/gen_AudioConfiguration.rs | 36 +- .../src/features/gen_AudioContextOptions.rs | 34 +- .../features/gen_AudioDataCopyToOptions.rs | 64 +-- .../web-sys/src/features/gen_AudioDataInit.rs | 96 ++-- .../src/features/gen_AudioDecoderConfig.rs | 64 +-- .../src/features/gen_AudioDecoderInit.rs | 32 +- .../src/features/gen_AudioDecoderSupport.rs | 32 +- .../src/features/gen_AudioEncoderConfig.rs | 64 +-- .../src/features/gen_AudioEncoderInit.rs | 32 +- .../src/features/gen_AudioEncoderSupport.rs | 32 +- .../src/features/gen_AudioNodeOptions.rs | 27 +- .../src/features/gen_AudioSinkOptions.rs | 16 +- .../features/gen_AudioWorkletNodeOptions.rs | 63 +-- ...en_AuthenticationExtensionsClientInputs.rs | 9 +- ...n_AuthenticationExtensionsClientOutputs.rs | 9 +- .../gen_AuthenticatorSelectionCriteria.rs | 27 +- .../src/features/gen_AutocompleteInfo.rs | 36 +- .../src/features/gen_BaseComputedKeyframe.rs | 45 +- .../web-sys/src/features/gen_BaseKeyframe.rs | 36 +- .../gen_BasePropertyIndexedKeyframe.rs | 27 +- .../src/features/gen_BasicCardRequest.rs | 18 +- .../src/features/gen_BasicCardResponse.rs | 54 ++- .../src/features/gen_BiquadFilterOptions.rs | 72 +-- .../web-sys/src/features/gen_BlobEventInit.rs | 36 +- .../src/features/gen_BlobPropertyBag.rs | 18 +- .../src/features/gen_BlockParsingOptions.rs | 9 +- .../gen_BluetoothAdvertisingEventInit.rs | 176 ++++--- .../features/gen_BluetoothDataFilterInit.rs | 32 +- .../features/gen_BluetoothLeScanFilterInit.rs | 80 ++-- .../gen_BluetoothPermissionDescriptor.rs | 83 ++-- .../gen_BluetoothPermissionStorage.rs | 16 +- .../src/features/gen_BoxQuadOptions.rs | 18 +- .../gen_BrowserElementDownloadOptions.rs | 18 +- .../gen_BrowserElementExecuteScriptOptions.rs | 18 +- .../src/features/gen_CacheBatchOperation.rs | 36 +- .../src/features/gen_CacheQueryOptions.rs | 36 +- .../gen_CaretStateChangedEventInit.rs | 102 ++-- .../src/features/gen_ChannelMergerOptions.rs | 36 +- .../features/gen_ChannelSplitterOptions.rs | 36 +- .../src/features/gen_CheckerboardReport.rs | 36 +- .../src/features/gen_ChromeFilePropertyBag.rs | 36 +- .../src/features/gen_ClientQueryOptions.rs | 18 +- .../src/features/gen_ClientRectsAndTexts.rs | 18 +- .../src/features/gen_ClipboardEventInit.rs | 36 +- .../src/features/gen_ClipboardItemOptions.rs | 16 +- .../gen_ClipboardPermissionDescriptor.rs | 32 +- .../src/features/gen_CloseEventInit.rs | 54 ++- .../src/features/gen_CollectedClientData.rs | 54 ++- .../src/features/gen_CompositionEventInit.rs | 54 ++- .../src/features/gen_ComputedEffectTiming.rs | 117 +++-- .../src/features/gen_ConnStatusDict.rs | 9 +- .../src/features/gen_ConsoleCounter.rs | 18 +- .../src/features/gen_ConsoleCounterError.rs | 18 +- .../web-sys/src/features/gen_ConsoleEvent.rs | 153 +++--- .../features/gen_ConsoleInstanceOptions.rs | 54 ++- .../src/features/gen_ConsoleProfileEvent.rs | 18 +- .../src/features/gen_ConsoleStackEntry.rs | 45 +- .../src/features/gen_ConsoleTimerError.rs | 18 +- .../src/features/gen_ConsoleTimerLogOrEnd.rs | 18 +- .../src/features/gen_ConsoleTimerStart.rs | 9 +- .../src/features/gen_ConstantSourceOptions.rs | 9 +- .../gen_ConstrainBooleanParameters.rs | 18 +- .../gen_ConstrainDomStringParameters.rs | 18 +- .../src/features/gen_ConstrainDoubleRange.rs | 36 +- .../src/features/gen_ConstrainLongRange.rs | 36 +- .../src/features/gen_ContextAttributes2d.rs | 18 +- .../features/gen_ConvertCoordinateOptions.rs | 18 +- .../src/features/gen_ConvolverOptions.rs | 45 +- .../features/gen_CredentialCreationOptions.rs | 21 +- .../features/gen_CredentialRequestOptions.rs | 18 +- .../web-sys/src/features/gen_CryptoKeyPair.rs | 18 +- .../src/features/gen_CustomEventInit.rs | 36 +- .../web-sys/src/features/gen_DateTimeValue.rs | 45 +- .../features/gen_DecoderDoctorNotification.rs | 63 +-- .../web-sys/src/features/gen_DelayOptions.rs | 45 +- .../features/gen_DeviceAccelerationInit.rs | 27 +- .../src/features/gen_DeviceLightEventInit.rs | 36 +- .../src/features/gen_DeviceMotionEventInit.rs | 63 +-- .../gen_DeviceOrientationEventInit.rs | 63 +-- .../features/gen_DeviceProximityEventInit.rs | 54 ++- .../features/gen_DeviceRotationRateInit.rs | 27 +- .../src/features/gen_DhKeyDeriveParams.rs | 18 +- .../features/gen_DirectoryPickerOptions.rs | 48 +- .../gen_DisplayMediaStreamConstraints.rs | 18 +- .../src/features/gen_DisplayNameOptions.rs | 18 +- .../src/features/gen_DisplayNameResult.rs | 18 +- .../web-sys/src/features/gen_DnsCacheDict.rs | 9 +- .../web-sys/src/features/gen_DnsCacheEntry.rs | 45 +- .../web-sys/src/features/gen_DnsLookupDict.rs | 27 +- .../features/gen_DocumentTimelineOptions.rs | 9 +- .../src/features/gen_DomMatrix2dInit.rs | 108 +++-- .../web-sys/src/features/gen_DomMatrixInit.rs | 207 ++++---- .../web-sys/src/features/gen_DomPointInit.rs | 36 +- .../web-sys/src/features/gen_DomQuadInit.rs | 36 +- .../web-sys/src/features/gen_DomQuadJson.rs | 36 +- .../web-sys/src/features/gen_DomRectInit.rs | 36 +- .../gen_DomWindowResizeEventDetail.rs | 18 +- .../web-sys/src/features/gen_DoubleRange.rs | 32 +- .../web-sys/src/features/gen_DragEventInit.rs | 252 +++++----- .../features/gen_DynamicsCompressorOptions.rs | 72 +-- .../src/features/gen_EcKeyAlgorithm.rs | 18 +- .../src/features/gen_EcKeyGenParams.rs | 18 +- .../src/features/gen_EcKeyImportParams.rs | 18 +- .../src/features/gen_EcdhKeyDeriveParams.rs | 18 +- .../web-sys/src/features/gen_EcdsaParams.rs | 18 +- .../web-sys/src/features/gen_EffectTiming.rs | 72 +-- .../features/gen_ElementCreationOptions.rs | 18 +- .../features/gen_ElementDefinitionOptions.rs | 9 +- .../src/features/gen_EncodedAudioChunkInit.rs | 64 +-- .../features/gen_EncodedAudioChunkMetadata.rs | 16 +- .../src/features/gen_EncodedVideoChunkInit.rs | 64 +-- .../features/gen_EncodedVideoChunkMetadata.rs | 48 +- .../web-sys/src/features/gen_ErrorCallback.rs | 9 +- .../src/features/gen_ErrorEventInit.rs | 72 +-- crates/web-sys/src/features/gen_EventInit.rs | 27 +- .../web-sys/src/features/gen_EventListener.rs | 9 +- .../src/features/gen_EventListenerOptions.rs | 9 +- .../src/features/gen_EventModifierInit.rs | 162 ++++--- .../src/features/gen_EventSourceInit.rs | 9 +- .../src/features/gen_ExtendableEventInit.rs | 27 +- .../gen_ExtendableMessageEventInit.rs | 72 +-- .../src/features/gen_FakePluginMimeEntry.rs | 27 +- .../src/features/gen_FakePluginTagInit.rs | 81 ++-- .../src/features/gen_FetchEventInit.rs | 54 ++- .../gen_FetchReadableStreamReadDataDone.rs | 9 +- .../web-sys/src/features/gen_FileCallback.rs | 9 +- .../src/features/gen_FilePickerAcceptType.rs | 16 +- .../src/features/gen_FilePickerOptions.rs | 64 +-- .../src/features/gen_FilePropertyBag.rs | 18 +- .../gen_FileSystemCreateWritableOptions.rs | 9 +- .../features/gen_FileSystemEntriesCallback.rs | 9 +- .../features/gen_FileSystemEntryCallback.rs | 9 +- .../src/features/gen_FileSystemFlags.rs | 18 +- .../gen_FileSystemGetDirectoryOptions.rs | 9 +- .../features/gen_FileSystemGetFileOptions.rs | 9 +- ...en_FileSystemHandlePermissionDescriptor.rs | 16 +- .../gen_FileSystemPermissionDescriptor.rs | 48 +- .../gen_FileSystemReadWriteOptions.rs | 9 +- .../features/gen_FileSystemRemoveOptions.rs | 9 +- .../src/features/gen_FocusEventInit.rs | 54 ++- .../src/features/gen_FontFaceDescriptors.rs | 72 +-- .../features/gen_FontFaceSetIteratorResult.rs | 18 +- .../features/gen_FontFaceSetLoadEventInit.rs | 36 +- .../web-sys/src/features/gen_GainOptions.rs | 36 +- .../features/gen_GamepadAxisMoveEventInit.rs | 54 ++- .../features/gen_GamepadButtonEventInit.rs | 45 +- .../src/features/gen_GamepadEventInit.rs | 36 +- .../src/features/gen_GetAnimationsOptions.rs | 16 +- .../src/features/gen_GetRootNodeOptions.rs | 9 +- .../features/gen_GpuBindGroupDescriptor.rs | 48 +- .../src/features/gen_GpuBindGroupEntry.rs | 32 +- .../gen_GpuBindGroupLayoutDescriptor.rs | 32 +- .../features/gen_GpuBindGroupLayoutEntry.rs | 118 +++-- .../src/features/gen_GpuBlendComponent.rs | 48 +- .../web-sys/src/features/gen_GpuBlendState.rs | 32 +- .../src/features/gen_GpuBufferBinding.rs | 48 +- .../features/gen_GpuBufferBindingLayout.rs | 48 +- .../src/features/gen_GpuBufferDescriptor.rs | 64 +-- .../features/gen_GpuCanvasConfiguration.rs | 80 ++-- .../web-sys/src/features/gen_GpuColorDict.rs | 64 +-- .../src/features/gen_GpuColorTargetState.rs | 48 +- .../gen_GpuCommandBufferDescriptor.rs | 16 +- .../gen_GpuCommandEncoderDescriptor.rs | 16 +- .../features/gen_GpuComputePassDescriptor.rs | 35 +- .../gen_GpuComputePassTimestampWrites.rs | 48 +- .../gen_GpuComputePipelineDescriptor.rs | 48 +- .../src/features/gen_GpuDepthStencilState.rs | 160 ++++--- .../src/features/gen_GpuDeviceDescriptor.rs | 48 +- .../src/features/gen_GpuExtent3dDict.rs | 48 +- .../gen_GpuExternalTextureDescriptor.rs | 32 +- .../src/features/gen_GpuFragmentState.rs | 48 +- .../src/features/gen_GpuImageCopyBuffer.rs | 64 +-- .../features/gen_GpuImageCopyExternalImage.rs | 48 +- .../src/features/gen_GpuImageCopyTexture.rs | 64 +-- .../features/gen_GpuImageCopyTextureTagged.rs | 80 ++-- .../src/features/gen_GpuImageDataLayout.rs | 48 +- .../src/features/gen_GpuMultisampleState.rs | 48 +- .../features/gen_GpuObjectDescriptorBase.rs | 16 +- .../src/features/gen_GpuOrigin2dDict.rs | 32 +- .../src/features/gen_GpuOrigin3dDict.rs | 48 +- .../features/gen_GpuPipelineDescriptorBase.rs | 32 +- .../src/features/gen_GpuPipelineErrorInit.rs | 16 +- .../gen_GpuPipelineLayoutDescriptor.rs | 35 +- .../src/features/gen_GpuPrimitiveState.rs | 80 ++-- .../src/features/gen_GpuProgrammableStage.rs | 32 +- .../src/features/gen_GpuQuerySetDescriptor.rs | 48 +- .../src/features/gen_GpuQueueDescriptor.rs | 16 +- .../features/gen_GpuRenderBundleDescriptor.rs | 16 +- .../gen_GpuRenderBundleEncoderDescriptor.rs | 99 ++-- .../gen_GpuRenderPassColorAttachment.rs | 96 ++-- ...gen_GpuRenderPassDepthStencilAttachment.rs | 144 +++--- .../features/gen_GpuRenderPassDescriptor.rs | 96 ++-- .../src/features/gen_GpuRenderPassLayout.rs | 64 +-- .../gen_GpuRenderPassTimestampWrites.rs | 48 +- .../gen_GpuRenderPipelineDescriptor.rs | 112 +++-- .../features/gen_GpuRequestAdapterOptions.rs | 32 +- .../features/gen_GpuSamplerBindingLayout.rs | 16 +- .../src/features/gen_GpuSamplerDescriptor.rs | 176 ++++--- .../gen_GpuShaderModuleCompilationHint.rs | 32 +- .../features/gen_GpuShaderModuleDescriptor.rs | 64 +-- .../src/features/gen_GpuStencilFaceState.rs | 64 +-- .../gen_GpuStorageTextureBindingLayout.rs | 48 +- .../features/gen_GpuTextureBindingLayout.rs | 48 +- .../src/features/gen_GpuTextureDescriptor.rs | 128 ++--- .../features/gen_GpuTextureViewDescriptor.rs | 128 ++--- .../gen_GpuUncapturedErrorEventInit.rs | 64 +-- .../src/features/gen_GpuVertexAttribute.rs | 48 +- .../src/features/gen_GpuVertexBufferLayout.rs | 48 +- .../src/features/gen_GpuVertexState.rs | 48 +- .../features/gen_GroupedHistoryEventInit.rs | 36 +- .../src/features/gen_HalfOpenInfoDict.rs | 9 +- .../src/features/gen_HashChangeEventInit.rs | 45 +- .../src/features/gen_HidCollectionInfo.rs | 112 +++-- .../features/gen_HidConnectionEventInit.rs | 64 +-- .../src/features/gen_HidDeviceFilter.rs | 64 +-- .../features/gen_HidDeviceRequestOptions.rs | 16 +- .../features/gen_HidInputReportEventInit.rs | 96 ++-- .../web-sys/src/features/gen_HidReportInfo.rs | 32 +- .../web-sys/src/features/gen_HidReportItem.rs | 448 ++++++++++-------- .../src/features/gen_HiddenPluginEventInit.rs | 27 +- .../src/features/gen_HitRegionOptions.rs | 27 +- crates/web-sys/src/features/gen_HkdfParams.rs | 36 +- .../src/features/gen_HmacDerivedKeyParams.rs | 27 +- .../src/features/gen_HmacImportParams.rs | 18 +- .../src/features/gen_HmacKeyAlgorithm.rs | 27 +- .../src/features/gen_HmacKeyGenParams.rs | 27 +- .../web-sys/src/features/gen_HttpConnDict.rs | 9 +- .../web-sys/src/features/gen_HttpConnInfo.rs | 27 +- .../src/features/gen_HttpConnectionElement.rs | 63 +-- .../features/gen_IdbFileMetadataParameters.rs | 18 +- .../src/features/gen_IdbIndexParameters.rs | 27 +- .../features/gen_IdbObjectStoreParameters.rs | 18 +- .../src/features/gen_IdbOpenDbOptions.rs | 18 +- .../features/gen_IdbVersionChangeEventInit.rs | 45 +- .../src/features/gen_IdleRequestOptions.rs | 9 +- .../src/features/gen_IirFilterOptions.rs | 45 +- .../src/features/gen_ImageBitmapOptions.rs | 54 ++- .../gen_ImageCaptureErrorEventInit.rs | 39 +- .../src/features/gen_ImageDecodeOptions.rs | 32 +- .../src/features/gen_ImageDecodeResult.rs | 32 +- .../src/features/gen_ImageDecoderInit.rs | 112 +++-- .../src/features/gen_ImageEncodeOptions.rs | 18 +- .../src/features/gen_InputEventInit.rs | 90 ++-- .../gen_IntersectionObserverEntryInit.rs | 45 +- .../features/gen_IntersectionObserverInit.rs | 27 +- .../src/features/gen_IsInputPendingOptions.rs | 16 +- .../features/gen_IterableKeyAndValueResult.rs | 18 +- .../features/gen_IterableKeyOrValueResult.rs | 18 +- crates/web-sys/src/features/gen_JsonWebKey.rs | 162 ++++--- .../web-sys/src/features/gen_KeyAlgorithm.rs | 9 +- .../src/features/gen_KeyIdsInitData.rs | 9 +- .../src/features/gen_KeyboardEventInit.rs | 234 +++++---- .../features/gen_KeyframeAnimationOptions.rs | 195 ++++---- .../src/features/gen_KeyframeEffectOptions.rs | 90 ++-- .../web-sys/src/features/gen_L10nElement.rs | 54 ++- crates/web-sys/src/features/gen_L10nValue.rs | 18 +- .../src/features/gen_LifecycleCallbacks.rs | 36 +- crates/web-sys/src/features/gen_LocaleInfo.rs | 18 +- crates/web-sys/src/features/gen_LockInfo.rs | 48 +- .../src/features/gen_LockManagerSnapshot.rs | 32 +- .../web-sys/src/features/gen_LockOptions.rs | 64 +-- .../src/features/gen_MediaConfiguration.rs | 18 +- .../gen_MediaDecodingConfiguration.rs | 27 +- .../gen_MediaElementAudioSourceOptions.rs | 9 +- .../gen_MediaEncodingConfiguration.rs | 27 +- crates/web-sys/src/features/gen_MediaImage.rs | 48 +- .../features/gen_MediaKeyMessageEventInit.rs | 45 +- .../features/gen_MediaKeyNeededEventInit.rs | 45 +- .../gen_MediaKeySystemConfiguration.rs | 72 +-- .../gen_MediaKeySystemMediaCapability.rs | 18 +- .../src/features/gen_MediaKeysPolicy.rs | 9 +- .../src/features/gen_MediaMetadataInit.rs | 64 +-- .../src/features/gen_MediaPositionState.rs | 48 +- .../features/gen_MediaQueryListEventInit.rs | 45 +- .../gen_MediaRecorderErrorEventInit.rs | 36 +- .../src/features/gen_MediaRecorderOptions.rs | 36 +- .../features/gen_MediaSessionActionDetails.rs | 64 +-- .../gen_MediaStreamAudioSourceOptions.rs | 9 +- .../features/gen_MediaStreamConstraints.rs | 45 +- .../src/features/gen_MediaStreamEventInit.rs | 36 +- .../features/gen_MediaStreamTrackEventInit.rs | 36 +- .../gen_MediaStreamTrackGeneratorInit.rs | 16 +- .../gen_MediaStreamTrackProcessorInit.rs | 32 +- .../features/gen_MediaTrackCapabilities.rs | 240 ++++++---- .../features/gen_MediaTrackConstraintSet.rs | 144 +++--- .../src/features/gen_MediaTrackConstraints.rs | 153 +++--- .../src/features/gen_MediaTrackSettings.rs | 81 ++-- .../gen_MediaTrackSupportedConstraints.rs | 135 +++--- .../src/features/gen_MemoryAttribution.rs | 48 +- .../gen_MemoryAttributionContainer.rs | 32 +- .../src/features/gen_MemoryBreakdownEntry.rs | 48 +- .../src/features/gen_MemoryMeasurement.rs | 32 +- .../src/features/gen_MessageEventInit.rs | 72 +-- .../features/gen_MidiConnectionEventInit.rs | 36 +- .../src/features/gen_MidiMessageEventInit.rs | 27 +- .../web-sys/src/features/gen_MidiOptions.rs | 18 +- .../src/features/gen_MouseEventInit.rs | 243 +++++----- .../src/features/gen_MutationObserverInit.rs | 81 ++-- .../src/features/gen_MutationObservingInfo.rs | 90 ++-- .../features/gen_NativeOsFileReadOptions.rs | 18 +- .../gen_NativeOsFileWriteAtomicOptions.rs | 45 +- .../src/features/gen_NetworkCommandOptions.rs | 387 ++++++++------- .../src/features/gen_NetworkResultOptions.rs | 315 ++++++------ crates/web-sys/src/features/gen_NodeFilter.rs | 9 +- .../src/features/gen_NotificationAction.rs | 27 +- .../src/features/gen_NotificationEventInit.rs | 36 +- .../src/features/gen_NotificationOptions.rs | 117 +++-- .../src/features/gen_ObserverCallback.rs | 9 +- .../gen_OfflineAudioCompletionEventInit.rs | 36 +- .../gen_OfflineAudioContextOptions.rs | 27 +- .../src/features/gen_OpenFilePickerOptions.rs | 80 ++-- .../src/features/gen_OpenWindowEventDetail.rs | 36 +- .../src/features/gen_OptionalEffectTiming.rs | 72 +-- .../src/features/gen_OscillatorOptions.rs | 63 +-- .../features/gen_PageTransitionEventInit.rs | 45 +- .../web-sys/src/features/gen_PannerOptions.rs | 153 +++--- .../gen_PaymentMethodChangeEventInit.rs | 45 +- .../gen_PaymentRequestUpdateEventInit.rs | 27 +- .../web-sys/src/features/gen_Pbkdf2Params.rs | 36 +- .../features/gen_PerformanceEntryEventInit.rs | 81 ++-- .../gen_PerformanceEntryFilterOptions.rs | 27 +- .../features/gen_PerformanceObserverInit.rs | 18 +- .../features/gen_PeriodicWaveConstraints.rs | 9 +- .../src/features/gen_PeriodicWaveOptions.rs | 27 +- .../src/features/gen_PermissionDescriptor.rs | 9 +- .../web-sys/src/features/gen_PlaneLayout.rs | 32 +- .../features/gen_PluginCrashedEventInit.rs | 90 ++-- .../src/features/gen_PointerEventInit.rs | 342 +++++++------ .../src/features/gen_PopStateEventInit.rs | 36 +- .../src/features/gen_PopupBlockedEventInit.rs | 54 ++- .../src/features/gen_PositionOptions.rs | 27 +- ...resentationConnectionAvailableEventInit.rs | 36 +- ...en_PresentationConnectionCloseEventInit.rs | 45 +- .../features/gen_ProfileTimelineLayerRect.rs | 36 +- .../src/features/gen_ProfileTimelineMarker.rs | 138 +++--- .../features/gen_ProfileTimelineStackFrame.rs | 63 +-- .../src/features/gen_ProgressEventInit.rs | 54 ++- .../features/gen_PromiseRejectionEventInit.rs | 45 +- .../gen_PublicKeyCredentialCreationOptions.rs | 81 ++-- .../gen_PublicKeyCredentialDescriptor.rs | 27 +- .../features/gen_PublicKeyCredentialEntity.rs | 18 +- .../gen_PublicKeyCredentialParameters.rs | 18 +- .../gen_PublicKeyCredentialRequestOptions.rs | 54 ++- .../gen_PublicKeyCredentialRpEntity.rs | 27 +- .../gen_PublicKeyCredentialUserEntity.rs | 36 +- .../web-sys/src/features/gen_PushEventInit.rs | 36 +- .../src/features/gen_PushSubscriptionInit.rs | 45 +- .../src/features/gen_PushSubscriptionJson.rs | 18 +- .../src/features/gen_PushSubscriptionKeys.rs | 18 +- .../gen_PushSubscriptionOptionsInit.rs | 18 +- .../web-sys/src/features/gen_QueryOptions.rs | 16 +- .../src/features/gen_QueuingStrategy.rs | 18 +- .../src/features/gen_QueuingStrategyInit.rs | 9 +- .../web-sys/src/features/gen_RcwnPerfStats.rs | 27 +- crates/web-sys/src/features/gen_RcwnStatus.rs | 54 ++- .../gen_ReadableStreamGetReaderOptions.rs | 9 +- .../gen_ReadableStreamIteratorOptions.rs | 9 +- .../features/gen_ReadableStreamReadResult.rs | 18 +- .../src/features/gen_ReadableWritablePair.rs | 18 +- .../src/features/gen_RegisterRequest.rs | 18 +- .../src/features/gen_RegisterResponse.rs | 45 +- .../web-sys/src/features/gen_RegisteredKey.rs | 36 +- .../src/features/gen_RegistrationOptions.rs | 27 +- .../src/features/gen_RequestDeviceOptions.rs | 48 +- .../web-sys/src/features/gen_RequestInit.rs | 108 +++-- ...RequestMediaKeySystemAccessNotification.rs | 18 +- .../src/features/gen_ResizeObserverOptions.rs | 9 +- .../web-sys/src/features/gen_ResponseInit.rs | 27 +- .../src/features/gen_RsaHashedImportParams.rs | 9 +- .../web-sys/src/features/gen_RsaOaepParams.rs | 18 +- .../src/features/gen_RsaOtherPrimesInfo.rs | 27 +- .../web-sys/src/features/gen_RsaPssParams.rs | 18 +- .../features/gen_RtcCertificateExpiration.rs | 9 +- .../web-sys/src/features/gen_RtcCodecStats.rs | 72 +-- .../src/features/gen_RtcConfiguration.rs | 45 +- .../features/gen_RtcDataChannelEventInit.rs | 36 +- .../src/features/gen_RtcDataChannelInit.rs | 63 +-- .../src/features/gen_RtcFecParameters.rs | 9 +- .../src/features/gen_RtcIceCandidateInit.rs | 27 +- .../features/gen_RtcIceCandidatePairStats.rs | 153 +++--- .../src/features/gen_RtcIceCandidateStats.rs | 81 ++-- .../src/features/gen_RtcIceComponentStats.rs | 72 +-- .../web-sys/src/features/gen_RtcIceServer.rs | 45 +- .../src/features/gen_RtcIdentityAssertion.rs | 18 +- .../gen_RtcIdentityAssertionResult.rs | 18 +- .../src/features/gen_RtcIdentityProvider.rs | 18 +- .../gen_RtcIdentityProviderDetails.rs | 18 +- .../gen_RtcIdentityProviderOptions.rs | 27 +- .../gen_RtcIdentityValidationResult.rs | 18 +- .../features/gen_RtcInboundRtpStreamStats.rs | 216 +++++---- .../src/features/gen_RtcMediaStreamStats.rs | 45 +- .../features/gen_RtcMediaStreamTrackStats.rs | 153 +++--- .../src/features/gen_RtcOfferOptions.rs | 27 +- .../features/gen_RtcOutboundRtpStreamStats.rs | 198 ++++---- .../gen_RtcPeerConnectionIceEventInit.rs | 36 +- .../src/features/gen_RtcRtcpParameters.rs | 18 +- .../src/features/gen_RtcRtpCapabilities.rs | 18 +- .../src/features/gen_RtcRtpCodecCapability.rs | 36 +- .../src/features/gen_RtcRtpCodecParameters.rs | 45 +- .../features/gen_RtcRtpContributingSource.rs | 27 +- .../features/gen_RtcRtpEncodingParameters.rs | 100 ++-- .../gen_RtcRtpHeaderExtensionCapability.rs | 9 +- .../gen_RtcRtpHeaderExtensionParameters.rs | 27 +- .../src/features/gen_RtcRtpParameters.rs | 36 +- .../src/features/gen_RtcRtpSourceEntry.rs | 45 +- .../gen_RtcRtpSynchronizationSource.rs | 36 +- .../src/features/gen_RtcRtpTransceiverInit.rs | 27 +- .../src/features/gen_RtcRtxParameters.rs | 9 +- .../features/gen_RtcSessionDescriptionInit.rs | 18 +- crates/web-sys/src/features/gen_RtcStats.rs | 27 +- .../features/gen_RtcStatsReportInternal.rs | 201 ++++---- .../src/features/gen_RtcTrackEventInit.rs | 63 +-- .../src/features/gen_RtcTransportStats.rs | 45 +- .../gen_RtcdtmfToneChangeEventInit.rs | 36 +- .../gen_RtcrtpContributingSourceStats.rs | 45 +- .../src/features/gen_RtcrtpStreamStats.rs | 153 +++--- .../src/features/gen_SaveFilePickerOptions.rs | 80 ++-- .../features/gen_SchedulerPostTaskOptions.rs | 48 +- .../src/features/gen_ScrollIntoViewOptions.rs | 27 +- .../web-sys/src/features/gen_ScrollOptions.rs | 9 +- .../src/features/gen_ScrollToOptions.rs | 27 +- .../features/gen_ScrollViewChangeEventInit.rs | 36 +- .../gen_SecurityPolicyViolationEventInit.rs | 135 +++--- .../src/features/gen_SerialInputSignals.rs | 64 +-- .../web-sys/src/features/gen_SerialOptions.rs | 96 ++-- .../src/features/gen_SerialOutputSignals.rs | 48 +- .../src/features/gen_SerialPortFilter.rs | 32 +- .../src/features/gen_SerialPortInfo.rs | 32 +- .../features/gen_SerialPortRequestOptions.rs | 16 +- .../src/features/gen_ServerSocketOptions.rs | 9 +- .../src/features/gen_ShadowRootInit.rs | 9 +- crates/web-sys/src/features/gen_ShareData.rs | 36 +- .../web-sys/src/features/gen_SignResponse.rs | 45 +- .../web-sys/src/features/gen_SocketElement.rs | 54 ++- .../web-sys/src/features/gen_SocketOptions.rs | 18 +- .../web-sys/src/features/gen_SocketsDict.rs | 27 +- .../gen_SpeechRecognitionErrorInit.rs | 45 +- .../gen_SpeechRecognitionEventInit.rs | 66 +-- .../gen_SpeechSynthesisErrorEventInit.rs | 81 ++-- .../features/gen_SpeechSynthesisEventInit.rs | 72 +-- .../src/features/gen_StereoPannerOptions.rs | 36 +- .../src/features/gen_StorageEstimate.rs | 18 +- .../src/features/gen_StorageEventInit.rs | 72 +-- .../src/features/gen_StreamPipeOptions.rs | 36 +- .../features/gen_StyleRuleChangeEventInit.rs | 45 +- ...tyleSheetApplicableStateChangeEventInit.rs | 48 +- .../features/gen_StyleSheetChangeEventInit.rs | 45 +- .../src/features/gen_SubmitEventInit.rs | 36 +- .../src/features/gen_SvcOutputMetadata.rs | 16 +- .../src/features/gen_SvgBoundingBoxOptions.rs | 36 +- .../src/features/gen_TaskControllerInit.rs | 16 +- .../gen_TaskPriorityChangeEventInit.rs | 64 +-- .../src/features/gen_TaskSignalAnyInit.rs | 16 +- .../features/gen_TcpServerSocketEventInit.rs | 36 +- .../features/gen_TcpSocketErrorEventInit.rs | 45 +- .../src/features/gen_TcpSocketEventInit.rs | 36 +- .../src/features/gen_TextDecodeOptions.rs | 9 +- .../src/features/gen_TextDecoderOptions.rs | 9 +- .../src/features/gen_TouchEventInit.rs | 189 ++++---- crates/web-sys/src/features/gen_TouchInit.rs | 108 +++-- .../src/features/gen_TrackEventInit.rs | 36 +- .../web-sys/src/features/gen_Transformer.rs | 45 +- .../src/features/gen_TransitionEventInit.rs | 54 ++- .../web-sys/src/features/gen_TreeCellInfo.rs | 18 +- .../web-sys/src/features/gen_U2fClientData.rs | 27 +- crates/web-sys/src/features/gen_ULongRange.rs | 32 +- .../src/features/gen_UdpMessageEventInit.rs | 54 ++- crates/web-sys/src/features/gen_UdpOptions.rs | 54 ++- .../web-sys/src/features/gen_UiEventInit.rs | 45 +- .../src/features/gen_UnderlyingSink.rs | 45 +- .../src/features/gen_UnderlyingSource.rs | 45 +- .../features/gen_UsbConnectionEventInit.rs | 64 +-- .../gen_UsbControlTransferParameters.rs | 80 ++-- .../src/features/gen_UsbDeviceFilter.rs | 96 ++-- .../features/gen_UsbDeviceRequestOptions.rs | 16 +- .../features/gen_UsbPermissionDescriptor.rs | 32 +- .../src/features/gen_UsbPermissionStorage.rs | 16 +- .../features/gen_UserProximityEventInit.rs | 36 +- .../src/features/gen_ValueEventInit.rs | 64 +-- .../src/features/gen_VideoColorSpaceInit.rs | 64 +-- .../src/features/gen_VideoConfiguration.rs | 45 +- .../src/features/gen_VideoDecoderConfig.rs | 144 +++--- .../src/features/gen_VideoDecoderInit.rs | 32 +- .../src/features/gen_VideoDecoderSupport.rs | 32 +- .../src/features/gen_VideoEncoderConfig.rs | 176 ++++--- .../features/gen_VideoEncoderEncodeOptions.rs | 16 +- .../src/features/gen_VideoEncoderInit.rs | 32 +- .../src/features/gen_VideoEncoderSupport.rs | 32 +- .../src/features/gen_VideoFrameBufferInit.rs | 160 ++++--- .../features/gen_VideoFrameCopyToOptions.rs | 32 +- .../src/features/gen_VideoFrameInit.rs | 96 ++-- .../web-sys/src/features/gen_VoidCallback.rs | 9 +- crates/web-sys/src/features/gen_VrLayer.rs | 27 +- .../gen_WatchAdvertisementsOptions.rs | 16 +- .../src/features/gen_WaveShaperOptions.rs | 45 +- .../features/gen_WebGlContextAttributes.rs | 88 ++-- .../src/features/gen_WebGlContextEventInit.rs | 36 +- .../web-sys/src/features/gen_WebSocketDict.rs | 9 +- .../src/features/gen_WebSocketElement.rs | 54 ++- .../src/features/gen_WebTransportCloseInfo.rs | 32 +- .../features/gen_WebTransportDatagramStats.rs | 64 +-- .../features/gen_WebTransportErrorOptions.rs | 32 +- .../src/features/gen_WebTransportHash.rs | 32 +- .../src/features/gen_WebTransportOptions.rs | 64 +-- .../gen_WebTransportReceiveStreamStats.rs | 48 +- .../gen_WebTransportSendStreamOptions.rs | 16 +- .../gen_WebTransportSendStreamStats.rs | 64 +-- .../src/features/gen_WebTransportStats.rs | 192 ++++---- .../src/features/gen_WheelEventInit.rs | 279 ++++++----- .../src/features/gen_WidevineCdmManifest.rs | 63 +-- .../web-sys/src/features/gen_WorkerOptions.rs | 27 +- .../src/features/gen_WorkletOptions.rs | 9 +- .../web-sys/src/features/gen_WriteParams.rs | 36 +- .../src/features/gen_XPathNsResolver.rs | 9 +- .../features/gen_XrInputSourceEventInit.rs | 80 ++-- .../gen_XrInputSourcesChangeEventInit.rs | 96 ++-- .../features/gen_XrPermissionDescriptor.rs | 64 +-- .../features/gen_XrReferenceSpaceEventInit.rs | 80 ++-- .../src/features/gen_XrRenderStateInit.rs | 80 ++-- .../src/features/gen_XrSessionEventInit.rs | 64 +-- .../web-sys/src/features/gen_XrSessionInit.rs | 32 +- ..._XrSessionSupportedPermissionDescriptor.rs | 32 +- .../src/features/gen_XrWebGlLayerInit.rs | 96 ++-- crates/webidl/src/generator.rs | 38 +- examples/fetch/src/lib.rs | 6 +- .../src/dependent_module.rs | 4 +- examples/wasm-audio-worklet/src/wasm_audio.rs | 16 +- examples/webrtc_datachannel/src/lib.rs | 16 +- 548 files changed, 15050 insertions(+), 11875 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b9c68620987..3887c2d3dfed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -47,6 +47,9 @@ * Greatly improve the performance of sending WebIDL 'string enums' across the JavaScript boundary by converting the enum variant string to/from an int. [#3915](https://github.com/rustwasm/wasm-bindgen/pull/3915) +* Deprecate builder-pattern type setters for WebIDL dictionary types and introduce non-mutable setters instead. + [#3993](https://github.com/rustwasm/wasm-bindgen/pull/3993) + ### Fixed * Copy port from headless test server when using `WASM_BINDGEN_TEST_ADDRESS`. diff --git a/crates/web-sys/src/features/gen_AddEventListenerOptions.rs b/crates/web-sys/src/features/gen_AddEventListenerOptions.rs index 2939a9b64881..3a600c0442ea 100644 --- a/crates/web-sys/src/features/gen_AddEventListenerOptions.rs +++ b/crates/web-sys/src/features/gen_AddEventListenerOptions.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `AddEventListenerOptions`*"] #[wasm_bindgen(method, getter = "capture")] pub fn get_capture(this: &AddEventListenerOptions) -> Option; + #[doc = "Change the `capture` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AddEventListenerOptions`*"] #[wasm_bindgen(method, setter = "capture")] - fn set_capture(this: &AddEventListenerOptions, val: bool); + pub fn set_capture(this: &AddEventListenerOptions, val: bool); #[doc = "Get the `once` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AddEventListenerOptions`*"] #[wasm_bindgen(method, getter = "once")] pub fn get_once(this: &AddEventListenerOptions) -> Option; + #[doc = "Change the `once` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AddEventListenerOptions`*"] #[wasm_bindgen(method, setter = "once")] - fn set_once(this: &AddEventListenerOptions, val: bool); + pub fn set_once(this: &AddEventListenerOptions, val: bool); #[doc = "Get the `passive` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AddEventListenerOptions`*"] #[wasm_bindgen(method, getter = "passive")] pub fn get_passive(this: &AddEventListenerOptions) -> Option; + #[doc = "Change the `passive` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AddEventListenerOptions`*"] #[wasm_bindgen(method, setter = "passive")] - fn set_passive(this: &AddEventListenerOptions, val: bool); + pub fn set_passive(this: &AddEventListenerOptions, val: bool); } impl AddEventListenerOptions { #[doc = "Construct a new `AddEventListenerOptions`."] @@ -41,23 +50,17 @@ impl AddEventListenerOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `capture` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AddEventListenerOptions`*"] + #[deprecated = "Use `set_capture()` instead."] pub fn capture(&mut self, val: bool) -> &mut Self { self.set_capture(val); self } - #[doc = "Change the `once` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AddEventListenerOptions`*"] + #[deprecated = "Use `set_once()` instead."] pub fn once(&mut self, val: bool) -> &mut Self { self.set_once(val); self } - #[doc = "Change the `passive` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AddEventListenerOptions`*"] + #[deprecated = "Use `set_passive()` instead."] pub fn passive(&mut self, val: bool) -> &mut Self { self.set_passive(val); self diff --git a/crates/web-sys/src/features/gen_AesCbcParams.rs b/crates/web-sys/src/features/gen_AesCbcParams.rs index c6873a199d44..d4bcce9127e7 100644 --- a/crates/web-sys/src/features/gen_AesCbcParams.rs +++ b/crates/web-sys/src/features/gen_AesCbcParams.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `AesCbcParams`*"] #[wasm_bindgen(method, getter = "name")] pub fn get_name(this: &AesCbcParams) -> String; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesCbcParams`*"] #[wasm_bindgen(method, setter = "name")] - fn set_name(this: &AesCbcParams, val: &str); + pub fn set_name(this: &AesCbcParams, val: &str); #[doc = "Get the `iv` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AesCbcParams`*"] #[wasm_bindgen(method, getter = "iv")] pub fn get_iv(this: &AesCbcParams) -> ::js_sys::Object; + #[doc = "Change the `iv` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesCbcParams`*"] #[wasm_bindgen(method, setter = "iv")] - fn set_iv(this: &AesCbcParams, val: &::js_sys::Object); + pub fn set_iv(this: &AesCbcParams, val: &::js_sys::Object); } impl AesCbcParams { #[doc = "Construct a new `AesCbcParams`."] @@ -36,16 +42,12 @@ impl AesCbcParams { ret.iv(iv); ret } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AesCbcParams`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { self.set_name(val); self } - #[doc = "Change the `iv` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AesCbcParams`*"] + #[deprecated = "Use `set_iv()` instead."] pub fn iv(&mut self, val: &::js_sys::Object) -> &mut Self { self.set_iv(val); self diff --git a/crates/web-sys/src/features/gen_AesCtrParams.rs b/crates/web-sys/src/features/gen_AesCtrParams.rs index 60d2232b378e..6a8e17f3bb76 100644 --- a/crates/web-sys/src/features/gen_AesCtrParams.rs +++ b/crates/web-sys/src/features/gen_AesCtrParams.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `AesCtrParams`*"] #[wasm_bindgen(method, getter = "name")] pub fn get_name(this: &AesCtrParams) -> String; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesCtrParams`*"] #[wasm_bindgen(method, setter = "name")] - fn set_name(this: &AesCtrParams, val: &str); + pub fn set_name(this: &AesCtrParams, val: &str); #[doc = "Get the `counter` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AesCtrParams`*"] #[wasm_bindgen(method, getter = "counter")] pub fn get_counter(this: &AesCtrParams) -> ::js_sys::Object; + #[doc = "Change the `counter` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesCtrParams`*"] #[wasm_bindgen(method, setter = "counter")] - fn set_counter(this: &AesCtrParams, val: &::js_sys::Object); + pub fn set_counter(this: &AesCtrParams, val: &::js_sys::Object); #[doc = "Get the `length` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AesCtrParams`*"] #[wasm_bindgen(method, getter = "length")] pub fn get_length(this: &AesCtrParams) -> u8; + #[doc = "Change the `length` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesCtrParams`*"] #[wasm_bindgen(method, setter = "length")] - fn set_length(this: &AesCtrParams, val: u8); + pub fn set_length(this: &AesCtrParams, val: u8); } impl AesCtrParams { #[doc = "Construct a new `AesCtrParams`."] @@ -44,23 +53,17 @@ impl AesCtrParams { ret.length(length); ret } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AesCtrParams`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { self.set_name(val); self } - #[doc = "Change the `counter` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AesCtrParams`*"] + #[deprecated = "Use `set_counter()` instead."] pub fn counter(&mut self, val: &::js_sys::Object) -> &mut Self { self.set_counter(val); self } - #[doc = "Change the `length` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AesCtrParams`*"] + #[deprecated = "Use `set_length()` instead."] pub fn length(&mut self, val: u8) -> &mut Self { self.set_length(val); self diff --git a/crates/web-sys/src/features/gen_AesDerivedKeyParams.rs b/crates/web-sys/src/features/gen_AesDerivedKeyParams.rs index 9651ba24dc05..e36567f1bc14 100644 --- a/crates/web-sys/src/features/gen_AesDerivedKeyParams.rs +++ b/crates/web-sys/src/features/gen_AesDerivedKeyParams.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `AesDerivedKeyParams`*"] #[wasm_bindgen(method, getter = "name")] pub fn get_name(this: &AesDerivedKeyParams) -> String; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesDerivedKeyParams`*"] #[wasm_bindgen(method, setter = "name")] - fn set_name(this: &AesDerivedKeyParams, val: &str); + pub fn set_name(this: &AesDerivedKeyParams, val: &str); #[doc = "Get the `length` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AesDerivedKeyParams`*"] #[wasm_bindgen(method, getter = "length")] pub fn get_length(this: &AesDerivedKeyParams) -> u32; + #[doc = "Change the `length` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesDerivedKeyParams`*"] #[wasm_bindgen(method, setter = "length")] - fn set_length(this: &AesDerivedKeyParams, val: u32); + pub fn set_length(this: &AesDerivedKeyParams, val: u32); } impl AesDerivedKeyParams { #[doc = "Construct a new `AesDerivedKeyParams`."] @@ -36,16 +42,12 @@ impl AesDerivedKeyParams { ret.length(length); ret } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AesDerivedKeyParams`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { self.set_name(val); self } - #[doc = "Change the `length` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AesDerivedKeyParams`*"] + #[deprecated = "Use `set_length()` instead."] pub fn length(&mut self, val: u32) -> &mut Self { self.set_length(val); self diff --git a/crates/web-sys/src/features/gen_AesGcmParams.rs b/crates/web-sys/src/features/gen_AesGcmParams.rs index c6de2646603a..94918a676239 100644 --- a/crates/web-sys/src/features/gen_AesGcmParams.rs +++ b/crates/web-sys/src/features/gen_AesGcmParams.rs @@ -15,29 +15,41 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"] #[wasm_bindgen(method, getter = "name")] pub fn get_name(this: &AesGcmParams) -> String; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"] #[wasm_bindgen(method, setter = "name")] - fn set_name(this: &AesGcmParams, val: &str); + pub fn set_name(this: &AesGcmParams, val: &str); #[doc = "Get the `additionalData` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"] #[wasm_bindgen(method, getter = "additionalData")] pub fn get_additional_data(this: &AesGcmParams) -> Option<::js_sys::Object>; + #[doc = "Change the `additionalData` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"] #[wasm_bindgen(method, setter = "additionalData")] - fn set_additional_data(this: &AesGcmParams, val: &::js_sys::Object); + pub fn set_additional_data(this: &AesGcmParams, val: &::js_sys::Object); #[doc = "Get the `iv` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"] #[wasm_bindgen(method, getter = "iv")] pub fn get_iv(this: &AesGcmParams) -> ::js_sys::Object; + #[doc = "Change the `iv` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"] #[wasm_bindgen(method, setter = "iv")] - fn set_iv(this: &AesGcmParams, val: &::js_sys::Object); + pub fn set_iv(this: &AesGcmParams, val: &::js_sys::Object); #[doc = "Get the `tagLength` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"] #[wasm_bindgen(method, getter = "tagLength")] pub fn get_tag_length(this: &AesGcmParams) -> Option; + #[doc = "Change the `tagLength` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"] #[wasm_bindgen(method, setter = "tagLength")] - fn set_tag_length(this: &AesGcmParams, val: u8); + pub fn set_tag_length(this: &AesGcmParams, val: u8); } impl AesGcmParams { #[doc = "Construct a new `AesGcmParams`."] @@ -50,30 +62,22 @@ impl AesGcmParams { ret.iv(iv); ret } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { self.set_name(val); self } - #[doc = "Change the `additionalData` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"] + #[deprecated = "Use `set_additional_data()` instead."] pub fn additional_data(&mut self, val: &::js_sys::Object) -> &mut Self { self.set_additional_data(val); self } - #[doc = "Change the `iv` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"] + #[deprecated = "Use `set_iv()` instead."] pub fn iv(&mut self, val: &::js_sys::Object) -> &mut Self { self.set_iv(val); self } - #[doc = "Change the `tagLength` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"] + #[deprecated = "Use `set_tag_length()` instead."] pub fn tag_length(&mut self, val: u8) -> &mut Self { self.set_tag_length(val); self diff --git a/crates/web-sys/src/features/gen_AesKeyAlgorithm.rs b/crates/web-sys/src/features/gen_AesKeyAlgorithm.rs index 3e646ef3bec2..d202b081c0c2 100644 --- a/crates/web-sys/src/features/gen_AesKeyAlgorithm.rs +++ b/crates/web-sys/src/features/gen_AesKeyAlgorithm.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `AesKeyAlgorithm`*"] #[wasm_bindgen(method, getter = "name")] pub fn get_name(this: &AesKeyAlgorithm) -> String; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesKeyAlgorithm`*"] #[wasm_bindgen(method, setter = "name")] - fn set_name(this: &AesKeyAlgorithm, val: &str); + pub fn set_name(this: &AesKeyAlgorithm, val: &str); #[doc = "Get the `length` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AesKeyAlgorithm`*"] #[wasm_bindgen(method, getter = "length")] pub fn get_length(this: &AesKeyAlgorithm) -> u16; + #[doc = "Change the `length` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesKeyAlgorithm`*"] #[wasm_bindgen(method, setter = "length")] - fn set_length(this: &AesKeyAlgorithm, val: u16); + pub fn set_length(this: &AesKeyAlgorithm, val: u16); } impl AesKeyAlgorithm { #[doc = "Construct a new `AesKeyAlgorithm`."] @@ -36,16 +42,12 @@ impl AesKeyAlgorithm { ret.length(length); ret } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AesKeyAlgorithm`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { self.set_name(val); self } - #[doc = "Change the `length` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AesKeyAlgorithm`*"] + #[deprecated = "Use `set_length()` instead."] pub fn length(&mut self, val: u16) -> &mut Self { self.set_length(val); self diff --git a/crates/web-sys/src/features/gen_AesKeyGenParams.rs b/crates/web-sys/src/features/gen_AesKeyGenParams.rs index 8c6f8649d27c..9b9debe146cc 100644 --- a/crates/web-sys/src/features/gen_AesKeyGenParams.rs +++ b/crates/web-sys/src/features/gen_AesKeyGenParams.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `AesKeyGenParams`*"] #[wasm_bindgen(method, getter = "name")] pub fn get_name(this: &AesKeyGenParams) -> String; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesKeyGenParams`*"] #[wasm_bindgen(method, setter = "name")] - fn set_name(this: &AesKeyGenParams, val: &str); + pub fn set_name(this: &AesKeyGenParams, val: &str); #[doc = "Get the `length` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AesKeyGenParams`*"] #[wasm_bindgen(method, getter = "length")] pub fn get_length(this: &AesKeyGenParams) -> u16; + #[doc = "Change the `length` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesKeyGenParams`*"] #[wasm_bindgen(method, setter = "length")] - fn set_length(this: &AesKeyGenParams, val: u16); + pub fn set_length(this: &AesKeyGenParams, val: u16); } impl AesKeyGenParams { #[doc = "Construct a new `AesKeyGenParams`."] @@ -36,16 +42,12 @@ impl AesKeyGenParams { ret.length(length); ret } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AesKeyGenParams`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { self.set_name(val); self } - #[doc = "Change the `length` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AesKeyGenParams`*"] + #[deprecated = "Use `set_length()` instead."] pub fn length(&mut self, val: u16) -> &mut Self { self.set_length(val); self diff --git a/crates/web-sys/src/features/gen_Algorithm.rs b/crates/web-sys/src/features/gen_Algorithm.rs index e6549b7a0e64..18164738e025 100644 --- a/crates/web-sys/src/features/gen_Algorithm.rs +++ b/crates/web-sys/src/features/gen_Algorithm.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `Algorithm`*"] #[wasm_bindgen(method, getter = "name")] pub fn get_name(this: &Algorithm) -> String; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Algorithm`*"] #[wasm_bindgen(method, setter = "name")] - fn set_name(this: &Algorithm, val: &str); + pub fn set_name(this: &Algorithm, val: &str); } impl Algorithm { #[doc = "Construct a new `Algorithm`."] @@ -28,9 +31,7 @@ impl Algorithm { ret.name(name); ret } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `Algorithm`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { self.set_name(val); self diff --git a/crates/web-sys/src/features/gen_AllowedBluetoothDevice.rs b/crates/web-sys/src/features/gen_AllowedBluetoothDevice.rs index 8b162c76eca2..c04735b5385b 100644 --- a/crates/web-sys/src/features/gen_AllowedBluetoothDevice.rs +++ b/crates/web-sys/src/features/gen_AllowedBluetoothDevice.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "allowedServices")] pub fn get_allowed_services(this: &AllowedBluetoothDevice) -> ::wasm_bindgen::JsValue; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `allowedServices` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AllowedBluetoothDevice`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "allowedServices")] - fn set_allowed_services(this: &AllowedBluetoothDevice, val: &::wasm_bindgen::JsValue); + pub fn set_allowed_services(this: &AllowedBluetoothDevice, val: &::wasm_bindgen::JsValue); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `deviceId` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "deviceId")] pub fn get_device_id(this: &AllowedBluetoothDevice) -> String; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `deviceId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AllowedBluetoothDevice`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "deviceId")] - fn set_device_id(this: &AllowedBluetoothDevice, val: &str); + pub fn set_device_id(this: &AllowedBluetoothDevice, val: &str); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `mayUseGATT` field of this object."] #[doc = ""] @@ -45,8 +59,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "mayUseGATT")] pub fn get_may_use_gatt(this: &AllowedBluetoothDevice) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `mayUseGATT` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AllowedBluetoothDevice`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "mayUseGATT")] - fn set_may_use_gatt(this: &AllowedBluetoothDevice, val: bool); + pub fn set_may_use_gatt(this: &AllowedBluetoothDevice, val: bool); } #[cfg(web_sys_unstable_apis)] impl AllowedBluetoothDevice { @@ -69,34 +90,19 @@ impl AllowedBluetoothDevice { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `allowedServices` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AllowedBluetoothDevice`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_allowed_services()` instead."] pub fn allowed_services(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_allowed_services(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `deviceId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AllowedBluetoothDevice`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_device_id()` instead."] pub fn device_id(&mut self, val: &str) -> &mut Self { self.set_device_id(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `mayUseGATT` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AllowedBluetoothDevice`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_may_use_gatt()` instead."] pub fn may_use_gatt(&mut self, val: bool) -> &mut Self { self.set_may_use_gatt(val); self diff --git a/crates/web-sys/src/features/gen_AllowedUsbDevice.rs b/crates/web-sys/src/features/gen_AllowedUsbDevice.rs index ff444b6e497b..24c4c4c2db0d 100644 --- a/crates/web-sys/src/features/gen_AllowedUsbDevice.rs +++ b/crates/web-sys/src/features/gen_AllowedUsbDevice.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "productId")] pub fn get_product_id(this: &AllowedUsbDevice) -> u8; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `productId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AllowedUsbDevice`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "productId")] - fn set_product_id(this: &AllowedUsbDevice, val: u8); + pub fn set_product_id(this: &AllowedUsbDevice, val: u8); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `serialNumber` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "serialNumber")] pub fn get_serial_number(this: &AllowedUsbDevice) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `serialNumber` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AllowedUsbDevice`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "serialNumber")] - fn set_serial_number(this: &AllowedUsbDevice, val: &str); + pub fn set_serial_number(this: &AllowedUsbDevice, val: &str); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `vendorId` field of this object."] #[doc = ""] @@ -45,8 +59,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "vendorId")] pub fn get_vendor_id(this: &AllowedUsbDevice) -> u8; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `vendorId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AllowedUsbDevice`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "vendorId")] - fn set_vendor_id(this: &AllowedUsbDevice, val: u8); + pub fn set_vendor_id(this: &AllowedUsbDevice, val: u8); } #[cfg(web_sys_unstable_apis)] impl AllowedUsbDevice { @@ -64,34 +85,19 @@ impl AllowedUsbDevice { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `productId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AllowedUsbDevice`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_product_id()` instead."] pub fn product_id(&mut self, val: u8) -> &mut Self { self.set_product_id(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `serialNumber` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AllowedUsbDevice`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_serial_number()` instead."] pub fn serial_number(&mut self, val: &str) -> &mut Self { self.set_serial_number(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `vendorId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AllowedUsbDevice`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_vendor_id()` instead."] pub fn vendor_id(&mut self, val: u8) -> &mut Self { self.set_vendor_id(val); self diff --git a/crates/web-sys/src/features/gen_AnalyserOptions.rs b/crates/web-sys/src/features/gen_AnalyserOptions.rs index 1bbd4cb2ec6e..e5ff28832c3f 100644 --- a/crates/web-sys/src/features/gen_AnalyserOptions.rs +++ b/crates/web-sys/src/features/gen_AnalyserOptions.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`*"] #[wasm_bindgen(method, getter = "channelCount")] pub fn get_channel_count(this: &AnalyserOptions) -> Option; + #[doc = "Change the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`*"] #[wasm_bindgen(method, setter = "channelCount")] - fn set_channel_count(this: &AnalyserOptions, val: u32); + pub fn set_channel_count(this: &AnalyserOptions, val: u32); #[cfg(feature = "ChannelCountMode")] #[doc = "Get the `channelCountMode` field of this object."] #[doc = ""] @@ -24,8 +27,11 @@ extern "C" { #[wasm_bindgen(method, getter = "channelCountMode")] pub fn get_channel_count_mode(this: &AnalyserOptions) -> Option; #[cfg(feature = "ChannelCountMode")] + #[doc = "Change the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`, `ChannelCountMode`*"] #[wasm_bindgen(method, setter = "channelCountMode")] - fn set_channel_count_mode(this: &AnalyserOptions, val: ChannelCountMode); + pub fn set_channel_count_mode(this: &AnalyserOptions, val: ChannelCountMode); #[cfg(feature = "ChannelInterpretation")] #[doc = "Get the `channelInterpretation` field of this object."] #[doc = ""] @@ -33,36 +39,51 @@ extern "C" { #[wasm_bindgen(method, getter = "channelInterpretation")] pub fn get_channel_interpretation(this: &AnalyserOptions) -> Option; #[cfg(feature = "ChannelInterpretation")] + #[doc = "Change the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`, `ChannelInterpretation`*"] #[wasm_bindgen(method, setter = "channelInterpretation")] - fn set_channel_interpretation(this: &AnalyserOptions, val: ChannelInterpretation); + pub fn set_channel_interpretation(this: &AnalyserOptions, val: ChannelInterpretation); #[doc = "Get the `fftSize` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`*"] #[wasm_bindgen(method, getter = "fftSize")] pub fn get_fft_size(this: &AnalyserOptions) -> Option; + #[doc = "Change the `fftSize` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`*"] #[wasm_bindgen(method, setter = "fftSize")] - fn set_fft_size(this: &AnalyserOptions, val: u32); + pub fn set_fft_size(this: &AnalyserOptions, val: u32); #[doc = "Get the `maxDecibels` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`*"] #[wasm_bindgen(method, getter = "maxDecibels")] pub fn get_max_decibels(this: &AnalyserOptions) -> Option; + #[doc = "Change the `maxDecibels` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`*"] #[wasm_bindgen(method, setter = "maxDecibels")] - fn set_max_decibels(this: &AnalyserOptions, val: f64); + pub fn set_max_decibels(this: &AnalyserOptions, val: f64); #[doc = "Get the `minDecibels` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`*"] #[wasm_bindgen(method, getter = "minDecibels")] pub fn get_min_decibels(this: &AnalyserOptions) -> Option; + #[doc = "Change the `minDecibels` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`*"] #[wasm_bindgen(method, setter = "minDecibels")] - fn set_min_decibels(this: &AnalyserOptions, val: f64); + pub fn set_min_decibels(this: &AnalyserOptions, val: f64); #[doc = "Get the `smoothingTimeConstant` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`*"] #[wasm_bindgen(method, getter = "smoothingTimeConstant")] pub fn get_smoothing_time_constant(this: &AnalyserOptions) -> Option; + #[doc = "Change the `smoothingTimeConstant` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`*"] #[wasm_bindgen(method, setter = "smoothingTimeConstant")] - fn set_smoothing_time_constant(this: &AnalyserOptions, val: f64); + pub fn set_smoothing_time_constant(this: &AnalyserOptions, val: f64); } impl AnalyserOptions { #[doc = "Construct a new `AnalyserOptions`."] @@ -73,53 +94,39 @@ impl AnalyserOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `channelCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`*"] + #[deprecated = "Use `set_channel_count()` instead."] pub fn channel_count(&mut self, val: u32) -> &mut Self { self.set_channel_count(val); self } #[cfg(feature = "ChannelCountMode")] - #[doc = "Change the `channelCountMode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`, `ChannelCountMode`*"] + #[deprecated = "Use `set_channel_count_mode()` instead."] pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self { self.set_channel_count_mode(val); self } #[cfg(feature = "ChannelInterpretation")] - #[doc = "Change the `channelInterpretation` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`, `ChannelInterpretation`*"] + #[deprecated = "Use `set_channel_interpretation()` instead."] pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self { self.set_channel_interpretation(val); self } - #[doc = "Change the `fftSize` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`*"] + #[deprecated = "Use `set_fft_size()` instead."] pub fn fft_size(&mut self, val: u32) -> &mut Self { self.set_fft_size(val); self } - #[doc = "Change the `maxDecibels` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`*"] + #[deprecated = "Use `set_max_decibels()` instead."] pub fn max_decibels(&mut self, val: f64) -> &mut Self { self.set_max_decibels(val); self } - #[doc = "Change the `minDecibels` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`*"] + #[deprecated = "Use `set_min_decibels()` instead."] pub fn min_decibels(&mut self, val: f64) -> &mut Self { self.set_min_decibels(val); self } - #[doc = "Change the `smoothingTimeConstant` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`*"] + #[deprecated = "Use `set_smoothing_time_constant()` instead."] pub fn smoothing_time_constant(&mut self, val: f64) -> &mut Self { self.set_smoothing_time_constant(val); self diff --git a/crates/web-sys/src/features/gen_AnimationEventInit.rs b/crates/web-sys/src/features/gen_AnimationEventInit.rs index d30cf5bed43a..23b8e75af685 100644 --- a/crates/web-sys/src/features/gen_AnimationEventInit.rs +++ b/crates/web-sys/src/features/gen_AnimationEventInit.rs @@ -15,43 +15,61 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &AnimationEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &AnimationEventInit, val: bool); + pub fn set_bubbles(this: &AnimationEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &AnimationEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &AnimationEventInit, val: bool); + pub fn set_cancelable(this: &AnimationEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &AnimationEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &AnimationEventInit, val: bool); + pub fn set_composed(this: &AnimationEventInit, val: bool); #[doc = "Get the `animationName` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"] #[wasm_bindgen(method, getter = "animationName")] pub fn get_animation_name(this: &AnimationEventInit) -> Option; + #[doc = "Change the `animationName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"] #[wasm_bindgen(method, setter = "animationName")] - fn set_animation_name(this: &AnimationEventInit, val: &str); + pub fn set_animation_name(this: &AnimationEventInit, val: &str); #[doc = "Get the `elapsedTime` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"] #[wasm_bindgen(method, getter = "elapsedTime")] pub fn get_elapsed_time(this: &AnimationEventInit) -> Option; + #[doc = "Change the `elapsedTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"] #[wasm_bindgen(method, setter = "elapsedTime")] - fn set_elapsed_time(this: &AnimationEventInit, val: f32); + pub fn set_elapsed_time(this: &AnimationEventInit, val: f32); #[doc = "Get the `pseudoElement` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"] #[wasm_bindgen(method, getter = "pseudoElement")] pub fn get_pseudo_element(this: &AnimationEventInit) -> Option; + #[doc = "Change the `pseudoElement` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"] #[wasm_bindgen(method, setter = "pseudoElement")] - fn set_pseudo_element(this: &AnimationEventInit, val: &str); + pub fn set_pseudo_element(this: &AnimationEventInit, val: &str); } impl AnimationEventInit { #[doc = "Construct a new `AnimationEventInit`."] @@ -62,44 +80,32 @@ impl AnimationEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } - #[doc = "Change the `animationName` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"] + #[deprecated = "Use `set_animation_name()` instead."] pub fn animation_name(&mut self, val: &str) -> &mut Self { self.set_animation_name(val); self } - #[doc = "Change the `elapsedTime` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"] + #[deprecated = "Use `set_elapsed_time()` instead."] pub fn elapsed_time(&mut self, val: f32) -> &mut Self { self.set_elapsed_time(val); self } - #[doc = "Change the `pseudoElement` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"] + #[deprecated = "Use `set_pseudo_element()` instead."] pub fn pseudo_element(&mut self, val: &str) -> &mut Self { self.set_pseudo_element(val); self diff --git a/crates/web-sys/src/features/gen_AnimationPlaybackEventInit.rs b/crates/web-sys/src/features/gen_AnimationPlaybackEventInit.rs index 32388a9c3bc1..921cefc61364 100644 --- a/crates/web-sys/src/features/gen_AnimationPlaybackEventInit.rs +++ b/crates/web-sys/src/features/gen_AnimationPlaybackEventInit.rs @@ -15,36 +15,51 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &AnimationPlaybackEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &AnimationPlaybackEventInit, val: bool); + pub fn set_bubbles(this: &AnimationPlaybackEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &AnimationPlaybackEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &AnimationPlaybackEventInit, val: bool); + pub fn set_cancelable(this: &AnimationPlaybackEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &AnimationPlaybackEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &AnimationPlaybackEventInit, val: bool); + pub fn set_composed(this: &AnimationPlaybackEventInit, val: bool); #[doc = "Get the `currentTime` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEventInit`*"] #[wasm_bindgen(method, getter = "currentTime")] pub fn get_current_time(this: &AnimationPlaybackEventInit) -> Option; + #[doc = "Change the `currentTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEventInit`*"] #[wasm_bindgen(method, setter = "currentTime")] - fn set_current_time(this: &AnimationPlaybackEventInit, val: Option); + pub fn set_current_time(this: &AnimationPlaybackEventInit, val: Option); #[doc = "Get the `timelineTime` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEventInit`*"] #[wasm_bindgen(method, getter = "timelineTime")] pub fn get_timeline_time(this: &AnimationPlaybackEventInit) -> Option; + #[doc = "Change the `timelineTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEventInit`*"] #[wasm_bindgen(method, setter = "timelineTime")] - fn set_timeline_time(this: &AnimationPlaybackEventInit, val: Option); + pub fn set_timeline_time(this: &AnimationPlaybackEventInit, val: Option); } impl AnimationPlaybackEventInit { #[doc = "Construct a new `AnimationPlaybackEventInit`."] @@ -55,37 +70,27 @@ impl AnimationPlaybackEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } - #[doc = "Change the `currentTime` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEventInit`*"] + #[deprecated = "Use `set_current_time()` instead."] pub fn current_time(&mut self, val: Option) -> &mut Self { self.set_current_time(val); self } - #[doc = "Change the `timelineTime` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEventInit`*"] + #[deprecated = "Use `set_timeline_time()` instead."] pub fn timeline_time(&mut self, val: Option) -> &mut Self { self.set_timeline_time(val); self diff --git a/crates/web-sys/src/features/gen_AnimationPropertyDetails.rs b/crates/web-sys/src/features/gen_AnimationPropertyDetails.rs index 5bad02ac8bcb..5ce5566996d1 100644 --- a/crates/web-sys/src/features/gen_AnimationPropertyDetails.rs +++ b/crates/web-sys/src/features/gen_AnimationPropertyDetails.rs @@ -15,29 +15,41 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyDetails`*"] #[wasm_bindgen(method, getter = "property")] pub fn get_property(this: &AnimationPropertyDetails) -> String; + #[doc = "Change the `property` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyDetails`*"] #[wasm_bindgen(method, setter = "property")] - fn set_property(this: &AnimationPropertyDetails, val: &str); + pub fn set_property(this: &AnimationPropertyDetails, val: &str); #[doc = "Get the `runningOnCompositor` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyDetails`*"] #[wasm_bindgen(method, getter = "runningOnCompositor")] pub fn get_running_on_compositor(this: &AnimationPropertyDetails) -> bool; + #[doc = "Change the `runningOnCompositor` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyDetails`*"] #[wasm_bindgen(method, setter = "runningOnCompositor")] - fn set_running_on_compositor(this: &AnimationPropertyDetails, val: bool); + pub fn set_running_on_compositor(this: &AnimationPropertyDetails, val: bool); #[doc = "Get the `values` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyDetails`*"] #[wasm_bindgen(method, getter = "values")] pub fn get_values(this: &AnimationPropertyDetails) -> ::js_sys::Array; + #[doc = "Change the `values` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyDetails`*"] #[wasm_bindgen(method, setter = "values")] - fn set_values(this: &AnimationPropertyDetails, val: &::wasm_bindgen::JsValue); + pub fn set_values(this: &AnimationPropertyDetails, val: &::wasm_bindgen::JsValue); #[doc = "Get the `warning` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyDetails`*"] #[wasm_bindgen(method, getter = "warning")] pub fn get_warning(this: &AnimationPropertyDetails) -> Option; + #[doc = "Change the `warning` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyDetails`*"] #[wasm_bindgen(method, setter = "warning")] - fn set_warning(this: &AnimationPropertyDetails, val: &str); + pub fn set_warning(this: &AnimationPropertyDetails, val: &str); } impl AnimationPropertyDetails { #[doc = "Construct a new `AnimationPropertyDetails`."] @@ -55,30 +67,22 @@ impl AnimationPropertyDetails { ret.values(values); ret } - #[doc = "Change the `property` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyDetails`*"] + #[deprecated = "Use `set_property()` instead."] pub fn property(&mut self, val: &str) -> &mut Self { self.set_property(val); self } - #[doc = "Change the `runningOnCompositor` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyDetails`*"] + #[deprecated = "Use `set_running_on_compositor()` instead."] pub fn running_on_compositor(&mut self, val: bool) -> &mut Self { self.set_running_on_compositor(val); self } - #[doc = "Change the `values` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyDetails`*"] + #[deprecated = "Use `set_values()` instead."] pub fn values(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_values(val); self } - #[doc = "Change the `warning` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyDetails`*"] + #[deprecated = "Use `set_warning()` instead."] pub fn warning(&mut self, val: &str) -> &mut Self { self.set_warning(val); self diff --git a/crates/web-sys/src/features/gen_AnimationPropertyValueDetails.rs b/crates/web-sys/src/features/gen_AnimationPropertyValueDetails.rs index 1e7533bece4b..acb03d52d829 100644 --- a/crates/web-sys/src/features/gen_AnimationPropertyValueDetails.rs +++ b/crates/web-sys/src/features/gen_AnimationPropertyValueDetails.rs @@ -17,29 +17,41 @@ extern "C" { #[wasm_bindgen(method, getter = "composite")] pub fn get_composite(this: &AnimationPropertyValueDetails) -> CompositeOperation; #[cfg(feature = "CompositeOperation")] + #[doc = "Change the `composite` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`, `CompositeOperation`*"] #[wasm_bindgen(method, setter = "composite")] - fn set_composite(this: &AnimationPropertyValueDetails, val: CompositeOperation); + pub fn set_composite(this: &AnimationPropertyValueDetails, val: CompositeOperation); #[doc = "Get the `easing` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`*"] #[wasm_bindgen(method, getter = "easing")] pub fn get_easing(this: &AnimationPropertyValueDetails) -> Option; + #[doc = "Change the `easing` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`*"] #[wasm_bindgen(method, setter = "easing")] - fn set_easing(this: &AnimationPropertyValueDetails, val: &str); + pub fn set_easing(this: &AnimationPropertyValueDetails, val: &str); #[doc = "Get the `offset` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`*"] #[wasm_bindgen(method, getter = "offset")] pub fn get_offset(this: &AnimationPropertyValueDetails) -> f64; + #[doc = "Change the `offset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`*"] #[wasm_bindgen(method, setter = "offset")] - fn set_offset(this: &AnimationPropertyValueDetails, val: f64); + pub fn set_offset(this: &AnimationPropertyValueDetails, val: f64); #[doc = "Get the `value` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`*"] #[wasm_bindgen(method, getter = "value")] pub fn get_value(this: &AnimationPropertyValueDetails) -> Option; + #[doc = "Change the `value` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`*"] #[wasm_bindgen(method, setter = "value")] - fn set_value(this: &AnimationPropertyValueDetails, val: &str); + pub fn set_value(this: &AnimationPropertyValueDetails, val: &str); } impl AnimationPropertyValueDetails { #[cfg(feature = "CompositeOperation")] @@ -54,30 +66,22 @@ impl AnimationPropertyValueDetails { ret } #[cfg(feature = "CompositeOperation")] - #[doc = "Change the `composite` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`, `CompositeOperation`*"] + #[deprecated = "Use `set_composite()` instead."] pub fn composite(&mut self, val: CompositeOperation) -> &mut Self { self.set_composite(val); self } - #[doc = "Change the `easing` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`*"] + #[deprecated = "Use `set_easing()` instead."] pub fn easing(&mut self, val: &str) -> &mut Self { self.set_easing(val); self } - #[doc = "Change the `offset` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`*"] + #[deprecated = "Use `set_offset()` instead."] pub fn offset(&mut self, val: f64) -> &mut Self { self.set_offset(val); self } - #[doc = "Change the `value` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`*"] + #[deprecated = "Use `set_value()` instead."] pub fn value(&mut self, val: &str) -> &mut Self { self.set_value(val); self diff --git a/crates/web-sys/src/features/gen_AssignedNodesOptions.rs b/crates/web-sys/src/features/gen_AssignedNodesOptions.rs index 83b32033534d..c09dbaeefc13 100644 --- a/crates/web-sys/src/features/gen_AssignedNodesOptions.rs +++ b/crates/web-sys/src/features/gen_AssignedNodesOptions.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `AssignedNodesOptions`*"] #[wasm_bindgen(method, getter = "flatten")] pub fn get_flatten(this: &AssignedNodesOptions) -> Option; + #[doc = "Change the `flatten` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AssignedNodesOptions`*"] #[wasm_bindgen(method, setter = "flatten")] - fn set_flatten(this: &AssignedNodesOptions, val: bool); + pub fn set_flatten(this: &AssignedNodesOptions, val: bool); } impl AssignedNodesOptions { #[doc = "Construct a new `AssignedNodesOptions`."] @@ -27,9 +30,7 @@ impl AssignedNodesOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `flatten` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AssignedNodesOptions`*"] + #[deprecated = "Use `set_flatten()` instead."] pub fn flatten(&mut self, val: bool) -> &mut Self { self.set_flatten(val); self diff --git a/crates/web-sys/src/features/gen_AttributeNameValue.rs b/crates/web-sys/src/features/gen_AttributeNameValue.rs index d2e58b6bfad9..9d4cff6cd3bd 100644 --- a/crates/web-sys/src/features/gen_AttributeNameValue.rs +++ b/crates/web-sys/src/features/gen_AttributeNameValue.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `AttributeNameValue`*"] #[wasm_bindgen(method, getter = "name")] pub fn get_name(this: &AttributeNameValue) -> String; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AttributeNameValue`*"] #[wasm_bindgen(method, setter = "name")] - fn set_name(this: &AttributeNameValue, val: &str); + pub fn set_name(this: &AttributeNameValue, val: &str); #[doc = "Get the `value` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AttributeNameValue`*"] #[wasm_bindgen(method, getter = "value")] pub fn get_value(this: &AttributeNameValue) -> String; + #[doc = "Change the `value` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AttributeNameValue`*"] #[wasm_bindgen(method, setter = "value")] - fn set_value(this: &AttributeNameValue, val: &str); + pub fn set_value(this: &AttributeNameValue, val: &str); } impl AttributeNameValue { #[doc = "Construct a new `AttributeNameValue`."] @@ -36,16 +42,12 @@ impl AttributeNameValue { ret.value(value); ret } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AttributeNameValue`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { self.set_name(val); self } - #[doc = "Change the `value` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AttributeNameValue`*"] + #[deprecated = "Use `set_value()` instead."] pub fn value(&mut self, val: &str) -> &mut Self { self.set_value(val); self diff --git a/crates/web-sys/src/features/gen_AudioBufferOptions.rs b/crates/web-sys/src/features/gen_AudioBufferOptions.rs index 7cbcf6b67cae..d5bbd45fca8f 100644 --- a/crates/web-sys/src/features/gen_AudioBufferOptions.rs +++ b/crates/web-sys/src/features/gen_AudioBufferOptions.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `AudioBufferOptions`*"] #[wasm_bindgen(method, getter = "length")] pub fn get_length(this: &AudioBufferOptions) -> u32; + #[doc = "Change the `length` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioBufferOptions`*"] #[wasm_bindgen(method, setter = "length")] - fn set_length(this: &AudioBufferOptions, val: u32); + pub fn set_length(this: &AudioBufferOptions, val: u32); #[doc = "Get the `numberOfChannels` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioBufferOptions`*"] #[wasm_bindgen(method, getter = "numberOfChannels")] pub fn get_number_of_channels(this: &AudioBufferOptions) -> Option; + #[doc = "Change the `numberOfChannels` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioBufferOptions`*"] #[wasm_bindgen(method, setter = "numberOfChannels")] - fn set_number_of_channels(this: &AudioBufferOptions, val: u32); + pub fn set_number_of_channels(this: &AudioBufferOptions, val: u32); #[doc = "Get the `sampleRate` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioBufferOptions`*"] #[wasm_bindgen(method, getter = "sampleRate")] pub fn get_sample_rate(this: &AudioBufferOptions) -> f32; + #[doc = "Change the `sampleRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioBufferOptions`*"] #[wasm_bindgen(method, setter = "sampleRate")] - fn set_sample_rate(this: &AudioBufferOptions, val: f32); + pub fn set_sample_rate(this: &AudioBufferOptions, val: f32); } impl AudioBufferOptions { #[doc = "Construct a new `AudioBufferOptions`."] @@ -43,23 +52,17 @@ impl AudioBufferOptions { ret.sample_rate(sample_rate); ret } - #[doc = "Change the `length` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioBufferOptions`*"] + #[deprecated = "Use `set_length()` instead."] pub fn length(&mut self, val: u32) -> &mut Self { self.set_length(val); self } - #[doc = "Change the `numberOfChannels` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioBufferOptions`*"] + #[deprecated = "Use `set_number_of_channels()` instead."] pub fn number_of_channels(&mut self, val: u32) -> &mut Self { self.set_number_of_channels(val); self } - #[doc = "Change the `sampleRate` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioBufferOptions`*"] + #[deprecated = "Use `set_sample_rate()` instead."] pub fn sample_rate(&mut self, val: f32) -> &mut Self { self.set_sample_rate(val); self diff --git a/crates/web-sys/src/features/gen_AudioBufferSourceOptions.rs b/crates/web-sys/src/features/gen_AudioBufferSourceOptions.rs index 0a893d32b165..7c470f0b5de5 100644 --- a/crates/web-sys/src/features/gen_AudioBufferSourceOptions.rs +++ b/crates/web-sys/src/features/gen_AudioBufferSourceOptions.rs @@ -17,43 +17,61 @@ extern "C" { #[wasm_bindgen(method, getter = "buffer")] pub fn get_buffer(this: &AudioBufferSourceOptions) -> Option; #[cfg(feature = "AudioBuffer")] + #[doc = "Change the `buffer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioBuffer`, `AudioBufferSourceOptions`*"] #[wasm_bindgen(method, setter = "buffer")] - fn set_buffer(this: &AudioBufferSourceOptions, val: Option<&AudioBuffer>); + pub fn set_buffer(this: &AudioBufferSourceOptions, val: Option<&AudioBuffer>); #[doc = "Get the `detune` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceOptions`*"] #[wasm_bindgen(method, getter = "detune")] pub fn get_detune(this: &AudioBufferSourceOptions) -> Option; + #[doc = "Change the `detune` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceOptions`*"] #[wasm_bindgen(method, setter = "detune")] - fn set_detune(this: &AudioBufferSourceOptions, val: f32); + pub fn set_detune(this: &AudioBufferSourceOptions, val: f32); #[doc = "Get the `loop` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceOptions`*"] #[wasm_bindgen(method, getter = "loop")] pub fn get_loop(this: &AudioBufferSourceOptions) -> Option; + #[doc = "Change the `loop` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceOptions`*"] #[wasm_bindgen(method, setter = "loop")] - fn set_loop(this: &AudioBufferSourceOptions, val: bool); + pub fn set_loop(this: &AudioBufferSourceOptions, val: bool); #[doc = "Get the `loopEnd` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceOptions`*"] #[wasm_bindgen(method, getter = "loopEnd")] pub fn get_loop_end(this: &AudioBufferSourceOptions) -> Option; + #[doc = "Change the `loopEnd` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceOptions`*"] #[wasm_bindgen(method, setter = "loopEnd")] - fn set_loop_end(this: &AudioBufferSourceOptions, val: f64); + pub fn set_loop_end(this: &AudioBufferSourceOptions, val: f64); #[doc = "Get the `loopStart` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceOptions`*"] #[wasm_bindgen(method, getter = "loopStart")] pub fn get_loop_start(this: &AudioBufferSourceOptions) -> Option; + #[doc = "Change the `loopStart` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceOptions`*"] #[wasm_bindgen(method, setter = "loopStart")] - fn set_loop_start(this: &AudioBufferSourceOptions, val: f64); + pub fn set_loop_start(this: &AudioBufferSourceOptions, val: f64); #[doc = "Get the `playbackRate` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceOptions`*"] #[wasm_bindgen(method, getter = "playbackRate")] pub fn get_playback_rate(this: &AudioBufferSourceOptions) -> Option; + #[doc = "Change the `playbackRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceOptions`*"] #[wasm_bindgen(method, setter = "playbackRate")] - fn set_playback_rate(this: &AudioBufferSourceOptions, val: f32); + pub fn set_playback_rate(this: &AudioBufferSourceOptions, val: f32); } impl AudioBufferSourceOptions { #[doc = "Construct a new `AudioBufferSourceOptions`."] @@ -65,44 +83,32 @@ impl AudioBufferSourceOptions { ret } #[cfg(feature = "AudioBuffer")] - #[doc = "Change the `buffer` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioBuffer`, `AudioBufferSourceOptions`*"] + #[deprecated = "Use `set_buffer()` instead."] pub fn buffer(&mut self, val: Option<&AudioBuffer>) -> &mut Self { self.set_buffer(val); self } - #[doc = "Change the `detune` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceOptions`*"] + #[deprecated = "Use `set_detune()` instead."] pub fn detune(&mut self, val: f32) -> &mut Self { self.set_detune(val); self } - #[doc = "Change the `loop` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceOptions`*"] + #[deprecated = "Use `set_loop()` instead."] pub fn loop_(&mut self, val: bool) -> &mut Self { self.set_loop(val); self } - #[doc = "Change the `loopEnd` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceOptions`*"] + #[deprecated = "Use `set_loop_end()` instead."] pub fn loop_end(&mut self, val: f64) -> &mut Self { self.set_loop_end(val); self } - #[doc = "Change the `loopStart` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceOptions`*"] + #[deprecated = "Use `set_loop_start()` instead."] pub fn loop_start(&mut self, val: f64) -> &mut Self { self.set_loop_start(val); self } - #[doc = "Change the `playbackRate` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceOptions`*"] + #[deprecated = "Use `set_playback_rate()` instead."] pub fn playback_rate(&mut self, val: f32) -> &mut Self { self.set_playback_rate(val); self diff --git a/crates/web-sys/src/features/gen_AudioConfiguration.rs b/crates/web-sys/src/features/gen_AudioConfiguration.rs index fce05a75e718..decab4a0fef6 100644 --- a/crates/web-sys/src/features/gen_AudioConfiguration.rs +++ b/crates/web-sys/src/features/gen_AudioConfiguration.rs @@ -15,29 +15,41 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`*"] #[wasm_bindgen(method, getter = "bitrate")] pub fn get_bitrate(this: &AudioConfiguration) -> Option; + #[doc = "Change the `bitrate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`*"] #[wasm_bindgen(method, setter = "bitrate")] - fn set_bitrate(this: &AudioConfiguration, val: f64); + pub fn set_bitrate(this: &AudioConfiguration, val: f64); #[doc = "Get the `channels` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`*"] #[wasm_bindgen(method, getter = "channels")] pub fn get_channels(this: &AudioConfiguration) -> Option; + #[doc = "Change the `channels` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`*"] #[wasm_bindgen(method, setter = "channels")] - fn set_channels(this: &AudioConfiguration, val: &str); + pub fn set_channels(this: &AudioConfiguration, val: &str); #[doc = "Get the `contentType` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`*"] #[wasm_bindgen(method, getter = "contentType")] pub fn get_content_type(this: &AudioConfiguration) -> Option; + #[doc = "Change the `contentType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`*"] #[wasm_bindgen(method, setter = "contentType")] - fn set_content_type(this: &AudioConfiguration, val: &str); + pub fn set_content_type(this: &AudioConfiguration, val: &str); #[doc = "Get the `samplerate` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`*"] #[wasm_bindgen(method, getter = "samplerate")] pub fn get_samplerate(this: &AudioConfiguration) -> Option; + #[doc = "Change the `samplerate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`*"] #[wasm_bindgen(method, setter = "samplerate")] - fn set_samplerate(this: &AudioConfiguration, val: u32); + pub fn set_samplerate(this: &AudioConfiguration, val: u32); } impl AudioConfiguration { #[doc = "Construct a new `AudioConfiguration`."] @@ -48,30 +60,22 @@ impl AudioConfiguration { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bitrate` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`*"] + #[deprecated = "Use `set_bitrate()` instead."] pub fn bitrate(&mut self, val: f64) -> &mut Self { self.set_bitrate(val); self } - #[doc = "Change the `channels` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`*"] + #[deprecated = "Use `set_channels()` instead."] pub fn channels(&mut self, val: &str) -> &mut Self { self.set_channels(val); self } - #[doc = "Change the `contentType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`*"] + #[deprecated = "Use `set_content_type()` instead."] pub fn content_type(&mut self, val: &str) -> &mut Self { self.set_content_type(val); self } - #[doc = "Change the `samplerate` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`*"] + #[deprecated = "Use `set_samplerate()` instead."] pub fn samplerate(&mut self, val: u32) -> &mut Self { self.set_samplerate(val); self diff --git a/crates/web-sys/src/features/gen_AudioContextOptions.rs b/crates/web-sys/src/features/gen_AudioContextOptions.rs index cb3111307552..1ca0ae1e9f85 100644 --- a/crates/web-sys/src/features/gen_AudioContextOptions.rs +++ b/crates/web-sys/src/features/gen_AudioContextOptions.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `AudioContextOptions`*"] #[wasm_bindgen(method, getter = "latencyHint")] pub fn get_latency_hint(this: &AudioContextOptions) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `latencyHint` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioContextOptions`*"] #[wasm_bindgen(method, setter = "latencyHint")] - fn set_latency_hint(this: &AudioContextOptions, val: &::wasm_bindgen::JsValue); + pub fn set_latency_hint(this: &AudioContextOptions, val: &::wasm_bindgen::JsValue); #[doc = "Get the `sampleRate` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioContextOptions`*"] #[wasm_bindgen(method, getter = "sampleRate")] pub fn get_sample_rate(this: &AudioContextOptions) -> Option; + #[doc = "Change the `sampleRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioContextOptions`*"] #[wasm_bindgen(method, setter = "sampleRate")] - fn set_sample_rate(this: &AudioContextOptions, val: f32); + pub fn set_sample_rate(this: &AudioContextOptions, val: f32); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `sinkId` field of this object."] #[doc = ""] @@ -33,8 +39,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "sinkId")] pub fn get_sink_id(this: &AudioContextOptions) -> ::wasm_bindgen::JsValue; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `sinkId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioContextOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "sinkId")] - fn set_sink_id(this: &AudioContextOptions, val: &::wasm_bindgen::JsValue); + pub fn set_sink_id(this: &AudioContextOptions, val: &::wasm_bindgen::JsValue); } impl AudioContextOptions { #[doc = "Construct a new `AudioContextOptions`."] @@ -45,27 +58,18 @@ impl AudioContextOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `latencyHint` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioContextOptions`*"] + #[deprecated = "Use `set_latency_hint()` instead."] pub fn latency_hint(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_latency_hint(val); self } - #[doc = "Change the `sampleRate` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioContextOptions`*"] + #[deprecated = "Use `set_sample_rate()` instead."] pub fn sample_rate(&mut self, val: f32) -> &mut Self { self.set_sample_rate(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `sinkId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioContextOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_sink_id()` instead."] pub fn sink_id(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_sink_id(val); self diff --git a/crates/web-sys/src/features/gen_AudioDataCopyToOptions.rs b/crates/web-sys/src/features/gen_AudioDataCopyToOptions.rs index e352e3ebc5c0..bf135f78eb83 100644 --- a/crates/web-sys/src/features/gen_AudioDataCopyToOptions.rs +++ b/crates/web-sys/src/features/gen_AudioDataCopyToOptions.rs @@ -24,9 +24,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "format")] pub fn get_format(this: &AudioDataCopyToOptions) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "AudioSampleFormat")] + #[doc = "Change the `format` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDataCopyToOptions`, `AudioSampleFormat`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "format")] - fn set_format(this: &AudioDataCopyToOptions, val: AudioSampleFormat); + pub fn set_format(this: &AudioDataCopyToOptions, val: AudioSampleFormat); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `frameCount` field of this object."] #[doc = ""] @@ -36,8 +43,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "frameCount")] pub fn get_frame_count(this: &AudioDataCopyToOptions) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `frameCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDataCopyToOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "frameCount")] - fn set_frame_count(this: &AudioDataCopyToOptions, val: u32); + pub fn set_frame_count(this: &AudioDataCopyToOptions, val: u32); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `frameOffset` field of this object."] #[doc = ""] @@ -47,8 +61,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "frameOffset")] pub fn get_frame_offset(this: &AudioDataCopyToOptions) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `frameOffset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDataCopyToOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "frameOffset")] - fn set_frame_offset(this: &AudioDataCopyToOptions, val: u32); + pub fn set_frame_offset(this: &AudioDataCopyToOptions, val: u32); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `planeIndex` field of this object."] #[doc = ""] @@ -58,8 +79,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "planeIndex")] pub fn get_plane_index(this: &AudioDataCopyToOptions) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `planeIndex` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDataCopyToOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "planeIndex")] - fn set_plane_index(this: &AudioDataCopyToOptions, val: u32); + pub fn set_plane_index(this: &AudioDataCopyToOptions, val: u32); } #[cfg(web_sys_unstable_apis)] impl AudioDataCopyToOptions { @@ -77,45 +105,25 @@ impl AudioDataCopyToOptions { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "AudioSampleFormat")] - #[doc = "Change the `format` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioDataCopyToOptions`, `AudioSampleFormat`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_format()` instead."] pub fn format(&mut self, val: AudioSampleFormat) -> &mut Self { self.set_format(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `frameCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioDataCopyToOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_frame_count()` instead."] pub fn frame_count(&mut self, val: u32) -> &mut Self { self.set_frame_count(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `frameOffset` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioDataCopyToOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_frame_offset()` instead."] pub fn frame_offset(&mut self, val: u32) -> &mut Self { self.set_frame_offset(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `planeIndex` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioDataCopyToOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_plane_index()` instead."] pub fn plane_index(&mut self, val: u32) -> &mut Self { self.set_plane_index(val); self diff --git a/crates/web-sys/src/features/gen_AudioDataInit.rs b/crates/web-sys/src/features/gen_AudioDataInit.rs index 673ba49c3028..29ea0c0183d2 100644 --- a/crates/web-sys/src/features/gen_AudioDataInit.rs +++ b/crates/web-sys/src/features/gen_AudioDataInit.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "data")] pub fn get_data(this: &AudioDataInit) -> ::js_sys::Object; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDataInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "data")] - fn set_data(this: &AudioDataInit, val: &::js_sys::Object); + pub fn set_data(this: &AudioDataInit, val: &::js_sys::Object); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "AudioSampleFormat")] #[doc = "Get the `format` field of this object."] @@ -35,9 +42,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "format")] pub fn get_format(this: &AudioDataInit) -> AudioSampleFormat; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "AudioSampleFormat")] + #[doc = "Change the `format` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDataInit`, `AudioSampleFormat`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "format")] - fn set_format(this: &AudioDataInit, val: AudioSampleFormat); + pub fn set_format(this: &AudioDataInit, val: AudioSampleFormat); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `numberOfChannels` field of this object."] #[doc = ""] @@ -47,8 +61,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "numberOfChannels")] pub fn get_number_of_channels(this: &AudioDataInit) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `numberOfChannels` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDataInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "numberOfChannels")] - fn set_number_of_channels(this: &AudioDataInit, val: u32); + pub fn set_number_of_channels(this: &AudioDataInit, val: u32); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `numberOfFrames` field of this object."] #[doc = ""] @@ -58,8 +79,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "numberOfFrames")] pub fn get_number_of_frames(this: &AudioDataInit) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `numberOfFrames` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDataInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "numberOfFrames")] - fn set_number_of_frames(this: &AudioDataInit, val: u32); + pub fn set_number_of_frames(this: &AudioDataInit, val: u32); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `sampleRate` field of this object."] #[doc = ""] @@ -69,8 +97,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "sampleRate")] pub fn get_sample_rate(this: &AudioDataInit) -> f32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `sampleRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDataInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "sampleRate")] - fn set_sample_rate(this: &AudioDataInit, val: f32); + pub fn set_sample_rate(this: &AudioDataInit, val: f32); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `timestamp` field of this object."] #[doc = ""] @@ -80,8 +115,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "timestamp")] pub fn get_timestamp(this: &AudioDataInit) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDataInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "timestamp")] - fn set_timestamp(this: &AudioDataInit, val: f64); + pub fn set_timestamp(this: &AudioDataInit, val: f64); } #[cfg(web_sys_unstable_apis)] impl AudioDataInit { @@ -111,68 +153,38 @@ impl AudioDataInit { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `data` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioDataInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_data()` instead."] pub fn data(&mut self, val: &::js_sys::Object) -> &mut Self { self.set_data(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "AudioSampleFormat")] - #[doc = "Change the `format` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioDataInit`, `AudioSampleFormat`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_format()` instead."] pub fn format(&mut self, val: AudioSampleFormat) -> &mut Self { self.set_format(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `numberOfChannels` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioDataInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_number_of_channels()` instead."] pub fn number_of_channels(&mut self, val: u32) -> &mut Self { self.set_number_of_channels(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `numberOfFrames` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioDataInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_number_of_frames()` instead."] pub fn number_of_frames(&mut self, val: u32) -> &mut Self { self.set_number_of_frames(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `sampleRate` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioDataInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_sample_rate()` instead."] pub fn sample_rate(&mut self, val: f32) -> &mut Self { self.set_sample_rate(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `timestamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioDataInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_timestamp()` instead."] pub fn timestamp(&mut self, val: f64) -> &mut Self { self.set_timestamp(val); self diff --git a/crates/web-sys/src/features/gen_AudioDecoderConfig.rs b/crates/web-sys/src/features/gen_AudioDecoderConfig.rs index 2b61f72f208d..7b4c8eddb02b 100644 --- a/crates/web-sys/src/features/gen_AudioDecoderConfig.rs +++ b/crates/web-sys/src/features/gen_AudioDecoderConfig.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "codec")] pub fn get_codec(this: &AudioDecoderConfig) -> String; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `codec` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDecoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "codec")] - fn set_codec(this: &AudioDecoderConfig, val: &str); + pub fn set_codec(this: &AudioDecoderConfig, val: &str); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `description` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "description")] pub fn get_description(this: &AudioDecoderConfig) -> Option<::js_sys::Object>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `description` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDecoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "description")] - fn set_description(this: &AudioDecoderConfig, val: &::js_sys::Object); + pub fn set_description(this: &AudioDecoderConfig, val: &::js_sys::Object); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `numberOfChannels` field of this object."] #[doc = ""] @@ -45,8 +59,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "numberOfChannels")] pub fn get_number_of_channels(this: &AudioDecoderConfig) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `numberOfChannels` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDecoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "numberOfChannels")] - fn set_number_of_channels(this: &AudioDecoderConfig, val: u32); + pub fn set_number_of_channels(this: &AudioDecoderConfig, val: u32); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `sampleRate` field of this object."] #[doc = ""] @@ -56,8 +77,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "sampleRate")] pub fn get_sample_rate(this: &AudioDecoderConfig) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `sampleRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDecoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "sampleRate")] - fn set_sample_rate(this: &AudioDecoderConfig, val: u32); + pub fn set_sample_rate(this: &AudioDecoderConfig, val: u32); } #[cfg(web_sys_unstable_apis)] impl AudioDecoderConfig { @@ -76,45 +104,25 @@ impl AudioDecoderConfig { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `codec` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioDecoderConfig`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_codec()` instead."] pub fn codec(&mut self, val: &str) -> &mut Self { self.set_codec(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `description` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioDecoderConfig`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_description()` instead."] pub fn description(&mut self, val: &::js_sys::Object) -> &mut Self { self.set_description(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `numberOfChannels` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioDecoderConfig`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_number_of_channels()` instead."] pub fn number_of_channels(&mut self, val: u32) -> &mut Self { self.set_number_of_channels(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `sampleRate` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioDecoderConfig`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_sample_rate()` instead."] pub fn sample_rate(&mut self, val: u32) -> &mut Self { self.set_sample_rate(val); self diff --git a/crates/web-sys/src/features/gen_AudioDecoderInit.rs b/crates/web-sys/src/features/gen_AudioDecoderInit.rs index d851bb14150e..54a467b8bf47 100644 --- a/crates/web-sys/src/features/gen_AudioDecoderInit.rs +++ b/crates/web-sys/src/features/gen_AudioDecoderInit.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "error")] pub fn get_error(this: &AudioDecoderInit) -> ::js_sys::Function; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `error` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDecoderInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "error")] - fn set_error(this: &AudioDecoderInit, val: &::js_sys::Function); + pub fn set_error(this: &AudioDecoderInit, val: &::js_sys::Function); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `output` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "output")] pub fn get_output(this: &AudioDecoderInit) -> ::js_sys::Function; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `output` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDecoderInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "output")] - fn set_output(this: &AudioDecoderInit, val: &::js_sys::Function); + pub fn set_output(this: &AudioDecoderInit, val: &::js_sys::Function); } #[cfg(web_sys_unstable_apis)] impl AudioDecoderInit { @@ -53,23 +67,13 @@ impl AudioDecoderInit { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `error` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioDecoderInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_error()` instead."] pub fn error(&mut self, val: &::js_sys::Function) -> &mut Self { self.set_error(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `output` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioDecoderInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_output()` instead."] pub fn output(&mut self, val: &::js_sys::Function) -> &mut Self { self.set_output(val); self diff --git a/crates/web-sys/src/features/gen_AudioDecoderSupport.rs b/crates/web-sys/src/features/gen_AudioDecoderSupport.rs index 0bf198b2061c..eb1a3fa72cc8 100644 --- a/crates/web-sys/src/features/gen_AudioDecoderSupport.rs +++ b/crates/web-sys/src/features/gen_AudioDecoderSupport.rs @@ -24,9 +24,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "config")] pub fn get_config(this: &AudioDecoderSupport) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "AudioDecoderConfig")] + #[doc = "Change the `config` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDecoderConfig`, `AudioDecoderSupport`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "config")] - fn set_config(this: &AudioDecoderSupport, val: &AudioDecoderConfig); + pub fn set_config(this: &AudioDecoderSupport, val: &AudioDecoderConfig); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `supported` field of this object."] #[doc = ""] @@ -36,8 +43,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "supported")] pub fn get_supported(this: &AudioDecoderSupport) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `supported` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDecoderSupport`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "supported")] - fn set_supported(this: &AudioDecoderSupport, val: bool); + pub fn set_supported(this: &AudioDecoderSupport, val: bool); } #[cfg(web_sys_unstable_apis)] impl AudioDecoderSupport { @@ -54,23 +68,13 @@ impl AudioDecoderSupport { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "AudioDecoderConfig")] - #[doc = "Change the `config` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioDecoderConfig`, `AudioDecoderSupport`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_config()` instead."] pub fn config(&mut self, val: &AudioDecoderConfig) -> &mut Self { self.set_config(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `supported` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioDecoderSupport`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_supported()` instead."] pub fn supported(&mut self, val: bool) -> &mut Self { self.set_supported(val); self diff --git a/crates/web-sys/src/features/gen_AudioEncoderConfig.rs b/crates/web-sys/src/features/gen_AudioEncoderConfig.rs index 017f12a8cc49..4e15edfcb1a2 100644 --- a/crates/web-sys/src/features/gen_AudioEncoderConfig.rs +++ b/crates/web-sys/src/features/gen_AudioEncoderConfig.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "bitrate")] pub fn get_bitrate(this: &AudioEncoderConfig) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `bitrate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioEncoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "bitrate")] - fn set_bitrate(this: &AudioEncoderConfig, val: f64); + pub fn set_bitrate(this: &AudioEncoderConfig, val: f64); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `codec` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "codec")] pub fn get_codec(this: &AudioEncoderConfig) -> String; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `codec` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioEncoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "codec")] - fn set_codec(this: &AudioEncoderConfig, val: &str); + pub fn set_codec(this: &AudioEncoderConfig, val: &str); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `numberOfChannels` field of this object."] #[doc = ""] @@ -45,8 +59,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "numberOfChannels")] pub fn get_number_of_channels(this: &AudioEncoderConfig) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `numberOfChannels` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioEncoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "numberOfChannels")] - fn set_number_of_channels(this: &AudioEncoderConfig, val: u32); + pub fn set_number_of_channels(this: &AudioEncoderConfig, val: u32); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `sampleRate` field of this object."] #[doc = ""] @@ -56,8 +77,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "sampleRate")] pub fn get_sample_rate(this: &AudioEncoderConfig) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `sampleRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioEncoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "sampleRate")] - fn set_sample_rate(this: &AudioEncoderConfig, val: u32); + pub fn set_sample_rate(this: &AudioEncoderConfig, val: u32); } #[cfg(web_sys_unstable_apis)] impl AudioEncoderConfig { @@ -74,45 +102,25 @@ impl AudioEncoderConfig { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `bitrate` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioEncoderConfig`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_bitrate()` instead."] pub fn bitrate(&mut self, val: f64) -> &mut Self { self.set_bitrate(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `codec` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioEncoderConfig`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_codec()` instead."] pub fn codec(&mut self, val: &str) -> &mut Self { self.set_codec(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `numberOfChannels` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioEncoderConfig`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_number_of_channels()` instead."] pub fn number_of_channels(&mut self, val: u32) -> &mut Self { self.set_number_of_channels(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `sampleRate` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioEncoderConfig`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_sample_rate()` instead."] pub fn sample_rate(&mut self, val: u32) -> &mut Self { self.set_sample_rate(val); self diff --git a/crates/web-sys/src/features/gen_AudioEncoderInit.rs b/crates/web-sys/src/features/gen_AudioEncoderInit.rs index ac5f388404a0..95ee7e292c96 100644 --- a/crates/web-sys/src/features/gen_AudioEncoderInit.rs +++ b/crates/web-sys/src/features/gen_AudioEncoderInit.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "error")] pub fn get_error(this: &AudioEncoderInit) -> ::js_sys::Function; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `error` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioEncoderInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "error")] - fn set_error(this: &AudioEncoderInit, val: &::js_sys::Function); + pub fn set_error(this: &AudioEncoderInit, val: &::js_sys::Function); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `output` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "output")] pub fn get_output(this: &AudioEncoderInit) -> ::js_sys::Function; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `output` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioEncoderInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "output")] - fn set_output(this: &AudioEncoderInit, val: &::js_sys::Function); + pub fn set_output(this: &AudioEncoderInit, val: &::js_sys::Function); } #[cfg(web_sys_unstable_apis)] impl AudioEncoderInit { @@ -53,23 +67,13 @@ impl AudioEncoderInit { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `error` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioEncoderInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_error()` instead."] pub fn error(&mut self, val: &::js_sys::Function) -> &mut Self { self.set_error(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `output` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioEncoderInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_output()` instead."] pub fn output(&mut self, val: &::js_sys::Function) -> &mut Self { self.set_output(val); self diff --git a/crates/web-sys/src/features/gen_AudioEncoderSupport.rs b/crates/web-sys/src/features/gen_AudioEncoderSupport.rs index 5148c47cb131..20399d865245 100644 --- a/crates/web-sys/src/features/gen_AudioEncoderSupport.rs +++ b/crates/web-sys/src/features/gen_AudioEncoderSupport.rs @@ -24,9 +24,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "config")] pub fn get_config(this: &AudioEncoderSupport) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "AudioEncoderConfig")] + #[doc = "Change the `config` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioEncoderConfig`, `AudioEncoderSupport`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "config")] - fn set_config(this: &AudioEncoderSupport, val: &AudioEncoderConfig); + pub fn set_config(this: &AudioEncoderSupport, val: &AudioEncoderConfig); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `supported` field of this object."] #[doc = ""] @@ -36,8 +43,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "supported")] pub fn get_supported(this: &AudioEncoderSupport) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `supported` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioEncoderSupport`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "supported")] - fn set_supported(this: &AudioEncoderSupport, val: bool); + pub fn set_supported(this: &AudioEncoderSupport, val: bool); } #[cfg(web_sys_unstable_apis)] impl AudioEncoderSupport { @@ -54,23 +68,13 @@ impl AudioEncoderSupport { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "AudioEncoderConfig")] - #[doc = "Change the `config` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioEncoderConfig`, `AudioEncoderSupport`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_config()` instead."] pub fn config(&mut self, val: &AudioEncoderConfig) -> &mut Self { self.set_config(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `supported` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioEncoderSupport`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_supported()` instead."] pub fn supported(&mut self, val: bool) -> &mut Self { self.set_supported(val); self diff --git a/crates/web-sys/src/features/gen_AudioNodeOptions.rs b/crates/web-sys/src/features/gen_AudioNodeOptions.rs index d31db6706d3b..84c6ab328727 100644 --- a/crates/web-sys/src/features/gen_AudioNodeOptions.rs +++ b/crates/web-sys/src/features/gen_AudioNodeOptions.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `AudioNodeOptions`*"] #[wasm_bindgen(method, getter = "channelCount")] pub fn get_channel_count(this: &AudioNodeOptions) -> Option; + #[doc = "Change the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioNodeOptions`*"] #[wasm_bindgen(method, setter = "channelCount")] - fn set_channel_count(this: &AudioNodeOptions, val: u32); + pub fn set_channel_count(this: &AudioNodeOptions, val: u32); #[cfg(feature = "ChannelCountMode")] #[doc = "Get the `channelCountMode` field of this object."] #[doc = ""] @@ -24,8 +27,11 @@ extern "C" { #[wasm_bindgen(method, getter = "channelCountMode")] pub fn get_channel_count_mode(this: &AudioNodeOptions) -> Option; #[cfg(feature = "ChannelCountMode")] + #[doc = "Change the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioNodeOptions`, `ChannelCountMode`*"] #[wasm_bindgen(method, setter = "channelCountMode")] - fn set_channel_count_mode(this: &AudioNodeOptions, val: ChannelCountMode); + pub fn set_channel_count_mode(this: &AudioNodeOptions, val: ChannelCountMode); #[cfg(feature = "ChannelInterpretation")] #[doc = "Get the `channelInterpretation` field of this object."] #[doc = ""] @@ -33,8 +39,11 @@ extern "C" { #[wasm_bindgen(method, getter = "channelInterpretation")] pub fn get_channel_interpretation(this: &AudioNodeOptions) -> Option; #[cfg(feature = "ChannelInterpretation")] + #[doc = "Change the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioNodeOptions`, `ChannelInterpretation`*"] #[wasm_bindgen(method, setter = "channelInterpretation")] - fn set_channel_interpretation(this: &AudioNodeOptions, val: ChannelInterpretation); + pub fn set_channel_interpretation(this: &AudioNodeOptions, val: ChannelInterpretation); } impl AudioNodeOptions { #[doc = "Construct a new `AudioNodeOptions`."] @@ -45,25 +54,19 @@ impl AudioNodeOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `channelCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioNodeOptions`*"] + #[deprecated = "Use `set_channel_count()` instead."] pub fn channel_count(&mut self, val: u32) -> &mut Self { self.set_channel_count(val); self } #[cfg(feature = "ChannelCountMode")] - #[doc = "Change the `channelCountMode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioNodeOptions`, `ChannelCountMode`*"] + #[deprecated = "Use `set_channel_count_mode()` instead."] pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self { self.set_channel_count_mode(val); self } #[cfg(feature = "ChannelInterpretation")] - #[doc = "Change the `channelInterpretation` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioNodeOptions`, `ChannelInterpretation`*"] + #[deprecated = "Use `set_channel_interpretation()` instead."] pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self { self.set_channel_interpretation(val); self diff --git a/crates/web-sys/src/features/gen_AudioSinkOptions.rs b/crates/web-sys/src/features/gen_AudioSinkOptions.rs index f6f0f9dfdbcc..6918a4c0587d 100644 --- a/crates/web-sys/src/features/gen_AudioSinkOptions.rs +++ b/crates/web-sys/src/features/gen_AudioSinkOptions.rs @@ -24,9 +24,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "type")] pub fn get_type(this: &AudioSinkOptions) -> AudioSinkType; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "AudioSinkType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioSinkOptions`, `AudioSinkType`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "type")] - fn set_type(this: &AudioSinkOptions, val: AudioSinkType); + pub fn set_type(this: &AudioSinkOptions, val: AudioSinkType); } #[cfg(web_sys_unstable_apis)] impl AudioSinkOptions { @@ -45,12 +52,7 @@ impl AudioSinkOptions { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "AudioSinkType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioSinkOptions`, `AudioSinkType`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: AudioSinkType) -> &mut Self { self.set_type(val); self diff --git a/crates/web-sys/src/features/gen_AudioWorkletNodeOptions.rs b/crates/web-sys/src/features/gen_AudioWorkletNodeOptions.rs index a9bb7fdc36d7..82c717bde6ba 100644 --- a/crates/web-sys/src/features/gen_AudioWorkletNodeOptions.rs +++ b/crates/web-sys/src/features/gen_AudioWorkletNodeOptions.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"] #[wasm_bindgen(method, getter = "channelCount")] pub fn get_channel_count(this: &AudioWorkletNodeOptions) -> Option; + #[doc = "Change the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"] #[wasm_bindgen(method, setter = "channelCount")] - fn set_channel_count(this: &AudioWorkletNodeOptions, val: u32); + pub fn set_channel_count(this: &AudioWorkletNodeOptions, val: u32); #[cfg(feature = "ChannelCountMode")] #[doc = "Get the `channelCountMode` field of this object."] #[doc = ""] @@ -24,8 +27,11 @@ extern "C" { #[wasm_bindgen(method, getter = "channelCountMode")] pub fn get_channel_count_mode(this: &AudioWorkletNodeOptions) -> Option; #[cfg(feature = "ChannelCountMode")] + #[doc = "Change the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`, `ChannelCountMode`*"] #[wasm_bindgen(method, setter = "channelCountMode")] - fn set_channel_count_mode(this: &AudioWorkletNodeOptions, val: ChannelCountMode); + pub fn set_channel_count_mode(this: &AudioWorkletNodeOptions, val: ChannelCountMode); #[cfg(feature = "ChannelInterpretation")] #[doc = "Get the `channelInterpretation` field of this object."] #[doc = ""] @@ -35,36 +41,51 @@ extern "C" { this: &AudioWorkletNodeOptions, ) -> Option; #[cfg(feature = "ChannelInterpretation")] + #[doc = "Change the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`, `ChannelInterpretation`*"] #[wasm_bindgen(method, setter = "channelInterpretation")] - fn set_channel_interpretation(this: &AudioWorkletNodeOptions, val: ChannelInterpretation); + pub fn set_channel_interpretation(this: &AudioWorkletNodeOptions, val: ChannelInterpretation); #[doc = "Get the `numberOfInputs` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"] #[wasm_bindgen(method, getter = "numberOfInputs")] pub fn get_number_of_inputs(this: &AudioWorkletNodeOptions) -> Option; + #[doc = "Change the `numberOfInputs` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"] #[wasm_bindgen(method, setter = "numberOfInputs")] - fn set_number_of_inputs(this: &AudioWorkletNodeOptions, val: u32); + pub fn set_number_of_inputs(this: &AudioWorkletNodeOptions, val: u32); #[doc = "Get the `numberOfOutputs` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"] #[wasm_bindgen(method, getter = "numberOfOutputs")] pub fn get_number_of_outputs(this: &AudioWorkletNodeOptions) -> Option; + #[doc = "Change the `numberOfOutputs` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"] #[wasm_bindgen(method, setter = "numberOfOutputs")] - fn set_number_of_outputs(this: &AudioWorkletNodeOptions, val: u32); + pub fn set_number_of_outputs(this: &AudioWorkletNodeOptions, val: u32); #[doc = "Get the `outputChannelCount` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"] #[wasm_bindgen(method, getter = "outputChannelCount")] pub fn get_output_channel_count(this: &AudioWorkletNodeOptions) -> Option<::js_sys::Array>; + #[doc = "Change the `outputChannelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"] #[wasm_bindgen(method, setter = "outputChannelCount")] - fn set_output_channel_count(this: &AudioWorkletNodeOptions, val: &::wasm_bindgen::JsValue); + pub fn set_output_channel_count(this: &AudioWorkletNodeOptions, val: &::wasm_bindgen::JsValue); #[doc = "Get the `processorOptions` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"] #[wasm_bindgen(method, getter = "processorOptions")] pub fn get_processor_options(this: &AudioWorkletNodeOptions) -> Option<::js_sys::Object>; + #[doc = "Change the `processorOptions` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"] #[wasm_bindgen(method, setter = "processorOptions")] - fn set_processor_options(this: &AudioWorkletNodeOptions, val: Option<&::js_sys::Object>); + pub fn set_processor_options(this: &AudioWorkletNodeOptions, val: Option<&::js_sys::Object>); } impl AudioWorkletNodeOptions { #[doc = "Construct a new `AudioWorkletNodeOptions`."] @@ -75,53 +96,39 @@ impl AudioWorkletNodeOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `channelCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"] + #[deprecated = "Use `set_channel_count()` instead."] pub fn channel_count(&mut self, val: u32) -> &mut Self { self.set_channel_count(val); self } #[cfg(feature = "ChannelCountMode")] - #[doc = "Change the `channelCountMode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`, `ChannelCountMode`*"] + #[deprecated = "Use `set_channel_count_mode()` instead."] pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self { self.set_channel_count_mode(val); self } #[cfg(feature = "ChannelInterpretation")] - #[doc = "Change the `channelInterpretation` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`, `ChannelInterpretation`*"] + #[deprecated = "Use `set_channel_interpretation()` instead."] pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self { self.set_channel_interpretation(val); self } - #[doc = "Change the `numberOfInputs` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"] + #[deprecated = "Use `set_number_of_inputs()` instead."] pub fn number_of_inputs(&mut self, val: u32) -> &mut Self { self.set_number_of_inputs(val); self } - #[doc = "Change the `numberOfOutputs` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"] + #[deprecated = "Use `set_number_of_outputs()` instead."] pub fn number_of_outputs(&mut self, val: u32) -> &mut Self { self.set_number_of_outputs(val); self } - #[doc = "Change the `outputChannelCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"] + #[deprecated = "Use `set_output_channel_count()` instead."] pub fn output_channel_count(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_output_channel_count(val); self } - #[doc = "Change the `processorOptions` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"] + #[deprecated = "Use `set_processor_options()` instead."] pub fn processor_options(&mut self, val: Option<&::js_sys::Object>) -> &mut Self { self.set_processor_options(val); self diff --git a/crates/web-sys/src/features/gen_AuthenticationExtensionsClientInputs.rs b/crates/web-sys/src/features/gen_AuthenticationExtensionsClientInputs.rs index c169f22376f8..1439f6b4d5d8 100644 --- a/crates/web-sys/src/features/gen_AuthenticationExtensionsClientInputs.rs +++ b/crates/web-sys/src/features/gen_AuthenticationExtensionsClientInputs.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientInputs`*"] #[wasm_bindgen(method, getter = "appid")] pub fn get_appid(this: &AuthenticationExtensionsClientInputs) -> Option; + #[doc = "Change the `appid` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientInputs`*"] #[wasm_bindgen(method, setter = "appid")] - fn set_appid(this: &AuthenticationExtensionsClientInputs, val: &str); + pub fn set_appid(this: &AuthenticationExtensionsClientInputs, val: &str); } impl AuthenticationExtensionsClientInputs { #[doc = "Construct a new `AuthenticationExtensionsClientInputs`."] @@ -27,9 +30,7 @@ impl AuthenticationExtensionsClientInputs { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `appid` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientInputs`*"] + #[deprecated = "Use `set_appid()` instead."] pub fn appid(&mut self, val: &str) -> &mut Self { self.set_appid(val); self diff --git a/crates/web-sys/src/features/gen_AuthenticationExtensionsClientOutputs.rs b/crates/web-sys/src/features/gen_AuthenticationExtensionsClientOutputs.rs index b92e02ead383..46cfeb952c94 100644 --- a/crates/web-sys/src/features/gen_AuthenticationExtensionsClientOutputs.rs +++ b/crates/web-sys/src/features/gen_AuthenticationExtensionsClientOutputs.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientOutputs`*"] #[wasm_bindgen(method, getter = "appid")] pub fn get_appid(this: &AuthenticationExtensionsClientOutputs) -> Option; + #[doc = "Change the `appid` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientOutputs`*"] #[wasm_bindgen(method, setter = "appid")] - fn set_appid(this: &AuthenticationExtensionsClientOutputs, val: bool); + pub fn set_appid(this: &AuthenticationExtensionsClientOutputs, val: bool); } impl AuthenticationExtensionsClientOutputs { #[doc = "Construct a new `AuthenticationExtensionsClientOutputs`."] @@ -27,9 +30,7 @@ impl AuthenticationExtensionsClientOutputs { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `appid` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientOutputs`*"] + #[deprecated = "Use `set_appid()` instead."] pub fn appid(&mut self, val: bool) -> &mut Self { self.set_appid(val); self diff --git a/crates/web-sys/src/features/gen_AuthenticatorSelectionCriteria.rs b/crates/web-sys/src/features/gen_AuthenticatorSelectionCriteria.rs index c011fce380ac..cd8f0e36453d 100644 --- a/crates/web-sys/src/features/gen_AuthenticatorSelectionCriteria.rs +++ b/crates/web-sys/src/features/gen_AuthenticatorSelectionCriteria.rs @@ -19,8 +19,11 @@ extern "C" { this: &AuthenticatorSelectionCriteria, ) -> Option; #[cfg(feature = "AuthenticatorAttachment")] + #[doc = "Change the `authenticatorAttachment` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAttachment`, `AuthenticatorSelectionCriteria`*"] #[wasm_bindgen(method, setter = "authenticatorAttachment")] - fn set_authenticator_attachment( + pub fn set_authenticator_attachment( this: &AuthenticatorSelectionCriteria, val: AuthenticatorAttachment, ); @@ -29,8 +32,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `AuthenticatorSelectionCriteria`*"] #[wasm_bindgen(method, getter = "requireResidentKey")] pub fn get_require_resident_key(this: &AuthenticatorSelectionCriteria) -> Option; + #[doc = "Change the `requireResidentKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AuthenticatorSelectionCriteria`*"] #[wasm_bindgen(method, setter = "requireResidentKey")] - fn set_require_resident_key(this: &AuthenticatorSelectionCriteria, val: bool); + pub fn set_require_resident_key(this: &AuthenticatorSelectionCriteria, val: bool); #[cfg(feature = "UserVerificationRequirement")] #[doc = "Get the `userVerification` field of this object."] #[doc = ""] @@ -40,8 +46,11 @@ extern "C" { this: &AuthenticatorSelectionCriteria, ) -> Option; #[cfg(feature = "UserVerificationRequirement")] + #[doc = "Change the `userVerification` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AuthenticatorSelectionCriteria`, `UserVerificationRequirement`*"] #[wasm_bindgen(method, setter = "userVerification")] - fn set_user_verification( + pub fn set_user_verification( this: &AuthenticatorSelectionCriteria, val: UserVerificationRequirement, ); @@ -56,24 +65,18 @@ impl AuthenticatorSelectionCriteria { ret } #[cfg(feature = "AuthenticatorAttachment")] - #[doc = "Change the `authenticatorAttachment` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAttachment`, `AuthenticatorSelectionCriteria`*"] + #[deprecated = "Use `set_authenticator_attachment()` instead."] pub fn authenticator_attachment(&mut self, val: AuthenticatorAttachment) -> &mut Self { self.set_authenticator_attachment(val); self } - #[doc = "Change the `requireResidentKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AuthenticatorSelectionCriteria`*"] + #[deprecated = "Use `set_require_resident_key()` instead."] pub fn require_resident_key(&mut self, val: bool) -> &mut Self { self.set_require_resident_key(val); self } #[cfg(feature = "UserVerificationRequirement")] - #[doc = "Change the `userVerification` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AuthenticatorSelectionCriteria`, `UserVerificationRequirement`*"] + #[deprecated = "Use `set_user_verification()` instead."] pub fn user_verification(&mut self, val: UserVerificationRequirement) -> &mut Self { self.set_user_verification(val); self diff --git a/crates/web-sys/src/features/gen_AutocompleteInfo.rs b/crates/web-sys/src/features/gen_AutocompleteInfo.rs index d66b7a2a41b9..a1da9bb5b112 100644 --- a/crates/web-sys/src/features/gen_AutocompleteInfo.rs +++ b/crates/web-sys/src/features/gen_AutocompleteInfo.rs @@ -15,29 +15,41 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `AutocompleteInfo`*"] #[wasm_bindgen(method, getter = "addressType")] pub fn get_address_type(this: &AutocompleteInfo) -> Option; + #[doc = "Change the `addressType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AutocompleteInfo`*"] #[wasm_bindgen(method, setter = "addressType")] - fn set_address_type(this: &AutocompleteInfo, val: &str); + pub fn set_address_type(this: &AutocompleteInfo, val: &str); #[doc = "Get the `contactType` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AutocompleteInfo`*"] #[wasm_bindgen(method, getter = "contactType")] pub fn get_contact_type(this: &AutocompleteInfo) -> Option; + #[doc = "Change the `contactType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AutocompleteInfo`*"] #[wasm_bindgen(method, setter = "contactType")] - fn set_contact_type(this: &AutocompleteInfo, val: &str); + pub fn set_contact_type(this: &AutocompleteInfo, val: &str); #[doc = "Get the `fieldName` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AutocompleteInfo`*"] #[wasm_bindgen(method, getter = "fieldName")] pub fn get_field_name(this: &AutocompleteInfo) -> Option; + #[doc = "Change the `fieldName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AutocompleteInfo`*"] #[wasm_bindgen(method, setter = "fieldName")] - fn set_field_name(this: &AutocompleteInfo, val: &str); + pub fn set_field_name(this: &AutocompleteInfo, val: &str); #[doc = "Get the `section` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AutocompleteInfo`*"] #[wasm_bindgen(method, getter = "section")] pub fn get_section(this: &AutocompleteInfo) -> Option; + #[doc = "Change the `section` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AutocompleteInfo`*"] #[wasm_bindgen(method, setter = "section")] - fn set_section(this: &AutocompleteInfo, val: &str); + pub fn set_section(this: &AutocompleteInfo, val: &str); } impl AutocompleteInfo { #[doc = "Construct a new `AutocompleteInfo`."] @@ -48,30 +60,22 @@ impl AutocompleteInfo { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `addressType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AutocompleteInfo`*"] + #[deprecated = "Use `set_address_type()` instead."] pub fn address_type(&mut self, val: &str) -> &mut Self { self.set_address_type(val); self } - #[doc = "Change the `contactType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AutocompleteInfo`*"] + #[deprecated = "Use `set_contact_type()` instead."] pub fn contact_type(&mut self, val: &str) -> &mut Self { self.set_contact_type(val); self } - #[doc = "Change the `fieldName` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AutocompleteInfo`*"] + #[deprecated = "Use `set_field_name()` instead."] pub fn field_name(&mut self, val: &str) -> &mut Self { self.set_field_name(val); self } - #[doc = "Change the `section` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AutocompleteInfo`*"] + #[deprecated = "Use `set_section()` instead."] pub fn section(&mut self, val: &str) -> &mut Self { self.set_section(val); self diff --git a/crates/web-sys/src/features/gen_BaseComputedKeyframe.rs b/crates/web-sys/src/features/gen_BaseComputedKeyframe.rs index 444283065525..8626547052e2 100644 --- a/crates/web-sys/src/features/gen_BaseComputedKeyframe.rs +++ b/crates/web-sys/src/features/gen_BaseComputedKeyframe.rs @@ -17,36 +17,51 @@ extern "C" { #[wasm_bindgen(method, getter = "composite")] pub fn get_composite(this: &BaseComputedKeyframe) -> Option; #[cfg(feature = "CompositeOperation")] + #[doc = "Change the `composite` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`, `CompositeOperation`*"] #[wasm_bindgen(method, setter = "composite")] - fn set_composite(this: &BaseComputedKeyframe, val: Option); + pub fn set_composite(this: &BaseComputedKeyframe, val: Option); #[doc = "Get the `easing` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"] #[wasm_bindgen(method, getter = "easing")] pub fn get_easing(this: &BaseComputedKeyframe) -> Option; + #[doc = "Change the `easing` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"] #[wasm_bindgen(method, setter = "easing")] - fn set_easing(this: &BaseComputedKeyframe, val: &str); + pub fn set_easing(this: &BaseComputedKeyframe, val: &str); #[doc = "Get the `offset` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"] #[wasm_bindgen(method, getter = "offset")] pub fn get_offset(this: &BaseComputedKeyframe) -> Option; + #[doc = "Change the `offset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"] #[wasm_bindgen(method, setter = "offset")] - fn set_offset(this: &BaseComputedKeyframe, val: Option); + pub fn set_offset(this: &BaseComputedKeyframe, val: Option); #[doc = "Get the `simulateComputeValuesFailure` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"] #[wasm_bindgen(method, getter = "simulateComputeValuesFailure")] pub fn get_simulate_compute_values_failure(this: &BaseComputedKeyframe) -> Option; + #[doc = "Change the `simulateComputeValuesFailure` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"] #[wasm_bindgen(method, setter = "simulateComputeValuesFailure")] - fn set_simulate_compute_values_failure(this: &BaseComputedKeyframe, val: bool); + pub fn set_simulate_compute_values_failure(this: &BaseComputedKeyframe, val: bool); #[doc = "Get the `computedOffset` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"] #[wasm_bindgen(method, getter = "computedOffset")] pub fn get_computed_offset(this: &BaseComputedKeyframe) -> Option; + #[doc = "Change the `computedOffset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"] #[wasm_bindgen(method, setter = "computedOffset")] - fn set_computed_offset(this: &BaseComputedKeyframe, val: f64); + pub fn set_computed_offset(this: &BaseComputedKeyframe, val: f64); } impl BaseComputedKeyframe { #[doc = "Construct a new `BaseComputedKeyframe`."] @@ -58,37 +73,27 @@ impl BaseComputedKeyframe { ret } #[cfg(feature = "CompositeOperation")] - #[doc = "Change the `composite` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`, `CompositeOperation`*"] + #[deprecated = "Use `set_composite()` instead."] pub fn composite(&mut self, val: Option) -> &mut Self { self.set_composite(val); self } - #[doc = "Change the `easing` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"] + #[deprecated = "Use `set_easing()` instead."] pub fn easing(&mut self, val: &str) -> &mut Self { self.set_easing(val); self } - #[doc = "Change the `offset` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"] + #[deprecated = "Use `set_offset()` instead."] pub fn offset(&mut self, val: Option) -> &mut Self { self.set_offset(val); self } - #[doc = "Change the `simulateComputeValuesFailure` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"] + #[deprecated = "Use `set_simulate_compute_values_failure()` instead."] pub fn simulate_compute_values_failure(&mut self, val: bool) -> &mut Self { self.set_simulate_compute_values_failure(val); self } - #[doc = "Change the `computedOffset` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"] + #[deprecated = "Use `set_computed_offset()` instead."] pub fn computed_offset(&mut self, val: f64) -> &mut Self { self.set_computed_offset(val); self diff --git a/crates/web-sys/src/features/gen_BaseKeyframe.rs b/crates/web-sys/src/features/gen_BaseKeyframe.rs index 0cf4fe9acd07..1c37af7631c2 100644 --- a/crates/web-sys/src/features/gen_BaseKeyframe.rs +++ b/crates/web-sys/src/features/gen_BaseKeyframe.rs @@ -17,29 +17,41 @@ extern "C" { #[wasm_bindgen(method, getter = "composite")] pub fn get_composite(this: &BaseKeyframe) -> Option; #[cfg(feature = "CompositeOperation")] + #[doc = "Change the `composite` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`, `CompositeOperation`*"] #[wasm_bindgen(method, setter = "composite")] - fn set_composite(this: &BaseKeyframe, val: Option); + pub fn set_composite(this: &BaseKeyframe, val: Option); #[doc = "Get the `easing` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`*"] #[wasm_bindgen(method, getter = "easing")] pub fn get_easing(this: &BaseKeyframe) -> Option; + #[doc = "Change the `easing` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`*"] #[wasm_bindgen(method, setter = "easing")] - fn set_easing(this: &BaseKeyframe, val: &str); + pub fn set_easing(this: &BaseKeyframe, val: &str); #[doc = "Get the `offset` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`*"] #[wasm_bindgen(method, getter = "offset")] pub fn get_offset(this: &BaseKeyframe) -> Option; + #[doc = "Change the `offset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`*"] #[wasm_bindgen(method, setter = "offset")] - fn set_offset(this: &BaseKeyframe, val: Option); + pub fn set_offset(this: &BaseKeyframe, val: Option); #[doc = "Get the `simulateComputeValuesFailure` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`*"] #[wasm_bindgen(method, getter = "simulateComputeValuesFailure")] pub fn get_simulate_compute_values_failure(this: &BaseKeyframe) -> Option; + #[doc = "Change the `simulateComputeValuesFailure` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`*"] #[wasm_bindgen(method, setter = "simulateComputeValuesFailure")] - fn set_simulate_compute_values_failure(this: &BaseKeyframe, val: bool); + pub fn set_simulate_compute_values_failure(this: &BaseKeyframe, val: bool); } impl BaseKeyframe { #[doc = "Construct a new `BaseKeyframe`."] @@ -51,30 +63,22 @@ impl BaseKeyframe { ret } #[cfg(feature = "CompositeOperation")] - #[doc = "Change the `composite` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`, `CompositeOperation`*"] + #[deprecated = "Use `set_composite()` instead."] pub fn composite(&mut self, val: Option) -> &mut Self { self.set_composite(val); self } - #[doc = "Change the `easing` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`*"] + #[deprecated = "Use `set_easing()` instead."] pub fn easing(&mut self, val: &str) -> &mut Self { self.set_easing(val); self } - #[doc = "Change the `offset` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`*"] + #[deprecated = "Use `set_offset()` instead."] pub fn offset(&mut self, val: Option) -> &mut Self { self.set_offset(val); self } - #[doc = "Change the `simulateComputeValuesFailure` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`*"] + #[deprecated = "Use `set_simulate_compute_values_failure()` instead."] pub fn simulate_compute_values_failure(&mut self, val: bool) -> &mut Self { self.set_simulate_compute_values_failure(val); self diff --git a/crates/web-sys/src/features/gen_BasePropertyIndexedKeyframe.rs b/crates/web-sys/src/features/gen_BasePropertyIndexedKeyframe.rs index 7ca926fb36a4..fa9aa4668333 100644 --- a/crates/web-sys/src/features/gen_BasePropertyIndexedKeyframe.rs +++ b/crates/web-sys/src/features/gen_BasePropertyIndexedKeyframe.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `BasePropertyIndexedKeyframe`*"] #[wasm_bindgen(method, getter = "composite")] pub fn get_composite(this: &BasePropertyIndexedKeyframe) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `composite` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BasePropertyIndexedKeyframe`*"] #[wasm_bindgen(method, setter = "composite")] - fn set_composite(this: &BasePropertyIndexedKeyframe, val: &::wasm_bindgen::JsValue); + pub fn set_composite(this: &BasePropertyIndexedKeyframe, val: &::wasm_bindgen::JsValue); #[doc = "Get the `easing` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BasePropertyIndexedKeyframe`*"] #[wasm_bindgen(method, getter = "easing")] pub fn get_easing(this: &BasePropertyIndexedKeyframe) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `easing` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BasePropertyIndexedKeyframe`*"] #[wasm_bindgen(method, setter = "easing")] - fn set_easing(this: &BasePropertyIndexedKeyframe, val: &::wasm_bindgen::JsValue); + pub fn set_easing(this: &BasePropertyIndexedKeyframe, val: &::wasm_bindgen::JsValue); #[doc = "Get the `offset` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BasePropertyIndexedKeyframe`*"] #[wasm_bindgen(method, getter = "offset")] pub fn get_offset(this: &BasePropertyIndexedKeyframe) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `offset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BasePropertyIndexedKeyframe`*"] #[wasm_bindgen(method, setter = "offset")] - fn set_offset(this: &BasePropertyIndexedKeyframe, val: &::wasm_bindgen::JsValue); + pub fn set_offset(this: &BasePropertyIndexedKeyframe, val: &::wasm_bindgen::JsValue); } impl BasePropertyIndexedKeyframe { #[doc = "Construct a new `BasePropertyIndexedKeyframe`."] @@ -41,23 +50,17 @@ impl BasePropertyIndexedKeyframe { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `composite` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BasePropertyIndexedKeyframe`*"] + #[deprecated = "Use `set_composite()` instead."] pub fn composite(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_composite(val); self } - #[doc = "Change the `easing` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BasePropertyIndexedKeyframe`*"] + #[deprecated = "Use `set_easing()` instead."] pub fn easing(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_easing(val); self } - #[doc = "Change the `offset` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BasePropertyIndexedKeyframe`*"] + #[deprecated = "Use `set_offset()` instead."] pub fn offset(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_offset(val); self diff --git a/crates/web-sys/src/features/gen_BasicCardRequest.rs b/crates/web-sys/src/features/gen_BasicCardRequest.rs index 6ad48cae793a..ad2ad22c758f 100644 --- a/crates/web-sys/src/features/gen_BasicCardRequest.rs +++ b/crates/web-sys/src/features/gen_BasicCardRequest.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `BasicCardRequest`*"] #[wasm_bindgen(method, getter = "supportedNetworks")] pub fn get_supported_networks(this: &BasicCardRequest) -> Option<::js_sys::Array>; + #[doc = "Change the `supportedNetworks` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BasicCardRequest`*"] #[wasm_bindgen(method, setter = "supportedNetworks")] - fn set_supported_networks(this: &BasicCardRequest, val: &::wasm_bindgen::JsValue); + pub fn set_supported_networks(this: &BasicCardRequest, val: &::wasm_bindgen::JsValue); #[doc = "Get the `supportedTypes` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BasicCardRequest`*"] #[wasm_bindgen(method, getter = "supportedTypes")] pub fn get_supported_types(this: &BasicCardRequest) -> Option<::js_sys::Array>; + #[doc = "Change the `supportedTypes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BasicCardRequest`*"] #[wasm_bindgen(method, setter = "supportedTypes")] - fn set_supported_types(this: &BasicCardRequest, val: &::wasm_bindgen::JsValue); + pub fn set_supported_types(this: &BasicCardRequest, val: &::wasm_bindgen::JsValue); } impl BasicCardRequest { #[doc = "Construct a new `BasicCardRequest`."] @@ -34,16 +40,12 @@ impl BasicCardRequest { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `supportedNetworks` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BasicCardRequest`*"] + #[deprecated = "Use `set_supported_networks()` instead."] pub fn supported_networks(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_supported_networks(val); self } - #[doc = "Change the `supportedTypes` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BasicCardRequest`*"] + #[deprecated = "Use `set_supported_types()` instead."] pub fn supported_types(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_supported_types(val); self diff --git a/crates/web-sys/src/features/gen_BasicCardResponse.rs b/crates/web-sys/src/features/gen_BasicCardResponse.rs index c1e9ee0785de..b5fff5306b09 100644 --- a/crates/web-sys/src/features/gen_BasicCardResponse.rs +++ b/crates/web-sys/src/features/gen_BasicCardResponse.rs @@ -17,43 +17,61 @@ extern "C" { #[wasm_bindgen(method, getter = "billingAddress")] pub fn get_billing_address(this: &BasicCardResponse) -> Option; #[cfg(feature = "PaymentAddress")] + #[doc = "Change the `billingAddress` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`, `PaymentAddress`*"] #[wasm_bindgen(method, setter = "billingAddress")] - fn set_billing_address(this: &BasicCardResponse, val: Option<&PaymentAddress>); + pub fn set_billing_address(this: &BasicCardResponse, val: Option<&PaymentAddress>); #[doc = "Get the `cardNumber` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`*"] #[wasm_bindgen(method, getter = "cardNumber")] pub fn get_card_number(this: &BasicCardResponse) -> String; + #[doc = "Change the `cardNumber` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`*"] #[wasm_bindgen(method, setter = "cardNumber")] - fn set_card_number(this: &BasicCardResponse, val: &str); + pub fn set_card_number(this: &BasicCardResponse, val: &str); #[doc = "Get the `cardSecurityCode` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`*"] #[wasm_bindgen(method, getter = "cardSecurityCode")] pub fn get_card_security_code(this: &BasicCardResponse) -> Option; + #[doc = "Change the `cardSecurityCode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`*"] #[wasm_bindgen(method, setter = "cardSecurityCode")] - fn set_card_security_code(this: &BasicCardResponse, val: &str); + pub fn set_card_security_code(this: &BasicCardResponse, val: &str); #[doc = "Get the `cardholderName` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`*"] #[wasm_bindgen(method, getter = "cardholderName")] pub fn get_cardholder_name(this: &BasicCardResponse) -> Option; + #[doc = "Change the `cardholderName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`*"] #[wasm_bindgen(method, setter = "cardholderName")] - fn set_cardholder_name(this: &BasicCardResponse, val: &str); + pub fn set_cardholder_name(this: &BasicCardResponse, val: &str); #[doc = "Get the `expiryMonth` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`*"] #[wasm_bindgen(method, getter = "expiryMonth")] pub fn get_expiry_month(this: &BasicCardResponse) -> Option; + #[doc = "Change the `expiryMonth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`*"] #[wasm_bindgen(method, setter = "expiryMonth")] - fn set_expiry_month(this: &BasicCardResponse, val: &str); + pub fn set_expiry_month(this: &BasicCardResponse, val: &str); #[doc = "Get the `expiryYear` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`*"] #[wasm_bindgen(method, getter = "expiryYear")] pub fn get_expiry_year(this: &BasicCardResponse) -> Option; + #[doc = "Change the `expiryYear` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`*"] #[wasm_bindgen(method, setter = "expiryYear")] - fn set_expiry_year(this: &BasicCardResponse, val: &str); + pub fn set_expiry_year(this: &BasicCardResponse, val: &str); } impl BasicCardResponse { #[doc = "Construct a new `BasicCardResponse`."] @@ -66,44 +84,32 @@ impl BasicCardResponse { ret } #[cfg(feature = "PaymentAddress")] - #[doc = "Change the `billingAddress` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`, `PaymentAddress`*"] + #[deprecated = "Use `set_billing_address()` instead."] pub fn billing_address(&mut self, val: Option<&PaymentAddress>) -> &mut Self { self.set_billing_address(val); self } - #[doc = "Change the `cardNumber` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`*"] + #[deprecated = "Use `set_card_number()` instead."] pub fn card_number(&mut self, val: &str) -> &mut Self { self.set_card_number(val); self } - #[doc = "Change the `cardSecurityCode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`*"] + #[deprecated = "Use `set_card_security_code()` instead."] pub fn card_security_code(&mut self, val: &str) -> &mut Self { self.set_card_security_code(val); self } - #[doc = "Change the `cardholderName` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`*"] + #[deprecated = "Use `set_cardholder_name()` instead."] pub fn cardholder_name(&mut self, val: &str) -> &mut Self { self.set_cardholder_name(val); self } - #[doc = "Change the `expiryMonth` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`*"] + #[deprecated = "Use `set_expiry_month()` instead."] pub fn expiry_month(&mut self, val: &str) -> &mut Self { self.set_expiry_month(val); self } - #[doc = "Change the `expiryYear` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`*"] + #[deprecated = "Use `set_expiry_year()` instead."] pub fn expiry_year(&mut self, val: &str) -> &mut Self { self.set_expiry_year(val); self diff --git a/crates/web-sys/src/features/gen_BiquadFilterOptions.rs b/crates/web-sys/src/features/gen_BiquadFilterOptions.rs index 1d2f8342bbf2..a1dedd023404 100644 --- a/crates/web-sys/src/features/gen_BiquadFilterOptions.rs +++ b/crates/web-sys/src/features/gen_BiquadFilterOptions.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"] #[wasm_bindgen(method, getter = "channelCount")] pub fn get_channel_count(this: &BiquadFilterOptions) -> Option; + #[doc = "Change the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"] #[wasm_bindgen(method, setter = "channelCount")] - fn set_channel_count(this: &BiquadFilterOptions, val: u32); + pub fn set_channel_count(this: &BiquadFilterOptions, val: u32); #[cfg(feature = "ChannelCountMode")] #[doc = "Get the `channelCountMode` field of this object."] #[doc = ""] @@ -24,8 +27,11 @@ extern "C" { #[wasm_bindgen(method, getter = "channelCountMode")] pub fn get_channel_count_mode(this: &BiquadFilterOptions) -> Option; #[cfg(feature = "ChannelCountMode")] + #[doc = "Change the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`, `ChannelCountMode`*"] #[wasm_bindgen(method, setter = "channelCountMode")] - fn set_channel_count_mode(this: &BiquadFilterOptions, val: ChannelCountMode); + pub fn set_channel_count_mode(this: &BiquadFilterOptions, val: ChannelCountMode); #[cfg(feature = "ChannelInterpretation")] #[doc = "Get the `channelInterpretation` field of this object."] #[doc = ""] @@ -33,36 +39,51 @@ extern "C" { #[wasm_bindgen(method, getter = "channelInterpretation")] pub fn get_channel_interpretation(this: &BiquadFilterOptions) -> Option; #[cfg(feature = "ChannelInterpretation")] + #[doc = "Change the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`, `ChannelInterpretation`*"] #[wasm_bindgen(method, setter = "channelInterpretation")] - fn set_channel_interpretation(this: &BiquadFilterOptions, val: ChannelInterpretation); + pub fn set_channel_interpretation(this: &BiquadFilterOptions, val: ChannelInterpretation); #[doc = "Get the `Q` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"] #[wasm_bindgen(method, getter = "Q")] pub fn get_q(this: &BiquadFilterOptions) -> Option; + #[doc = "Change the `Q` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"] #[wasm_bindgen(method, setter = "Q")] - fn set_q(this: &BiquadFilterOptions, val: f32); + pub fn set_q(this: &BiquadFilterOptions, val: f32); #[doc = "Get the `detune` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"] #[wasm_bindgen(method, getter = "detune")] pub fn get_detune(this: &BiquadFilterOptions) -> Option; + #[doc = "Change the `detune` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"] #[wasm_bindgen(method, setter = "detune")] - fn set_detune(this: &BiquadFilterOptions, val: f32); + pub fn set_detune(this: &BiquadFilterOptions, val: f32); #[doc = "Get the `frequency` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"] #[wasm_bindgen(method, getter = "frequency")] pub fn get_frequency(this: &BiquadFilterOptions) -> Option; + #[doc = "Change the `frequency` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"] #[wasm_bindgen(method, setter = "frequency")] - fn set_frequency(this: &BiquadFilterOptions, val: f32); + pub fn set_frequency(this: &BiquadFilterOptions, val: f32); #[doc = "Get the `gain` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"] #[wasm_bindgen(method, getter = "gain")] pub fn get_gain(this: &BiquadFilterOptions) -> Option; + #[doc = "Change the `gain` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"] #[wasm_bindgen(method, setter = "gain")] - fn set_gain(this: &BiquadFilterOptions, val: f32); + pub fn set_gain(this: &BiquadFilterOptions, val: f32); #[cfg(feature = "BiquadFilterType")] #[doc = "Get the `type` field of this object."] #[doc = ""] @@ -70,8 +91,11 @@ extern "C" { #[wasm_bindgen(method, getter = "type")] pub fn get_type(this: &BiquadFilterOptions) -> Option; #[cfg(feature = "BiquadFilterType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`, `BiquadFilterType`*"] #[wasm_bindgen(method, setter = "type")] - fn set_type(this: &BiquadFilterOptions, val: BiquadFilterType); + pub fn set_type(this: &BiquadFilterOptions, val: BiquadFilterType); } impl BiquadFilterOptions { #[doc = "Construct a new `BiquadFilterOptions`."] @@ -82,61 +106,45 @@ impl BiquadFilterOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `channelCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"] + #[deprecated = "Use `set_channel_count()` instead."] pub fn channel_count(&mut self, val: u32) -> &mut Self { self.set_channel_count(val); self } #[cfg(feature = "ChannelCountMode")] - #[doc = "Change the `channelCountMode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`, `ChannelCountMode`*"] + #[deprecated = "Use `set_channel_count_mode()` instead."] pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self { self.set_channel_count_mode(val); self } #[cfg(feature = "ChannelInterpretation")] - #[doc = "Change the `channelInterpretation` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`, `ChannelInterpretation`*"] + #[deprecated = "Use `set_channel_interpretation()` instead."] pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self { self.set_channel_interpretation(val); self } - #[doc = "Change the `Q` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"] + #[deprecated = "Use `set_q()` instead."] pub fn q(&mut self, val: f32) -> &mut Self { self.set_q(val); self } - #[doc = "Change the `detune` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"] + #[deprecated = "Use `set_detune()` instead."] pub fn detune(&mut self, val: f32) -> &mut Self { self.set_detune(val); self } - #[doc = "Change the `frequency` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"] + #[deprecated = "Use `set_frequency()` instead."] pub fn frequency(&mut self, val: f32) -> &mut Self { self.set_frequency(val); self } - #[doc = "Change the `gain` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"] + #[deprecated = "Use `set_gain()` instead."] pub fn gain(&mut self, val: f32) -> &mut Self { self.set_gain(val); self } #[cfg(feature = "BiquadFilterType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`, `BiquadFilterType`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: BiquadFilterType) -> &mut Self { self.set_type(val); self diff --git a/crates/web-sys/src/features/gen_BlobEventInit.rs b/crates/web-sys/src/features/gen_BlobEventInit.rs index eeba33c11552..fea2a8ed6a56 100644 --- a/crates/web-sys/src/features/gen_BlobEventInit.rs +++ b/crates/web-sys/src/features/gen_BlobEventInit.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `BlobEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &BlobEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BlobEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &BlobEventInit, val: bool); + pub fn set_bubbles(this: &BlobEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BlobEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &BlobEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BlobEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &BlobEventInit, val: bool); + pub fn set_cancelable(this: &BlobEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BlobEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &BlobEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BlobEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &BlobEventInit, val: bool); + pub fn set_composed(this: &BlobEventInit, val: bool); #[cfg(feature = "Blob")] #[doc = "Get the `data` field of this object."] #[doc = ""] @@ -38,8 +47,11 @@ extern "C" { #[wasm_bindgen(method, getter = "data")] pub fn get_data(this: &BlobEventInit) -> Option; #[cfg(feature = "Blob")] + #[doc = "Change the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Blob`, `BlobEventInit`*"] #[wasm_bindgen(method, setter = "data")] - fn set_data(this: &BlobEventInit, val: Option<&Blob>); + pub fn set_data(this: &BlobEventInit, val: Option<&Blob>); } impl BlobEventInit { #[doc = "Construct a new `BlobEventInit`."] @@ -50,31 +62,23 @@ impl BlobEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BlobEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BlobEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BlobEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } #[cfg(feature = "Blob")] - #[doc = "Change the `data` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `Blob`, `BlobEventInit`*"] + #[deprecated = "Use `set_data()` instead."] pub fn data(&mut self, val: Option<&Blob>) -> &mut Self { self.set_data(val); self diff --git a/crates/web-sys/src/features/gen_BlobPropertyBag.rs b/crates/web-sys/src/features/gen_BlobPropertyBag.rs index 69fe45354c72..c9f3853f33e8 100644 --- a/crates/web-sys/src/features/gen_BlobPropertyBag.rs +++ b/crates/web-sys/src/features/gen_BlobPropertyBag.rs @@ -17,15 +17,21 @@ extern "C" { #[wasm_bindgen(method, getter = "endings")] pub fn get_endings(this: &BlobPropertyBag) -> Option; #[cfg(feature = "EndingTypes")] + #[doc = "Change the `endings` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BlobPropertyBag`, `EndingTypes`*"] #[wasm_bindgen(method, setter = "endings")] - fn set_endings(this: &BlobPropertyBag, val: EndingTypes); + pub fn set_endings(this: &BlobPropertyBag, val: EndingTypes); #[doc = "Get the `type` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BlobPropertyBag`*"] #[wasm_bindgen(method, getter = "type")] pub fn get_type(this: &BlobPropertyBag) -> Option; + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BlobPropertyBag`*"] #[wasm_bindgen(method, setter = "type")] - fn set_type(this: &BlobPropertyBag, val: &str); + pub fn set_type(this: &BlobPropertyBag, val: &str); } impl BlobPropertyBag { #[doc = "Construct a new `BlobPropertyBag`."] @@ -37,16 +43,12 @@ impl BlobPropertyBag { ret } #[cfg(feature = "EndingTypes")] - #[doc = "Change the `endings` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BlobPropertyBag`, `EndingTypes`*"] + #[deprecated = "Use `set_endings()` instead."] pub fn endings(&mut self, val: EndingTypes) -> &mut Self { self.set_endings(val); self } - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BlobPropertyBag`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: &str) -> &mut Self { self.set_type(val); self diff --git a/crates/web-sys/src/features/gen_BlockParsingOptions.rs b/crates/web-sys/src/features/gen_BlockParsingOptions.rs index 9ea19d7bce12..6990d64bdedd 100644 --- a/crates/web-sys/src/features/gen_BlockParsingOptions.rs +++ b/crates/web-sys/src/features/gen_BlockParsingOptions.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `BlockParsingOptions`*"] #[wasm_bindgen(method, getter = "blockScriptCreated")] pub fn get_block_script_created(this: &BlockParsingOptions) -> Option; + #[doc = "Change the `blockScriptCreated` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BlockParsingOptions`*"] #[wasm_bindgen(method, setter = "blockScriptCreated")] - fn set_block_script_created(this: &BlockParsingOptions, val: bool); + pub fn set_block_script_created(this: &BlockParsingOptions, val: bool); } impl BlockParsingOptions { #[doc = "Construct a new `BlockParsingOptions`."] @@ -27,9 +30,7 @@ impl BlockParsingOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `blockScriptCreated` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BlockParsingOptions`*"] + #[deprecated = "Use `set_block_script_created()` instead."] pub fn block_script_created(&mut self, val: bool) -> &mut Self { self.set_block_script_created(val); self diff --git a/crates/web-sys/src/features/gen_BluetoothAdvertisingEventInit.rs b/crates/web-sys/src/features/gen_BluetoothAdvertisingEventInit.rs index fb294362cc8b..38c8e66dc5ca 100644 --- a/crates/web-sys/src/features/gen_BluetoothAdvertisingEventInit.rs +++ b/crates/web-sys/src/features/gen_BluetoothAdvertisingEventInit.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &BluetoothAdvertisingEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &BluetoothAdvertisingEventInit, val: bool); + pub fn set_bubbles(this: &BluetoothAdvertisingEventInit, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `cancelable` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &BluetoothAdvertisingEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &BluetoothAdvertisingEventInit, val: bool); + pub fn set_cancelable(this: &BluetoothAdvertisingEventInit, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `composed` field of this object."] #[doc = ""] @@ -45,8 +59,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &BluetoothAdvertisingEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &BluetoothAdvertisingEventInit, val: bool); + pub fn set_composed(this: &BluetoothAdvertisingEventInit, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `appearance` field of this object."] #[doc = ""] @@ -56,8 +77,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "appearance")] pub fn get_appearance(this: &BluetoothAdvertisingEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `appearance` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "appearance")] - fn set_appearance(this: &BluetoothAdvertisingEventInit, val: u16); + pub fn set_appearance(this: &BluetoothAdvertisingEventInit, val: u16); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "BluetoothDevice")] #[doc = "Get the `device` field of this object."] @@ -68,9 +96,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "device")] pub fn get_device(this: &BluetoothAdvertisingEventInit) -> BluetoothDevice; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "BluetoothDevice")] + #[doc = "Change the `device` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`, `BluetoothDevice`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "device")] - fn set_device(this: &BluetoothAdvertisingEventInit, val: &BluetoothDevice); + pub fn set_device(this: &BluetoothAdvertisingEventInit, val: &BluetoothDevice); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "BluetoothManufacturerDataMap")] #[doc = "Get the `manufacturerData` field of this object."] @@ -83,9 +118,16 @@ extern "C" { pub fn get_manufacturer_data( this: &BluetoothAdvertisingEventInit, ) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "BluetoothManufacturerDataMap")] + #[doc = "Change the `manufacturerData` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`, `BluetoothManufacturerDataMap`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "manufacturerData")] - fn set_manufacturer_data( + pub fn set_manufacturer_data( this: &BluetoothAdvertisingEventInit, val: &BluetoothManufacturerDataMap, ); @@ -98,8 +140,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "name")] pub fn get_name(this: &BluetoothAdvertisingEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "name")] - fn set_name(this: &BluetoothAdvertisingEventInit, val: &str); + pub fn set_name(this: &BluetoothAdvertisingEventInit, val: &str); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `rssi` field of this object."] #[doc = ""] @@ -109,8 +158,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "rssi")] pub fn get_rssi(this: &BluetoothAdvertisingEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `rssi` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "rssi")] - fn set_rssi(this: &BluetoothAdvertisingEventInit, val: i8); + pub fn set_rssi(this: &BluetoothAdvertisingEventInit, val: i8); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "BluetoothServiceDataMap")] #[doc = "Get the `serviceData` field of this object."] @@ -123,9 +179,16 @@ extern "C" { pub fn get_service_data( this: &BluetoothAdvertisingEventInit, ) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "BluetoothServiceDataMap")] + #[doc = "Change the `serviceData` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`, `BluetoothServiceDataMap`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "serviceData")] - fn set_service_data(this: &BluetoothAdvertisingEventInit, val: &BluetoothServiceDataMap); + pub fn set_service_data(this: &BluetoothAdvertisingEventInit, val: &BluetoothServiceDataMap); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `txPower` field of this object."] #[doc = ""] @@ -135,8 +198,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "txPower")] pub fn get_tx_power(this: &BluetoothAdvertisingEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `txPower` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "txPower")] - fn set_tx_power(this: &BluetoothAdvertisingEventInit, val: i8); + pub fn set_tx_power(this: &BluetoothAdvertisingEventInit, val: i8); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `uuids` field of this object."] #[doc = ""] @@ -146,8 +216,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "uuids")] pub fn get_uuids(this: &BluetoothAdvertisingEventInit) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `uuids` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "uuids")] - fn set_uuids(this: &BluetoothAdvertisingEventInit, val: &::wasm_bindgen::JsValue); + pub fn set_uuids(this: &BluetoothAdvertisingEventInit, val: &::wasm_bindgen::JsValue); } #[cfg(web_sys_unstable_apis)] impl BluetoothAdvertisingEventInit { @@ -165,125 +242,70 @@ impl BluetoothAdvertisingEventInit { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `appearance` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_appearance()` instead."] pub fn appearance(&mut self, val: u16) -> &mut Self { self.set_appearance(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "BluetoothDevice")] - #[doc = "Change the `device` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`, `BluetoothDevice`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_device()` instead."] pub fn device(&mut self, val: &BluetoothDevice) -> &mut Self { self.set_device(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "BluetoothManufacturerDataMap")] - #[doc = "Change the `manufacturerData` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`, `BluetoothManufacturerDataMap`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_manufacturer_data()` instead."] pub fn manufacturer_data(&mut self, val: &BluetoothManufacturerDataMap) -> &mut Self { self.set_manufacturer_data(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { self.set_name(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `rssi` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_rssi()` instead."] pub fn rssi(&mut self, val: i8) -> &mut Self { self.set_rssi(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "BluetoothServiceDataMap")] - #[doc = "Change the `serviceData` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`, `BluetoothServiceDataMap`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_service_data()` instead."] pub fn service_data(&mut self, val: &BluetoothServiceDataMap) -> &mut Self { self.set_service_data(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `txPower` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_tx_power()` instead."] pub fn tx_power(&mut self, val: i8) -> &mut Self { self.set_tx_power(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `uuids` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_uuids()` instead."] pub fn uuids(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_uuids(val); self diff --git a/crates/web-sys/src/features/gen_BluetoothDataFilterInit.rs b/crates/web-sys/src/features/gen_BluetoothDataFilterInit.rs index 5f940035d5d0..d7ec67843560 100644 --- a/crates/web-sys/src/features/gen_BluetoothDataFilterInit.rs +++ b/crates/web-sys/src/features/gen_BluetoothDataFilterInit.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "dataPrefix")] pub fn get_data_prefix(this: &BluetoothDataFilterInit) -> Option<::js_sys::Object>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `dataPrefix` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothDataFilterInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "dataPrefix")] - fn set_data_prefix(this: &BluetoothDataFilterInit, val: &::js_sys::Object); + pub fn set_data_prefix(this: &BluetoothDataFilterInit, val: &::js_sys::Object); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `mask` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "mask")] pub fn get_mask(this: &BluetoothDataFilterInit) -> Option<::js_sys::Object>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `mask` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothDataFilterInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "mask")] - fn set_mask(this: &BluetoothDataFilterInit, val: &::js_sys::Object); + pub fn set_mask(this: &BluetoothDataFilterInit, val: &::js_sys::Object); } #[cfg(web_sys_unstable_apis)] impl BluetoothDataFilterInit { @@ -51,23 +65,13 @@ impl BluetoothDataFilterInit { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `dataPrefix` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BluetoothDataFilterInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_data_prefix()` instead."] pub fn data_prefix(&mut self, val: &::js_sys::Object) -> &mut Self { self.set_data_prefix(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `mask` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BluetoothDataFilterInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_mask()` instead."] pub fn mask(&mut self, val: &::js_sys::Object) -> &mut Self { self.set_mask(val); self diff --git a/crates/web-sys/src/features/gen_BluetoothLeScanFilterInit.rs b/crates/web-sys/src/features/gen_BluetoothLeScanFilterInit.rs index ab32ed86988c..8f7db520c1e2 100644 --- a/crates/web-sys/src/features/gen_BluetoothLeScanFilterInit.rs +++ b/crates/web-sys/src/features/gen_BluetoothLeScanFilterInit.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "manufacturerData")] pub fn get_manufacturer_data(this: &BluetoothLeScanFilterInit) -> Option<::js_sys::Object>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `manufacturerData` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothLeScanFilterInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "manufacturerData")] - fn set_manufacturer_data(this: &BluetoothLeScanFilterInit, val: &::js_sys::Object); + pub fn set_manufacturer_data(this: &BluetoothLeScanFilterInit, val: &::js_sys::Object); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `name` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "name")] pub fn get_name(this: &BluetoothLeScanFilterInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothLeScanFilterInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "name")] - fn set_name(this: &BluetoothLeScanFilterInit, val: &str); + pub fn set_name(this: &BluetoothLeScanFilterInit, val: &str); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `namePrefix` field of this object."] #[doc = ""] @@ -45,8 +59,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "namePrefix")] pub fn get_name_prefix(this: &BluetoothLeScanFilterInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `namePrefix` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothLeScanFilterInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "namePrefix")] - fn set_name_prefix(this: &BluetoothLeScanFilterInit, val: &str); + pub fn set_name_prefix(this: &BluetoothLeScanFilterInit, val: &str); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `serviceData` field of this object."] #[doc = ""] @@ -56,8 +77,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "serviceData")] pub fn get_service_data(this: &BluetoothLeScanFilterInit) -> Option<::js_sys::Object>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `serviceData` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothLeScanFilterInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "serviceData")] - fn set_service_data(this: &BluetoothLeScanFilterInit, val: &::js_sys::Object); + pub fn set_service_data(this: &BluetoothLeScanFilterInit, val: &::js_sys::Object); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `services` field of this object."] #[doc = ""] @@ -67,8 +95,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "services")] pub fn get_services(this: &BluetoothLeScanFilterInit) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `services` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothLeScanFilterInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "services")] - fn set_services(this: &BluetoothLeScanFilterInit, val: &::wasm_bindgen::JsValue); + pub fn set_services(this: &BluetoothLeScanFilterInit, val: &::wasm_bindgen::JsValue); } #[cfg(web_sys_unstable_apis)] impl BluetoothLeScanFilterInit { @@ -84,56 +119,31 @@ impl BluetoothLeScanFilterInit { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `manufacturerData` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BluetoothLeScanFilterInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_manufacturer_data()` instead."] pub fn manufacturer_data(&mut self, val: &::js_sys::Object) -> &mut Self { self.set_manufacturer_data(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BluetoothLeScanFilterInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { self.set_name(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `namePrefix` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BluetoothLeScanFilterInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_name_prefix()` instead."] pub fn name_prefix(&mut self, val: &str) -> &mut Self { self.set_name_prefix(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `serviceData` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BluetoothLeScanFilterInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_service_data()` instead."] pub fn service_data(&mut self, val: &::js_sys::Object) -> &mut Self { self.set_service_data(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `services` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BluetoothLeScanFilterInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_services()` instead."] pub fn services(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_services(val); self diff --git a/crates/web-sys/src/features/gen_BluetoothPermissionDescriptor.rs b/crates/web-sys/src/features/gen_BluetoothPermissionDescriptor.rs index fe450ea6a75b..61715c45bf0d 100644 --- a/crates/web-sys/src/features/gen_BluetoothPermissionDescriptor.rs +++ b/crates/web-sys/src/features/gen_BluetoothPermissionDescriptor.rs @@ -24,9 +24,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "name")] pub fn get_name(this: &BluetoothPermissionDescriptor) -> PermissionName; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "PermissionName")] + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothPermissionDescriptor`, `PermissionName`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "name")] - fn set_name(this: &BluetoothPermissionDescriptor, val: PermissionName); + pub fn set_name(this: &BluetoothPermissionDescriptor, val: PermissionName); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `acceptAllDevices` field of this object."] #[doc = ""] @@ -36,8 +43,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "acceptAllDevices")] pub fn get_accept_all_devices(this: &BluetoothPermissionDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `acceptAllDevices` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothPermissionDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "acceptAllDevices")] - fn set_accept_all_devices(this: &BluetoothPermissionDescriptor, val: bool); + pub fn set_accept_all_devices(this: &BluetoothPermissionDescriptor, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `deviceId` field of this object."] #[doc = ""] @@ -47,8 +61,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "deviceId")] pub fn get_device_id(this: &BluetoothPermissionDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `deviceId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothPermissionDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "deviceId")] - fn set_device_id(this: &BluetoothPermissionDescriptor, val: &str); + pub fn set_device_id(this: &BluetoothPermissionDescriptor, val: &str); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `filters` field of this object."] #[doc = ""] @@ -58,8 +79,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "filters")] pub fn get_filters(this: &BluetoothPermissionDescriptor) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `filters` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothPermissionDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "filters")] - fn set_filters(this: &BluetoothPermissionDescriptor, val: &::wasm_bindgen::JsValue); + pub fn set_filters(this: &BluetoothPermissionDescriptor, val: &::wasm_bindgen::JsValue); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `optionalServices` field of this object."] #[doc = ""] @@ -69,8 +97,18 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "optionalServices")] pub fn get_optional_services(this: &BluetoothPermissionDescriptor) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `optionalServices` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothPermissionDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "optionalServices")] - fn set_optional_services(this: &BluetoothPermissionDescriptor, val: &::wasm_bindgen::JsValue); + pub fn set_optional_services( + this: &BluetoothPermissionDescriptor, + val: &::wasm_bindgen::JsValue, + ); } #[cfg(web_sys_unstable_apis)] impl BluetoothPermissionDescriptor { @@ -89,56 +127,31 @@ impl BluetoothPermissionDescriptor { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "PermissionName")] - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BluetoothPermissionDescriptor`, `PermissionName`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: PermissionName) -> &mut Self { self.set_name(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `acceptAllDevices` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BluetoothPermissionDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_accept_all_devices()` instead."] pub fn accept_all_devices(&mut self, val: bool) -> &mut Self { self.set_accept_all_devices(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `deviceId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BluetoothPermissionDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_device_id()` instead."] pub fn device_id(&mut self, val: &str) -> &mut Self { self.set_device_id(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `filters` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BluetoothPermissionDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_filters()` instead."] pub fn filters(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_filters(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `optionalServices` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BluetoothPermissionDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_optional_services()` instead."] pub fn optional_services(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_optional_services(val); self diff --git a/crates/web-sys/src/features/gen_BluetoothPermissionStorage.rs b/crates/web-sys/src/features/gen_BluetoothPermissionStorage.rs index 9ccb363a775b..ba65406810ec 100644 --- a/crates/web-sys/src/features/gen_BluetoothPermissionStorage.rs +++ b/crates/web-sys/src/features/gen_BluetoothPermissionStorage.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "allowedDevices")] pub fn get_allowed_devices(this: &BluetoothPermissionStorage) -> ::js_sys::Array; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `allowedDevices` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothPermissionStorage`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "allowedDevices")] - fn set_allowed_devices(this: &BluetoothPermissionStorage, val: &::wasm_bindgen::JsValue); + pub fn set_allowed_devices(this: &BluetoothPermissionStorage, val: &::wasm_bindgen::JsValue); } #[cfg(web_sys_unstable_apis)] impl BluetoothPermissionStorage { @@ -41,12 +48,7 @@ impl BluetoothPermissionStorage { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `allowedDevices` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BluetoothPermissionStorage`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_allowed_devices()` instead."] pub fn allowed_devices(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_allowed_devices(val); self diff --git a/crates/web-sys/src/features/gen_BoxQuadOptions.rs b/crates/web-sys/src/features/gen_BoxQuadOptions.rs index d69dc64702bf..0a117e15c035 100644 --- a/crates/web-sys/src/features/gen_BoxQuadOptions.rs +++ b/crates/web-sys/src/features/gen_BoxQuadOptions.rs @@ -17,15 +17,21 @@ extern "C" { #[wasm_bindgen(method, getter = "box")] pub fn get_box(this: &BoxQuadOptions) -> Option; #[cfg(feature = "CssBoxType")] + #[doc = "Change the `box` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BoxQuadOptions`, `CssBoxType`*"] #[wasm_bindgen(method, setter = "box")] - fn set_box(this: &BoxQuadOptions, val: CssBoxType); + pub fn set_box(this: &BoxQuadOptions, val: CssBoxType); #[doc = "Get the `relativeTo` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BoxQuadOptions`*"] #[wasm_bindgen(method, getter = "relativeTo")] pub fn get_relative_to(this: &BoxQuadOptions) -> Option<::js_sys::Object>; + #[doc = "Change the `relativeTo` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BoxQuadOptions`*"] #[wasm_bindgen(method, setter = "relativeTo")] - fn set_relative_to(this: &BoxQuadOptions, val: &::js_sys::Object); + pub fn set_relative_to(this: &BoxQuadOptions, val: &::js_sys::Object); } impl BoxQuadOptions { #[doc = "Construct a new `BoxQuadOptions`."] @@ -37,16 +43,12 @@ impl BoxQuadOptions { ret } #[cfg(feature = "CssBoxType")] - #[doc = "Change the `box` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BoxQuadOptions`, `CssBoxType`*"] + #[deprecated = "Use `set_box()` instead."] pub fn box_(&mut self, val: CssBoxType) -> &mut Self { self.set_box(val); self } - #[doc = "Change the `relativeTo` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BoxQuadOptions`*"] + #[deprecated = "Use `set_relative_to()` instead."] pub fn relative_to(&mut self, val: &::js_sys::Object) -> &mut Self { self.set_relative_to(val); self diff --git a/crates/web-sys/src/features/gen_BrowserElementDownloadOptions.rs b/crates/web-sys/src/features/gen_BrowserElementDownloadOptions.rs index 57b77ec2b8dd..d41ec3553ef2 100644 --- a/crates/web-sys/src/features/gen_BrowserElementDownloadOptions.rs +++ b/crates/web-sys/src/features/gen_BrowserElementDownloadOptions.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `BrowserElementDownloadOptions`*"] #[wasm_bindgen(method, getter = "filename")] pub fn get_filename(this: &BrowserElementDownloadOptions) -> Option; + #[doc = "Change the `filename` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BrowserElementDownloadOptions`*"] #[wasm_bindgen(method, setter = "filename")] - fn set_filename(this: &BrowserElementDownloadOptions, val: Option<&str>); + pub fn set_filename(this: &BrowserElementDownloadOptions, val: Option<&str>); #[doc = "Get the `referrer` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BrowserElementDownloadOptions`*"] #[wasm_bindgen(method, getter = "referrer")] pub fn get_referrer(this: &BrowserElementDownloadOptions) -> Option; + #[doc = "Change the `referrer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BrowserElementDownloadOptions`*"] #[wasm_bindgen(method, setter = "referrer")] - fn set_referrer(this: &BrowserElementDownloadOptions, val: Option<&str>); + pub fn set_referrer(this: &BrowserElementDownloadOptions, val: Option<&str>); } impl BrowserElementDownloadOptions { #[doc = "Construct a new `BrowserElementDownloadOptions`."] @@ -34,16 +40,12 @@ impl BrowserElementDownloadOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `filename` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BrowserElementDownloadOptions`*"] + #[deprecated = "Use `set_filename()` instead."] pub fn filename(&mut self, val: Option<&str>) -> &mut Self { self.set_filename(val); self } - #[doc = "Change the `referrer` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BrowserElementDownloadOptions`*"] + #[deprecated = "Use `set_referrer()` instead."] pub fn referrer(&mut self, val: Option<&str>) -> &mut Self { self.set_referrer(val); self diff --git a/crates/web-sys/src/features/gen_BrowserElementExecuteScriptOptions.rs b/crates/web-sys/src/features/gen_BrowserElementExecuteScriptOptions.rs index 1dda2ca2a808..d5cb2dbd650e 100644 --- a/crates/web-sys/src/features/gen_BrowserElementExecuteScriptOptions.rs +++ b/crates/web-sys/src/features/gen_BrowserElementExecuteScriptOptions.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `BrowserElementExecuteScriptOptions`*"] #[wasm_bindgen(method, getter = "origin")] pub fn get_origin(this: &BrowserElementExecuteScriptOptions) -> Option; + #[doc = "Change the `origin` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BrowserElementExecuteScriptOptions`*"] #[wasm_bindgen(method, setter = "origin")] - fn set_origin(this: &BrowserElementExecuteScriptOptions, val: Option<&str>); + pub fn set_origin(this: &BrowserElementExecuteScriptOptions, val: Option<&str>); #[doc = "Get the `url` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BrowserElementExecuteScriptOptions`*"] #[wasm_bindgen(method, getter = "url")] pub fn get_url(this: &BrowserElementExecuteScriptOptions) -> Option; + #[doc = "Change the `url` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BrowserElementExecuteScriptOptions`*"] #[wasm_bindgen(method, setter = "url")] - fn set_url(this: &BrowserElementExecuteScriptOptions, val: Option<&str>); + pub fn set_url(this: &BrowserElementExecuteScriptOptions, val: Option<&str>); } impl BrowserElementExecuteScriptOptions { #[doc = "Construct a new `BrowserElementExecuteScriptOptions`."] @@ -34,16 +40,12 @@ impl BrowserElementExecuteScriptOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `origin` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BrowserElementExecuteScriptOptions`*"] + #[deprecated = "Use `set_origin()` instead."] pub fn origin(&mut self, val: Option<&str>) -> &mut Self { self.set_origin(val); self } - #[doc = "Change the `url` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BrowserElementExecuteScriptOptions`*"] + #[deprecated = "Use `set_url()` instead."] pub fn url(&mut self, val: Option<&str>) -> &mut Self { self.set_url(val); self diff --git a/crates/web-sys/src/features/gen_CacheBatchOperation.rs b/crates/web-sys/src/features/gen_CacheBatchOperation.rs index 1b4d9e05937d..3712535a7b87 100644 --- a/crates/web-sys/src/features/gen_CacheBatchOperation.rs +++ b/crates/web-sys/src/features/gen_CacheBatchOperation.rs @@ -17,8 +17,11 @@ extern "C" { #[wasm_bindgen(method, getter = "options")] pub fn get_options(this: &CacheBatchOperation) -> Option; #[cfg(feature = "CacheQueryOptions")] + #[doc = "Change the `options` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CacheBatchOperation`, `CacheQueryOptions`*"] #[wasm_bindgen(method, setter = "options")] - fn set_options(this: &CacheBatchOperation, val: &CacheQueryOptions); + pub fn set_options(this: &CacheBatchOperation, val: &CacheQueryOptions); #[cfg(feature = "Request")] #[doc = "Get the `request` field of this object."] #[doc = ""] @@ -26,8 +29,11 @@ extern "C" { #[wasm_bindgen(method, getter = "request")] pub fn get_request(this: &CacheBatchOperation) -> Option; #[cfg(feature = "Request")] + #[doc = "Change the `request` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CacheBatchOperation`, `Request`*"] #[wasm_bindgen(method, setter = "request")] - fn set_request(this: &CacheBatchOperation, val: &Request); + pub fn set_request(this: &CacheBatchOperation, val: &Request); #[cfg(feature = "Response")] #[doc = "Get the `response` field of this object."] #[doc = ""] @@ -35,15 +41,21 @@ extern "C" { #[wasm_bindgen(method, getter = "response")] pub fn get_response(this: &CacheBatchOperation) -> Option; #[cfg(feature = "Response")] + #[doc = "Change the `response` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CacheBatchOperation`, `Response`*"] #[wasm_bindgen(method, setter = "response")] - fn set_response(this: &CacheBatchOperation, val: &Response); + pub fn set_response(this: &CacheBatchOperation, val: &Response); #[doc = "Get the `type` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CacheBatchOperation`*"] #[wasm_bindgen(method, getter = "type")] pub fn get_type(this: &CacheBatchOperation) -> Option; + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CacheBatchOperation`*"] #[wasm_bindgen(method, setter = "type")] - fn set_type(this: &CacheBatchOperation, val: &str); + pub fn set_type(this: &CacheBatchOperation, val: &str); } impl CacheBatchOperation { #[doc = "Construct a new `CacheBatchOperation`."] @@ -55,32 +67,24 @@ impl CacheBatchOperation { ret } #[cfg(feature = "CacheQueryOptions")] - #[doc = "Change the `options` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CacheBatchOperation`, `CacheQueryOptions`*"] + #[deprecated = "Use `set_options()` instead."] pub fn options(&mut self, val: &CacheQueryOptions) -> &mut Self { self.set_options(val); self } #[cfg(feature = "Request")] - #[doc = "Change the `request` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CacheBatchOperation`, `Request`*"] + #[deprecated = "Use `set_request()` instead."] pub fn request(&mut self, val: &Request) -> &mut Self { self.set_request(val); self } #[cfg(feature = "Response")] - #[doc = "Change the `response` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CacheBatchOperation`, `Response`*"] + #[deprecated = "Use `set_response()` instead."] pub fn response(&mut self, val: &Response) -> &mut Self { self.set_response(val); self } - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CacheBatchOperation`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: &str) -> &mut Self { self.set_type(val); self diff --git a/crates/web-sys/src/features/gen_CacheQueryOptions.rs b/crates/web-sys/src/features/gen_CacheQueryOptions.rs index 1bfcaa023f9d..3497a49e5f89 100644 --- a/crates/web-sys/src/features/gen_CacheQueryOptions.rs +++ b/crates/web-sys/src/features/gen_CacheQueryOptions.rs @@ -15,29 +15,41 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`*"] #[wasm_bindgen(method, getter = "cacheName")] pub fn get_cache_name(this: &CacheQueryOptions) -> Option; + #[doc = "Change the `cacheName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`*"] #[wasm_bindgen(method, setter = "cacheName")] - fn set_cache_name(this: &CacheQueryOptions, val: &str); + pub fn set_cache_name(this: &CacheQueryOptions, val: &str); #[doc = "Get the `ignoreMethod` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`*"] #[wasm_bindgen(method, getter = "ignoreMethod")] pub fn get_ignore_method(this: &CacheQueryOptions) -> Option; + #[doc = "Change the `ignoreMethod` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`*"] #[wasm_bindgen(method, setter = "ignoreMethod")] - fn set_ignore_method(this: &CacheQueryOptions, val: bool); + pub fn set_ignore_method(this: &CacheQueryOptions, val: bool); #[doc = "Get the `ignoreSearch` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`*"] #[wasm_bindgen(method, getter = "ignoreSearch")] pub fn get_ignore_search(this: &CacheQueryOptions) -> Option; + #[doc = "Change the `ignoreSearch` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`*"] #[wasm_bindgen(method, setter = "ignoreSearch")] - fn set_ignore_search(this: &CacheQueryOptions, val: bool); + pub fn set_ignore_search(this: &CacheQueryOptions, val: bool); #[doc = "Get the `ignoreVary` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`*"] #[wasm_bindgen(method, getter = "ignoreVary")] pub fn get_ignore_vary(this: &CacheQueryOptions) -> Option; + #[doc = "Change the `ignoreVary` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`*"] #[wasm_bindgen(method, setter = "ignoreVary")] - fn set_ignore_vary(this: &CacheQueryOptions, val: bool); + pub fn set_ignore_vary(this: &CacheQueryOptions, val: bool); } impl CacheQueryOptions { #[doc = "Construct a new `CacheQueryOptions`."] @@ -48,30 +60,22 @@ impl CacheQueryOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `cacheName` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`*"] + #[deprecated = "Use `set_cache_name()` instead."] pub fn cache_name(&mut self, val: &str) -> &mut Self { self.set_cache_name(val); self } - #[doc = "Change the `ignoreMethod` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`*"] + #[deprecated = "Use `set_ignore_method()` instead."] pub fn ignore_method(&mut self, val: bool) -> &mut Self { self.set_ignore_method(val); self } - #[doc = "Change the `ignoreSearch` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`*"] + #[deprecated = "Use `set_ignore_search()` instead."] pub fn ignore_search(&mut self, val: bool) -> &mut Self { self.set_ignore_search(val); self } - #[doc = "Change the `ignoreVary` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`*"] + #[deprecated = "Use `set_ignore_vary()` instead."] pub fn ignore_vary(&mut self, val: bool) -> &mut Self { self.set_ignore_vary(val); self diff --git a/crates/web-sys/src/features/gen_CaretStateChangedEventInit.rs b/crates/web-sys/src/features/gen_CaretStateChangedEventInit.rs index 4632f6d52917..093dd71087fd 100644 --- a/crates/web-sys/src/features/gen_CaretStateChangedEventInit.rs +++ b/crates/web-sys/src/features/gen_CaretStateChangedEventInit.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &CaretStateChangedEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &CaretStateChangedEventInit, val: bool); + pub fn set_bubbles(this: &CaretStateChangedEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &CaretStateChangedEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &CaretStateChangedEventInit, val: bool); + pub fn set_cancelable(this: &CaretStateChangedEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &CaretStateChangedEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &CaretStateChangedEventInit, val: bool); + pub fn set_composed(this: &CaretStateChangedEventInit, val: bool); #[cfg(feature = "DomRectReadOnly")] #[doc = "Get the `boundingClientRect` field of this object."] #[doc = ""] @@ -38,29 +47,44 @@ extern "C" { #[wasm_bindgen(method, getter = "boundingClientRect")] pub fn get_bounding_client_rect(this: &CaretStateChangedEventInit) -> Option; #[cfg(feature = "DomRectReadOnly")] + #[doc = "Change the `boundingClientRect` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`, `DomRectReadOnly`*"] #[wasm_bindgen(method, setter = "boundingClientRect")] - fn set_bounding_client_rect(this: &CaretStateChangedEventInit, val: Option<&DomRectReadOnly>); + pub fn set_bounding_client_rect( + this: &CaretStateChangedEventInit, + val: Option<&DomRectReadOnly>, + ); #[doc = "Get the `caretVisible` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] #[wasm_bindgen(method, getter = "caretVisible")] pub fn get_caret_visible(this: &CaretStateChangedEventInit) -> Option; + #[doc = "Change the `caretVisible` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] #[wasm_bindgen(method, setter = "caretVisible")] - fn set_caret_visible(this: &CaretStateChangedEventInit, val: bool); + pub fn set_caret_visible(this: &CaretStateChangedEventInit, val: bool); #[doc = "Get the `caretVisuallyVisible` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] #[wasm_bindgen(method, getter = "caretVisuallyVisible")] pub fn get_caret_visually_visible(this: &CaretStateChangedEventInit) -> Option; + #[doc = "Change the `caretVisuallyVisible` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] #[wasm_bindgen(method, setter = "caretVisuallyVisible")] - fn set_caret_visually_visible(this: &CaretStateChangedEventInit, val: bool); + pub fn set_caret_visually_visible(this: &CaretStateChangedEventInit, val: bool); #[doc = "Get the `collapsed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] #[wasm_bindgen(method, getter = "collapsed")] pub fn get_collapsed(this: &CaretStateChangedEventInit) -> Option; + #[doc = "Change the `collapsed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] #[wasm_bindgen(method, setter = "collapsed")] - fn set_collapsed(this: &CaretStateChangedEventInit, val: bool); + pub fn set_collapsed(this: &CaretStateChangedEventInit, val: bool); #[cfg(feature = "CaretChangedReason")] #[doc = "Get the `reason` field of this object."] #[doc = ""] @@ -68,29 +92,41 @@ extern "C" { #[wasm_bindgen(method, getter = "reason")] pub fn get_reason(this: &CaretStateChangedEventInit) -> Option; #[cfg(feature = "CaretChangedReason")] + #[doc = "Change the `reason` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CaretChangedReason`, `CaretStateChangedEventInit`*"] #[wasm_bindgen(method, setter = "reason")] - fn set_reason(this: &CaretStateChangedEventInit, val: CaretChangedReason); + pub fn set_reason(this: &CaretStateChangedEventInit, val: CaretChangedReason); #[doc = "Get the `selectedTextContent` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] #[wasm_bindgen(method, getter = "selectedTextContent")] pub fn get_selected_text_content(this: &CaretStateChangedEventInit) -> Option; + #[doc = "Change the `selectedTextContent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] #[wasm_bindgen(method, setter = "selectedTextContent")] - fn set_selected_text_content(this: &CaretStateChangedEventInit, val: &str); + pub fn set_selected_text_content(this: &CaretStateChangedEventInit, val: &str); #[doc = "Get the `selectionEditable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] #[wasm_bindgen(method, getter = "selectionEditable")] pub fn get_selection_editable(this: &CaretStateChangedEventInit) -> Option; + #[doc = "Change the `selectionEditable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] #[wasm_bindgen(method, setter = "selectionEditable")] - fn set_selection_editable(this: &CaretStateChangedEventInit, val: bool); + pub fn set_selection_editable(this: &CaretStateChangedEventInit, val: bool); #[doc = "Get the `selectionVisible` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] #[wasm_bindgen(method, getter = "selectionVisible")] pub fn get_selection_visible(this: &CaretStateChangedEventInit) -> Option; + #[doc = "Change the `selectionVisible` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] #[wasm_bindgen(method, setter = "selectionVisible")] - fn set_selection_visible(this: &CaretStateChangedEventInit, val: bool); + pub fn set_selection_visible(this: &CaretStateChangedEventInit, val: bool); } impl CaretStateChangedEventInit { #[doc = "Construct a new `CaretStateChangedEventInit`."] @@ -101,81 +137,59 @@ impl CaretStateChangedEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } #[cfg(feature = "DomRectReadOnly")] - #[doc = "Change the `boundingClientRect` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`, `DomRectReadOnly`*"] + #[deprecated = "Use `set_bounding_client_rect()` instead."] pub fn bounding_client_rect(&mut self, val: Option<&DomRectReadOnly>) -> &mut Self { self.set_bounding_client_rect(val); self } - #[doc = "Change the `caretVisible` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] + #[deprecated = "Use `set_caret_visible()` instead."] pub fn caret_visible(&mut self, val: bool) -> &mut Self { self.set_caret_visible(val); self } - #[doc = "Change the `caretVisuallyVisible` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] + #[deprecated = "Use `set_caret_visually_visible()` instead."] pub fn caret_visually_visible(&mut self, val: bool) -> &mut Self { self.set_caret_visually_visible(val); self } - #[doc = "Change the `collapsed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] + #[deprecated = "Use `set_collapsed()` instead."] pub fn collapsed(&mut self, val: bool) -> &mut Self { self.set_collapsed(val); self } #[cfg(feature = "CaretChangedReason")] - #[doc = "Change the `reason` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CaretChangedReason`, `CaretStateChangedEventInit`*"] + #[deprecated = "Use `set_reason()` instead."] pub fn reason(&mut self, val: CaretChangedReason) -> &mut Self { self.set_reason(val); self } - #[doc = "Change the `selectedTextContent` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] + #[deprecated = "Use `set_selected_text_content()` instead."] pub fn selected_text_content(&mut self, val: &str) -> &mut Self { self.set_selected_text_content(val); self } - #[doc = "Change the `selectionEditable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] + #[deprecated = "Use `set_selection_editable()` instead."] pub fn selection_editable(&mut self, val: bool) -> &mut Self { self.set_selection_editable(val); self } - #[doc = "Change the `selectionVisible` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] + #[deprecated = "Use `set_selection_visible()` instead."] pub fn selection_visible(&mut self, val: bool) -> &mut Self { self.set_selection_visible(val); self diff --git a/crates/web-sys/src/features/gen_ChannelMergerOptions.rs b/crates/web-sys/src/features/gen_ChannelMergerOptions.rs index a4dc5318deb6..81bdc7379f9c 100644 --- a/crates/web-sys/src/features/gen_ChannelMergerOptions.rs +++ b/crates/web-sys/src/features/gen_ChannelMergerOptions.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ChannelMergerOptions`*"] #[wasm_bindgen(method, getter = "channelCount")] pub fn get_channel_count(this: &ChannelMergerOptions) -> Option; + #[doc = "Change the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelMergerOptions`*"] #[wasm_bindgen(method, setter = "channelCount")] - fn set_channel_count(this: &ChannelMergerOptions, val: u32); + pub fn set_channel_count(this: &ChannelMergerOptions, val: u32); #[cfg(feature = "ChannelCountMode")] #[doc = "Get the `channelCountMode` field of this object."] #[doc = ""] @@ -24,8 +27,11 @@ extern "C" { #[wasm_bindgen(method, getter = "channelCountMode")] pub fn get_channel_count_mode(this: &ChannelMergerOptions) -> Option; #[cfg(feature = "ChannelCountMode")] + #[doc = "Change the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `ChannelMergerOptions`*"] #[wasm_bindgen(method, setter = "channelCountMode")] - fn set_channel_count_mode(this: &ChannelMergerOptions, val: ChannelCountMode); + pub fn set_channel_count_mode(this: &ChannelMergerOptions, val: ChannelCountMode); #[cfg(feature = "ChannelInterpretation")] #[doc = "Get the `channelInterpretation` field of this object."] #[doc = ""] @@ -34,15 +40,21 @@ extern "C" { pub fn get_channel_interpretation(this: &ChannelMergerOptions) -> Option; #[cfg(feature = "ChannelInterpretation")] + #[doc = "Change the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `ChannelMergerOptions`*"] #[wasm_bindgen(method, setter = "channelInterpretation")] - fn set_channel_interpretation(this: &ChannelMergerOptions, val: ChannelInterpretation); + pub fn set_channel_interpretation(this: &ChannelMergerOptions, val: ChannelInterpretation); #[doc = "Get the `numberOfInputs` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ChannelMergerOptions`*"] #[wasm_bindgen(method, getter = "numberOfInputs")] pub fn get_number_of_inputs(this: &ChannelMergerOptions) -> Option; + #[doc = "Change the `numberOfInputs` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelMergerOptions`*"] #[wasm_bindgen(method, setter = "numberOfInputs")] - fn set_number_of_inputs(this: &ChannelMergerOptions, val: u32); + pub fn set_number_of_inputs(this: &ChannelMergerOptions, val: u32); } impl ChannelMergerOptions { #[doc = "Construct a new `ChannelMergerOptions`."] @@ -53,32 +65,24 @@ impl ChannelMergerOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `channelCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChannelMergerOptions`*"] + #[deprecated = "Use `set_channel_count()` instead."] pub fn channel_count(&mut self, val: u32) -> &mut Self { self.set_channel_count(val); self } #[cfg(feature = "ChannelCountMode")] - #[doc = "Change the `channelCountMode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `ChannelMergerOptions`*"] + #[deprecated = "Use `set_channel_count_mode()` instead."] pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self { self.set_channel_count_mode(val); self } #[cfg(feature = "ChannelInterpretation")] - #[doc = "Change the `channelInterpretation` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `ChannelMergerOptions`*"] + #[deprecated = "Use `set_channel_interpretation()` instead."] pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self { self.set_channel_interpretation(val); self } - #[doc = "Change the `numberOfInputs` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChannelMergerOptions`*"] + #[deprecated = "Use `set_number_of_inputs()` instead."] pub fn number_of_inputs(&mut self, val: u32) -> &mut Self { self.set_number_of_inputs(val); self diff --git a/crates/web-sys/src/features/gen_ChannelSplitterOptions.rs b/crates/web-sys/src/features/gen_ChannelSplitterOptions.rs index f454a56de90f..582198555b00 100644 --- a/crates/web-sys/src/features/gen_ChannelSplitterOptions.rs +++ b/crates/web-sys/src/features/gen_ChannelSplitterOptions.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ChannelSplitterOptions`*"] #[wasm_bindgen(method, getter = "channelCount")] pub fn get_channel_count(this: &ChannelSplitterOptions) -> Option; + #[doc = "Change the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelSplitterOptions`*"] #[wasm_bindgen(method, setter = "channelCount")] - fn set_channel_count(this: &ChannelSplitterOptions, val: u32); + pub fn set_channel_count(this: &ChannelSplitterOptions, val: u32); #[cfg(feature = "ChannelCountMode")] #[doc = "Get the `channelCountMode` field of this object."] #[doc = ""] @@ -24,8 +27,11 @@ extern "C" { #[wasm_bindgen(method, getter = "channelCountMode")] pub fn get_channel_count_mode(this: &ChannelSplitterOptions) -> Option; #[cfg(feature = "ChannelCountMode")] + #[doc = "Change the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `ChannelSplitterOptions`*"] #[wasm_bindgen(method, setter = "channelCountMode")] - fn set_channel_count_mode(this: &ChannelSplitterOptions, val: ChannelCountMode); + pub fn set_channel_count_mode(this: &ChannelSplitterOptions, val: ChannelCountMode); #[cfg(feature = "ChannelInterpretation")] #[doc = "Get the `channelInterpretation` field of this object."] #[doc = ""] @@ -35,15 +41,21 @@ extern "C" { this: &ChannelSplitterOptions, ) -> Option; #[cfg(feature = "ChannelInterpretation")] + #[doc = "Change the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `ChannelSplitterOptions`*"] #[wasm_bindgen(method, setter = "channelInterpretation")] - fn set_channel_interpretation(this: &ChannelSplitterOptions, val: ChannelInterpretation); + pub fn set_channel_interpretation(this: &ChannelSplitterOptions, val: ChannelInterpretation); #[doc = "Get the `numberOfOutputs` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ChannelSplitterOptions`*"] #[wasm_bindgen(method, getter = "numberOfOutputs")] pub fn get_number_of_outputs(this: &ChannelSplitterOptions) -> Option; + #[doc = "Change the `numberOfOutputs` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelSplitterOptions`*"] #[wasm_bindgen(method, setter = "numberOfOutputs")] - fn set_number_of_outputs(this: &ChannelSplitterOptions, val: u32); + pub fn set_number_of_outputs(this: &ChannelSplitterOptions, val: u32); } impl ChannelSplitterOptions { #[doc = "Construct a new `ChannelSplitterOptions`."] @@ -54,32 +66,24 @@ impl ChannelSplitterOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `channelCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChannelSplitterOptions`*"] + #[deprecated = "Use `set_channel_count()` instead."] pub fn channel_count(&mut self, val: u32) -> &mut Self { self.set_channel_count(val); self } #[cfg(feature = "ChannelCountMode")] - #[doc = "Change the `channelCountMode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `ChannelSplitterOptions`*"] + #[deprecated = "Use `set_channel_count_mode()` instead."] pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self { self.set_channel_count_mode(val); self } #[cfg(feature = "ChannelInterpretation")] - #[doc = "Change the `channelInterpretation` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `ChannelSplitterOptions`*"] + #[deprecated = "Use `set_channel_interpretation()` instead."] pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self { self.set_channel_interpretation(val); self } - #[doc = "Change the `numberOfOutputs` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChannelSplitterOptions`*"] + #[deprecated = "Use `set_number_of_outputs()` instead."] pub fn number_of_outputs(&mut self, val: u32) -> &mut Self { self.set_number_of_outputs(val); self diff --git a/crates/web-sys/src/features/gen_CheckerboardReport.rs b/crates/web-sys/src/features/gen_CheckerboardReport.rs index 06d10097aa87..688404043236 100644 --- a/crates/web-sys/src/features/gen_CheckerboardReport.rs +++ b/crates/web-sys/src/features/gen_CheckerboardReport.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `CheckerboardReport`*"] #[wasm_bindgen(method, getter = "log")] pub fn get_log(this: &CheckerboardReport) -> Option; + #[doc = "Change the `log` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CheckerboardReport`*"] #[wasm_bindgen(method, setter = "log")] - fn set_log(this: &CheckerboardReport, val: &str); + pub fn set_log(this: &CheckerboardReport, val: &str); #[cfg(feature = "CheckerboardReason")] #[doc = "Get the `reason` field of this object."] #[doc = ""] @@ -24,22 +27,31 @@ extern "C" { #[wasm_bindgen(method, getter = "reason")] pub fn get_reason(this: &CheckerboardReport) -> Option; #[cfg(feature = "CheckerboardReason")] + #[doc = "Change the `reason` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CheckerboardReason`, `CheckerboardReport`*"] #[wasm_bindgen(method, setter = "reason")] - fn set_reason(this: &CheckerboardReport, val: CheckerboardReason); + pub fn set_reason(this: &CheckerboardReport, val: CheckerboardReason); #[doc = "Get the `severity` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CheckerboardReport`*"] #[wasm_bindgen(method, getter = "severity")] pub fn get_severity(this: &CheckerboardReport) -> Option; + #[doc = "Change the `severity` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CheckerboardReport`*"] #[wasm_bindgen(method, setter = "severity")] - fn set_severity(this: &CheckerboardReport, val: u32); + pub fn set_severity(this: &CheckerboardReport, val: u32); #[doc = "Get the `timestamp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CheckerboardReport`*"] #[wasm_bindgen(method, getter = "timestamp")] pub fn get_timestamp(this: &CheckerboardReport) -> Option; + #[doc = "Change the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CheckerboardReport`*"] #[wasm_bindgen(method, setter = "timestamp")] - fn set_timestamp(this: &CheckerboardReport, val: f64); + pub fn set_timestamp(this: &CheckerboardReport, val: f64); } impl CheckerboardReport { #[doc = "Construct a new `CheckerboardReport`."] @@ -50,31 +62,23 @@ impl CheckerboardReport { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `log` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CheckerboardReport`*"] + #[deprecated = "Use `set_log()` instead."] pub fn log(&mut self, val: &str) -> &mut Self { self.set_log(val); self } #[cfg(feature = "CheckerboardReason")] - #[doc = "Change the `reason` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CheckerboardReason`, `CheckerboardReport`*"] + #[deprecated = "Use `set_reason()` instead."] pub fn reason(&mut self, val: CheckerboardReason) -> &mut Self { self.set_reason(val); self } - #[doc = "Change the `severity` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CheckerboardReport`*"] + #[deprecated = "Use `set_severity()` instead."] pub fn severity(&mut self, val: u32) -> &mut Self { self.set_severity(val); self } - #[doc = "Change the `timestamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CheckerboardReport`*"] + #[deprecated = "Use `set_timestamp()` instead."] pub fn timestamp(&mut self, val: f64) -> &mut Self { self.set_timestamp(val); self diff --git a/crates/web-sys/src/features/gen_ChromeFilePropertyBag.rs b/crates/web-sys/src/features/gen_ChromeFilePropertyBag.rs index 556924acfd42..7ab4711ab1ca 100644 --- a/crates/web-sys/src/features/gen_ChromeFilePropertyBag.rs +++ b/crates/web-sys/src/features/gen_ChromeFilePropertyBag.rs @@ -15,29 +15,41 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ChromeFilePropertyBag`*"] #[wasm_bindgen(method, getter = "lastModified")] pub fn get_last_modified(this: &ChromeFilePropertyBag) -> Option; + #[doc = "Change the `lastModified` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChromeFilePropertyBag`*"] #[wasm_bindgen(method, setter = "lastModified")] - fn set_last_modified(this: &ChromeFilePropertyBag, val: f64); + pub fn set_last_modified(this: &ChromeFilePropertyBag, val: f64); #[doc = "Get the `type` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ChromeFilePropertyBag`*"] #[wasm_bindgen(method, getter = "type")] pub fn get_type(this: &ChromeFilePropertyBag) -> Option; + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChromeFilePropertyBag`*"] #[wasm_bindgen(method, setter = "type")] - fn set_type(this: &ChromeFilePropertyBag, val: &str); + pub fn set_type(this: &ChromeFilePropertyBag, val: &str); #[doc = "Get the `existenceCheck` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ChromeFilePropertyBag`*"] #[wasm_bindgen(method, getter = "existenceCheck")] pub fn get_existence_check(this: &ChromeFilePropertyBag) -> Option; + #[doc = "Change the `existenceCheck` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChromeFilePropertyBag`*"] #[wasm_bindgen(method, setter = "existenceCheck")] - fn set_existence_check(this: &ChromeFilePropertyBag, val: bool); + pub fn set_existence_check(this: &ChromeFilePropertyBag, val: bool); #[doc = "Get the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ChromeFilePropertyBag`*"] #[wasm_bindgen(method, getter = "name")] pub fn get_name(this: &ChromeFilePropertyBag) -> Option; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChromeFilePropertyBag`*"] #[wasm_bindgen(method, setter = "name")] - fn set_name(this: &ChromeFilePropertyBag, val: &str); + pub fn set_name(this: &ChromeFilePropertyBag, val: &str); } impl ChromeFilePropertyBag { #[doc = "Construct a new `ChromeFilePropertyBag`."] @@ -48,30 +60,22 @@ impl ChromeFilePropertyBag { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `lastModified` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChromeFilePropertyBag`*"] + #[deprecated = "Use `set_last_modified()` instead."] pub fn last_modified(&mut self, val: f64) -> &mut Self { self.set_last_modified(val); self } - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChromeFilePropertyBag`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: &str) -> &mut Self { self.set_type(val); self } - #[doc = "Change the `existenceCheck` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChromeFilePropertyBag`*"] + #[deprecated = "Use `set_existence_check()` instead."] pub fn existence_check(&mut self, val: bool) -> &mut Self { self.set_existence_check(val); self } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChromeFilePropertyBag`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { self.set_name(val); self diff --git a/crates/web-sys/src/features/gen_ClientQueryOptions.rs b/crates/web-sys/src/features/gen_ClientQueryOptions.rs index 68c0fdf60a94..941af010e59a 100644 --- a/crates/web-sys/src/features/gen_ClientQueryOptions.rs +++ b/crates/web-sys/src/features/gen_ClientQueryOptions.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ClientQueryOptions`*"] #[wasm_bindgen(method, getter = "includeUncontrolled")] pub fn get_include_uncontrolled(this: &ClientQueryOptions) -> Option; + #[doc = "Change the `includeUncontrolled` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ClientQueryOptions`*"] #[wasm_bindgen(method, setter = "includeUncontrolled")] - fn set_include_uncontrolled(this: &ClientQueryOptions, val: bool); + pub fn set_include_uncontrolled(this: &ClientQueryOptions, val: bool); #[cfg(feature = "ClientType")] #[doc = "Get the `type` field of this object."] #[doc = ""] @@ -24,8 +27,11 @@ extern "C" { #[wasm_bindgen(method, getter = "type")] pub fn get_type(this: &ClientQueryOptions) -> Option; #[cfg(feature = "ClientType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ClientQueryOptions`, `ClientType`*"] #[wasm_bindgen(method, setter = "type")] - fn set_type(this: &ClientQueryOptions, val: ClientType); + pub fn set_type(this: &ClientQueryOptions, val: ClientType); } impl ClientQueryOptions { #[doc = "Construct a new `ClientQueryOptions`."] @@ -36,17 +42,13 @@ impl ClientQueryOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `includeUncontrolled` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ClientQueryOptions`*"] + #[deprecated = "Use `set_include_uncontrolled()` instead."] pub fn include_uncontrolled(&mut self, val: bool) -> &mut Self { self.set_include_uncontrolled(val); self } #[cfg(feature = "ClientType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ClientQueryOptions`, `ClientType`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: ClientType) -> &mut Self { self.set_type(val); self diff --git a/crates/web-sys/src/features/gen_ClientRectsAndTexts.rs b/crates/web-sys/src/features/gen_ClientRectsAndTexts.rs index 6f94b902bdf0..0aa0cf488713 100644 --- a/crates/web-sys/src/features/gen_ClientRectsAndTexts.rs +++ b/crates/web-sys/src/features/gen_ClientRectsAndTexts.rs @@ -17,15 +17,21 @@ extern "C" { #[wasm_bindgen(method, getter = "rectList")] pub fn get_rect_list(this: &ClientRectsAndTexts) -> DomRectList; #[cfg(feature = "DomRectList")] + #[doc = "Change the `rectList` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ClientRectsAndTexts`, `DomRectList`*"] #[wasm_bindgen(method, setter = "rectList")] - fn set_rect_list(this: &ClientRectsAndTexts, val: &DomRectList); + pub fn set_rect_list(this: &ClientRectsAndTexts, val: &DomRectList); #[doc = "Get the `textList` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ClientRectsAndTexts`*"] #[wasm_bindgen(method, getter = "textList")] pub fn get_text_list(this: &ClientRectsAndTexts) -> ::js_sys::Array; + #[doc = "Change the `textList` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ClientRectsAndTexts`*"] #[wasm_bindgen(method, setter = "textList")] - fn set_text_list(this: &ClientRectsAndTexts, val: &::wasm_bindgen::JsValue); + pub fn set_text_list(this: &ClientRectsAndTexts, val: &::wasm_bindgen::JsValue); } impl ClientRectsAndTexts { #[cfg(feature = "DomRectList")] @@ -40,16 +46,12 @@ impl ClientRectsAndTexts { ret } #[cfg(feature = "DomRectList")] - #[doc = "Change the `rectList` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ClientRectsAndTexts`, `DomRectList`*"] + #[deprecated = "Use `set_rect_list()` instead."] pub fn rect_list(&mut self, val: &DomRectList) -> &mut Self { self.set_rect_list(val); self } - #[doc = "Change the `textList` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ClientRectsAndTexts`*"] + #[deprecated = "Use `set_text_list()` instead."] pub fn text_list(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_text_list(val); self diff --git a/crates/web-sys/src/features/gen_ClipboardEventInit.rs b/crates/web-sys/src/features/gen_ClipboardEventInit.rs index decb280f1912..c0f0c649583a 100644 --- a/crates/web-sys/src/features/gen_ClipboardEventInit.rs +++ b/crates/web-sys/src/features/gen_ClipboardEventInit.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ClipboardEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &ClipboardEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ClipboardEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &ClipboardEventInit, val: bool); + pub fn set_bubbles(this: &ClipboardEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ClipboardEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &ClipboardEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ClipboardEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &ClipboardEventInit, val: bool); + pub fn set_cancelable(this: &ClipboardEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ClipboardEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &ClipboardEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ClipboardEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &ClipboardEventInit, val: bool); + pub fn set_composed(this: &ClipboardEventInit, val: bool); #[cfg(feature = "DataTransfer")] #[doc = "Get the `clipboardData` field of this object."] #[doc = ""] @@ -38,8 +47,11 @@ extern "C" { #[wasm_bindgen(method, getter = "clipboardData")] pub fn get_clipboard_data(this: &ClipboardEventInit) -> Option; #[cfg(feature = "DataTransfer")] + #[doc = "Change the `clipboardData` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ClipboardEventInit`, `DataTransfer`*"] #[wasm_bindgen(method, setter = "clipboardData")] - fn set_clipboard_data(this: &ClipboardEventInit, val: Option<&DataTransfer>); + pub fn set_clipboard_data(this: &ClipboardEventInit, val: Option<&DataTransfer>); } impl ClipboardEventInit { #[doc = "Construct a new `ClipboardEventInit`."] @@ -50,31 +62,23 @@ impl ClipboardEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ClipboardEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ClipboardEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ClipboardEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } #[cfg(feature = "DataTransfer")] - #[doc = "Change the `clipboardData` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ClipboardEventInit`, `DataTransfer`*"] + #[deprecated = "Use `set_clipboard_data()` instead."] pub fn clipboard_data(&mut self, val: Option<&DataTransfer>) -> &mut Self { self.set_clipboard_data(val); self diff --git a/crates/web-sys/src/features/gen_ClipboardItemOptions.rs b/crates/web-sys/src/features/gen_ClipboardItemOptions.rs index b9843d02fcd7..1d38cd6ffbce 100644 --- a/crates/web-sys/src/features/gen_ClipboardItemOptions.rs +++ b/crates/web-sys/src/features/gen_ClipboardItemOptions.rs @@ -24,9 +24,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "presentationStyle")] pub fn get_presentation_style(this: &ClipboardItemOptions) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "PresentationStyle")] + #[doc = "Change the `presentationStyle` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ClipboardItemOptions`, `PresentationStyle`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "presentationStyle")] - fn set_presentation_style(this: &ClipboardItemOptions, val: PresentationStyle); + pub fn set_presentation_style(this: &ClipboardItemOptions, val: PresentationStyle); } #[cfg(web_sys_unstable_apis)] impl ClipboardItemOptions { @@ -43,12 +50,7 @@ impl ClipboardItemOptions { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "PresentationStyle")] - #[doc = "Change the `presentationStyle` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ClipboardItemOptions`, `PresentationStyle`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_presentation_style()` instead."] pub fn presentation_style(&mut self, val: PresentationStyle) -> &mut Self { self.set_presentation_style(val); self diff --git a/crates/web-sys/src/features/gen_ClipboardPermissionDescriptor.rs b/crates/web-sys/src/features/gen_ClipboardPermissionDescriptor.rs index cd422387dfe3..541b0a317e67 100644 --- a/crates/web-sys/src/features/gen_ClipboardPermissionDescriptor.rs +++ b/crates/web-sys/src/features/gen_ClipboardPermissionDescriptor.rs @@ -24,9 +24,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "name")] pub fn get_name(this: &ClipboardPermissionDescriptor) -> PermissionName; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "PermissionName")] + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ClipboardPermissionDescriptor`, `PermissionName`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "name")] - fn set_name(this: &ClipboardPermissionDescriptor, val: PermissionName); + pub fn set_name(this: &ClipboardPermissionDescriptor, val: PermissionName); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `allowWithoutGesture` field of this object."] #[doc = ""] @@ -36,8 +43,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "allowWithoutGesture")] pub fn get_allow_without_gesture(this: &ClipboardPermissionDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `allowWithoutGesture` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ClipboardPermissionDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "allowWithoutGesture")] - fn set_allow_without_gesture(this: &ClipboardPermissionDescriptor, val: bool); + pub fn set_allow_without_gesture(this: &ClipboardPermissionDescriptor, val: bool); } #[cfg(web_sys_unstable_apis)] impl ClipboardPermissionDescriptor { @@ -56,23 +70,13 @@ impl ClipboardPermissionDescriptor { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "PermissionName")] - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ClipboardPermissionDescriptor`, `PermissionName`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: PermissionName) -> &mut Self { self.set_name(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `allowWithoutGesture` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ClipboardPermissionDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_allow_without_gesture()` instead."] pub fn allow_without_gesture(&mut self, val: bool) -> &mut Self { self.set_allow_without_gesture(val); self diff --git a/crates/web-sys/src/features/gen_CloseEventInit.rs b/crates/web-sys/src/features/gen_CloseEventInit.rs index 2d434003f3ee..841376c65368 100644 --- a/crates/web-sys/src/features/gen_CloseEventInit.rs +++ b/crates/web-sys/src/features/gen_CloseEventInit.rs @@ -15,43 +15,61 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &CloseEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &CloseEventInit, val: bool); + pub fn set_bubbles(this: &CloseEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &CloseEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &CloseEventInit, val: bool); + pub fn set_cancelable(this: &CloseEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &CloseEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &CloseEventInit, val: bool); + pub fn set_composed(this: &CloseEventInit, val: bool); #[doc = "Get the `code` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"] #[wasm_bindgen(method, getter = "code")] pub fn get_code(this: &CloseEventInit) -> Option; + #[doc = "Change the `code` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"] #[wasm_bindgen(method, setter = "code")] - fn set_code(this: &CloseEventInit, val: u16); + pub fn set_code(this: &CloseEventInit, val: u16); #[doc = "Get the `reason` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"] #[wasm_bindgen(method, getter = "reason")] pub fn get_reason(this: &CloseEventInit) -> Option; + #[doc = "Change the `reason` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"] #[wasm_bindgen(method, setter = "reason")] - fn set_reason(this: &CloseEventInit, val: &str); + pub fn set_reason(this: &CloseEventInit, val: &str); #[doc = "Get the `wasClean` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"] #[wasm_bindgen(method, getter = "wasClean")] pub fn get_was_clean(this: &CloseEventInit) -> Option; + #[doc = "Change the `wasClean` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"] #[wasm_bindgen(method, setter = "wasClean")] - fn set_was_clean(this: &CloseEventInit, val: bool); + pub fn set_was_clean(this: &CloseEventInit, val: bool); } impl CloseEventInit { #[doc = "Construct a new `CloseEventInit`."] @@ -62,44 +80,32 @@ impl CloseEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } - #[doc = "Change the `code` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"] + #[deprecated = "Use `set_code()` instead."] pub fn code(&mut self, val: u16) -> &mut Self { self.set_code(val); self } - #[doc = "Change the `reason` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"] + #[deprecated = "Use `set_reason()` instead."] pub fn reason(&mut self, val: &str) -> &mut Self { self.set_reason(val); self } - #[doc = "Change the `wasClean` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"] + #[deprecated = "Use `set_was_clean()` instead."] pub fn was_clean(&mut self, val: bool) -> &mut Self { self.set_was_clean(val); self diff --git a/crates/web-sys/src/features/gen_CollectedClientData.rs b/crates/web-sys/src/features/gen_CollectedClientData.rs index a7cdb30eb5ad..e483aed9ae70 100644 --- a/crates/web-sys/src/features/gen_CollectedClientData.rs +++ b/crates/web-sys/src/features/gen_CollectedClientData.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"] #[wasm_bindgen(method, getter = "challenge")] pub fn get_challenge(this: &CollectedClientData) -> String; + #[doc = "Change the `challenge` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"] #[wasm_bindgen(method, setter = "challenge")] - fn set_challenge(this: &CollectedClientData, val: &str); + pub fn set_challenge(this: &CollectedClientData, val: &str); #[cfg(feature = "AuthenticationExtensionsClientInputs")] #[doc = "Get the `clientExtensions` field of this object."] #[doc = ""] @@ -26,8 +29,11 @@ extern "C" { this: &CollectedClientData, ) -> Option; #[cfg(feature = "AuthenticationExtensionsClientInputs")] + #[doc = "Change the `clientExtensions` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientInputs`, `CollectedClientData`*"] #[wasm_bindgen(method, setter = "clientExtensions")] - fn set_client_extensions( + pub fn set_client_extensions( this: &CollectedClientData, val: &AuthenticationExtensionsClientInputs, ); @@ -36,29 +42,41 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"] #[wasm_bindgen(method, getter = "hashAlgorithm")] pub fn get_hash_algorithm(this: &CollectedClientData) -> String; + #[doc = "Change the `hashAlgorithm` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"] #[wasm_bindgen(method, setter = "hashAlgorithm")] - fn set_hash_algorithm(this: &CollectedClientData, val: &str); + pub fn set_hash_algorithm(this: &CollectedClientData, val: &str); #[doc = "Get the `origin` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"] #[wasm_bindgen(method, getter = "origin")] pub fn get_origin(this: &CollectedClientData) -> String; + #[doc = "Change the `origin` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"] #[wasm_bindgen(method, setter = "origin")] - fn set_origin(this: &CollectedClientData, val: &str); + pub fn set_origin(this: &CollectedClientData, val: &str); #[doc = "Get the `tokenBindingId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"] #[wasm_bindgen(method, getter = "tokenBindingId")] pub fn get_token_binding_id(this: &CollectedClientData) -> Option; + #[doc = "Change the `tokenBindingId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"] #[wasm_bindgen(method, setter = "tokenBindingId")] - fn set_token_binding_id(this: &CollectedClientData, val: &str); + pub fn set_token_binding_id(this: &CollectedClientData, val: &str); #[doc = "Get the `type` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"] #[wasm_bindgen(method, getter = "type")] pub fn get_type(this: &CollectedClientData) -> String; + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"] #[wasm_bindgen(method, setter = "type")] - fn set_type(this: &CollectedClientData, val: &str); + pub fn set_type(this: &CollectedClientData, val: &str); } impl CollectedClientData { #[doc = "Construct a new `CollectedClientData`."] @@ -73,45 +91,33 @@ impl CollectedClientData { ret.type_(type_); ret } - #[doc = "Change the `challenge` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"] + #[deprecated = "Use `set_challenge()` instead."] pub fn challenge(&mut self, val: &str) -> &mut Self { self.set_challenge(val); self } #[cfg(feature = "AuthenticationExtensionsClientInputs")] - #[doc = "Change the `clientExtensions` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientInputs`, `CollectedClientData`*"] + #[deprecated = "Use `set_client_extensions()` instead."] pub fn client_extensions(&mut self, val: &AuthenticationExtensionsClientInputs) -> &mut Self { self.set_client_extensions(val); self } - #[doc = "Change the `hashAlgorithm` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"] + #[deprecated = "Use `set_hash_algorithm()` instead."] pub fn hash_algorithm(&mut self, val: &str) -> &mut Self { self.set_hash_algorithm(val); self } - #[doc = "Change the `origin` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"] + #[deprecated = "Use `set_origin()` instead."] pub fn origin(&mut self, val: &str) -> &mut Self { self.set_origin(val); self } - #[doc = "Change the `tokenBindingId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"] + #[deprecated = "Use `set_token_binding_id()` instead."] pub fn token_binding_id(&mut self, val: &str) -> &mut Self { self.set_token_binding_id(val); self } - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: &str) -> &mut Self { self.set_type(val); self diff --git a/crates/web-sys/src/features/gen_CompositionEventInit.rs b/crates/web-sys/src/features/gen_CompositionEventInit.rs index 587770ba57cf..79acc2f4d535 100644 --- a/crates/web-sys/src/features/gen_CompositionEventInit.rs +++ b/crates/web-sys/src/features/gen_CompositionEventInit.rs @@ -15,29 +15,41 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &CompositionEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &CompositionEventInit, val: bool); + pub fn set_bubbles(this: &CompositionEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &CompositionEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &CompositionEventInit, val: bool); + pub fn set_cancelable(this: &CompositionEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &CompositionEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &CompositionEventInit, val: bool); + pub fn set_composed(this: &CompositionEventInit, val: bool); #[doc = "Get the `detail` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`*"] #[wasm_bindgen(method, getter = "detail")] pub fn get_detail(this: &CompositionEventInit) -> Option; + #[doc = "Change the `detail` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`*"] #[wasm_bindgen(method, setter = "detail")] - fn set_detail(this: &CompositionEventInit, val: i32); + pub fn set_detail(this: &CompositionEventInit, val: i32); #[cfg(feature = "Window")] #[doc = "Get the `view` field of this object."] #[doc = ""] @@ -45,15 +57,21 @@ extern "C" { #[wasm_bindgen(method, getter = "view")] pub fn get_view(this: &CompositionEventInit) -> Option; #[cfg(feature = "Window")] + #[doc = "Change the `view` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`, `Window`*"] #[wasm_bindgen(method, setter = "view")] - fn set_view(this: &CompositionEventInit, val: Option<&Window>); + pub fn set_view(this: &CompositionEventInit, val: Option<&Window>); #[doc = "Get the `data` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`*"] #[wasm_bindgen(method, getter = "data")] pub fn get_data(this: &CompositionEventInit) -> Option; + #[doc = "Change the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`*"] #[wasm_bindgen(method, setter = "data")] - fn set_data(this: &CompositionEventInit, val: &str); + pub fn set_data(this: &CompositionEventInit, val: &str); } impl CompositionEventInit { #[doc = "Construct a new `CompositionEventInit`."] @@ -64,45 +82,33 @@ impl CompositionEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } - #[doc = "Change the `detail` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`*"] + #[deprecated = "Use `set_detail()` instead."] pub fn detail(&mut self, val: i32) -> &mut Self { self.set_detail(val); self } #[cfg(feature = "Window")] - #[doc = "Change the `view` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`, `Window`*"] + #[deprecated = "Use `set_view()` instead."] pub fn view(&mut self, val: Option<&Window>) -> &mut Self { self.set_view(val); self } - #[doc = "Change the `data` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`*"] + #[deprecated = "Use `set_data()` instead."] pub fn data(&mut self, val: &str) -> &mut Self { self.set_data(val); self diff --git a/crates/web-sys/src/features/gen_ComputedEffectTiming.rs b/crates/web-sys/src/features/gen_ComputedEffectTiming.rs index df0382617c8c..a079e830f73b 100644 --- a/crates/web-sys/src/features/gen_ComputedEffectTiming.rs +++ b/crates/web-sys/src/features/gen_ComputedEffectTiming.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] #[wasm_bindgen(method, getter = "delay")] pub fn get_delay(this: &ComputedEffectTiming) -> Option; + #[doc = "Change the `delay` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] #[wasm_bindgen(method, setter = "delay")] - fn set_delay(this: &ComputedEffectTiming, val: f64); + pub fn set_delay(this: &ComputedEffectTiming, val: f64); #[cfg(feature = "PlaybackDirection")] #[doc = "Get the `direction` field of this object."] #[doc = ""] @@ -24,29 +27,41 @@ extern "C" { #[wasm_bindgen(method, getter = "direction")] pub fn get_direction(this: &ComputedEffectTiming) -> Option; #[cfg(feature = "PlaybackDirection")] + #[doc = "Change the `direction` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`, `PlaybackDirection`*"] #[wasm_bindgen(method, setter = "direction")] - fn set_direction(this: &ComputedEffectTiming, val: PlaybackDirection); + pub fn set_direction(this: &ComputedEffectTiming, val: PlaybackDirection); #[doc = "Get the `duration` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] #[wasm_bindgen(method, getter = "duration")] pub fn get_duration(this: &ComputedEffectTiming) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `duration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] #[wasm_bindgen(method, setter = "duration")] - fn set_duration(this: &ComputedEffectTiming, val: &::wasm_bindgen::JsValue); + pub fn set_duration(this: &ComputedEffectTiming, val: &::wasm_bindgen::JsValue); #[doc = "Get the `easing` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] #[wasm_bindgen(method, getter = "easing")] pub fn get_easing(this: &ComputedEffectTiming) -> Option; + #[doc = "Change the `easing` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] #[wasm_bindgen(method, setter = "easing")] - fn set_easing(this: &ComputedEffectTiming, val: &str); + pub fn set_easing(this: &ComputedEffectTiming, val: &str); #[doc = "Get the `endDelay` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] #[wasm_bindgen(method, getter = "endDelay")] pub fn get_end_delay(this: &ComputedEffectTiming) -> Option; + #[doc = "Change the `endDelay` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] #[wasm_bindgen(method, setter = "endDelay")] - fn set_end_delay(this: &ComputedEffectTiming, val: f64); + pub fn set_end_delay(this: &ComputedEffectTiming, val: f64); #[cfg(feature = "FillMode")] #[doc = "Get the `fill` field of this object."] #[doc = ""] @@ -54,57 +69,81 @@ extern "C" { #[wasm_bindgen(method, getter = "fill")] pub fn get_fill(this: &ComputedEffectTiming) -> Option; #[cfg(feature = "FillMode")] + #[doc = "Change the `fill` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`, `FillMode`*"] #[wasm_bindgen(method, setter = "fill")] - fn set_fill(this: &ComputedEffectTiming, val: FillMode); + pub fn set_fill(this: &ComputedEffectTiming, val: FillMode); #[doc = "Get the `iterationStart` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] #[wasm_bindgen(method, getter = "iterationStart")] pub fn get_iteration_start(this: &ComputedEffectTiming) -> Option; + #[doc = "Change the `iterationStart` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] #[wasm_bindgen(method, setter = "iterationStart")] - fn set_iteration_start(this: &ComputedEffectTiming, val: f64); + pub fn set_iteration_start(this: &ComputedEffectTiming, val: f64); #[doc = "Get the `iterations` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] #[wasm_bindgen(method, getter = "iterations")] pub fn get_iterations(this: &ComputedEffectTiming) -> Option; + #[doc = "Change the `iterations` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] #[wasm_bindgen(method, setter = "iterations")] - fn set_iterations(this: &ComputedEffectTiming, val: f64); + pub fn set_iterations(this: &ComputedEffectTiming, val: f64); #[doc = "Get the `activeDuration` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] #[wasm_bindgen(method, getter = "activeDuration")] pub fn get_active_duration(this: &ComputedEffectTiming) -> Option; + #[doc = "Change the `activeDuration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] #[wasm_bindgen(method, setter = "activeDuration")] - fn set_active_duration(this: &ComputedEffectTiming, val: f64); + pub fn set_active_duration(this: &ComputedEffectTiming, val: f64); #[doc = "Get the `currentIteration` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] #[wasm_bindgen(method, getter = "currentIteration")] pub fn get_current_iteration(this: &ComputedEffectTiming) -> Option; + #[doc = "Change the `currentIteration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] #[wasm_bindgen(method, setter = "currentIteration")] - fn set_current_iteration(this: &ComputedEffectTiming, val: Option); + pub fn set_current_iteration(this: &ComputedEffectTiming, val: Option); #[doc = "Get the `endTime` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] #[wasm_bindgen(method, getter = "endTime")] pub fn get_end_time(this: &ComputedEffectTiming) -> Option; + #[doc = "Change the `endTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] #[wasm_bindgen(method, setter = "endTime")] - fn set_end_time(this: &ComputedEffectTiming, val: f64); + pub fn set_end_time(this: &ComputedEffectTiming, val: f64); #[doc = "Get the `localTime` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] #[wasm_bindgen(method, getter = "localTime")] pub fn get_local_time(this: &ComputedEffectTiming) -> Option; + #[doc = "Change the `localTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] #[wasm_bindgen(method, setter = "localTime")] - fn set_local_time(this: &ComputedEffectTiming, val: Option); + pub fn set_local_time(this: &ComputedEffectTiming, val: Option); #[doc = "Get the `progress` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] #[wasm_bindgen(method, getter = "progress")] pub fn get_progress(this: &ComputedEffectTiming) -> Option; + #[doc = "Change the `progress` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] #[wasm_bindgen(method, setter = "progress")] - fn set_progress(this: &ComputedEffectTiming, val: Option); + pub fn set_progress(this: &ComputedEffectTiming, val: Option); } impl ComputedEffectTiming { #[doc = "Construct a new `ComputedEffectTiming`."] @@ -115,95 +154,69 @@ impl ComputedEffectTiming { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `delay` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] + #[deprecated = "Use `set_delay()` instead."] pub fn delay(&mut self, val: f64) -> &mut Self { self.set_delay(val); self } #[cfg(feature = "PlaybackDirection")] - #[doc = "Change the `direction` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`, `PlaybackDirection`*"] + #[deprecated = "Use `set_direction()` instead."] pub fn direction(&mut self, val: PlaybackDirection) -> &mut Self { self.set_direction(val); self } - #[doc = "Change the `duration` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] + #[deprecated = "Use `set_duration()` instead."] pub fn duration(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_duration(val); self } - #[doc = "Change the `easing` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] + #[deprecated = "Use `set_easing()` instead."] pub fn easing(&mut self, val: &str) -> &mut Self { self.set_easing(val); self } - #[doc = "Change the `endDelay` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] + #[deprecated = "Use `set_end_delay()` instead."] pub fn end_delay(&mut self, val: f64) -> &mut Self { self.set_end_delay(val); self } #[cfg(feature = "FillMode")] - #[doc = "Change the `fill` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`, `FillMode`*"] + #[deprecated = "Use `set_fill()` instead."] pub fn fill(&mut self, val: FillMode) -> &mut Self { self.set_fill(val); self } - #[doc = "Change the `iterationStart` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] + #[deprecated = "Use `set_iteration_start()` instead."] pub fn iteration_start(&mut self, val: f64) -> &mut Self { self.set_iteration_start(val); self } - #[doc = "Change the `iterations` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] + #[deprecated = "Use `set_iterations()` instead."] pub fn iterations(&mut self, val: f64) -> &mut Self { self.set_iterations(val); self } - #[doc = "Change the `activeDuration` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] + #[deprecated = "Use `set_active_duration()` instead."] pub fn active_duration(&mut self, val: f64) -> &mut Self { self.set_active_duration(val); self } - #[doc = "Change the `currentIteration` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] + #[deprecated = "Use `set_current_iteration()` instead."] pub fn current_iteration(&mut self, val: Option) -> &mut Self { self.set_current_iteration(val); self } - #[doc = "Change the `endTime` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] + #[deprecated = "Use `set_end_time()` instead."] pub fn end_time(&mut self, val: f64) -> &mut Self { self.set_end_time(val); self } - #[doc = "Change the `localTime` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] + #[deprecated = "Use `set_local_time()` instead."] pub fn local_time(&mut self, val: Option) -> &mut Self { self.set_local_time(val); self } - #[doc = "Change the `progress` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] + #[deprecated = "Use `set_progress()` instead."] pub fn progress(&mut self, val: Option) -> &mut Self { self.set_progress(val); self diff --git a/crates/web-sys/src/features/gen_ConnStatusDict.rs b/crates/web-sys/src/features/gen_ConnStatusDict.rs index 940745d9b0cd..e30dac419c10 100644 --- a/crates/web-sys/src/features/gen_ConnStatusDict.rs +++ b/crates/web-sys/src/features/gen_ConnStatusDict.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ConnStatusDict`*"] #[wasm_bindgen(method, getter = "status")] pub fn get_status(this: &ConnStatusDict) -> Option; + #[doc = "Change the `status` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConnStatusDict`*"] #[wasm_bindgen(method, setter = "status")] - fn set_status(this: &ConnStatusDict, val: &str); + pub fn set_status(this: &ConnStatusDict, val: &str); } impl ConnStatusDict { #[doc = "Construct a new `ConnStatusDict`."] @@ -27,9 +30,7 @@ impl ConnStatusDict { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `status` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConnStatusDict`*"] + #[deprecated = "Use `set_status()` instead."] pub fn status(&mut self, val: &str) -> &mut Self { self.set_status(val); self diff --git a/crates/web-sys/src/features/gen_ConsoleCounter.rs b/crates/web-sys/src/features/gen_ConsoleCounter.rs index 0dc542cbbbef..324e055fd0f1 100644 --- a/crates/web-sys/src/features/gen_ConsoleCounter.rs +++ b/crates/web-sys/src/features/gen_ConsoleCounter.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ConsoleCounter`*"] #[wasm_bindgen(method, getter = "count")] pub fn get_count(this: &ConsoleCounter) -> Option; + #[doc = "Change the `count` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleCounter`*"] #[wasm_bindgen(method, setter = "count")] - fn set_count(this: &ConsoleCounter, val: u32); + pub fn set_count(this: &ConsoleCounter, val: u32); #[doc = "Get the `label` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleCounter`*"] #[wasm_bindgen(method, getter = "label")] pub fn get_label(this: &ConsoleCounter) -> Option; + #[doc = "Change the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleCounter`*"] #[wasm_bindgen(method, setter = "label")] - fn set_label(this: &ConsoleCounter, val: &str); + pub fn set_label(this: &ConsoleCounter, val: &str); } impl ConsoleCounter { #[doc = "Construct a new `ConsoleCounter`."] @@ -34,16 +40,12 @@ impl ConsoleCounter { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `count` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleCounter`*"] + #[deprecated = "Use `set_count()` instead."] pub fn count(&mut self, val: u32) -> &mut Self { self.set_count(val); self } - #[doc = "Change the `label` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleCounter`*"] + #[deprecated = "Use `set_label()` instead."] pub fn label(&mut self, val: &str) -> &mut Self { self.set_label(val); self diff --git a/crates/web-sys/src/features/gen_ConsoleCounterError.rs b/crates/web-sys/src/features/gen_ConsoleCounterError.rs index 981c888ad136..bbc0a56a2f82 100644 --- a/crates/web-sys/src/features/gen_ConsoleCounterError.rs +++ b/crates/web-sys/src/features/gen_ConsoleCounterError.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ConsoleCounterError`*"] #[wasm_bindgen(method, getter = "error")] pub fn get_error(this: &ConsoleCounterError) -> Option; + #[doc = "Change the `error` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleCounterError`*"] #[wasm_bindgen(method, setter = "error")] - fn set_error(this: &ConsoleCounterError, val: &str); + pub fn set_error(this: &ConsoleCounterError, val: &str); #[doc = "Get the `label` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleCounterError`*"] #[wasm_bindgen(method, getter = "label")] pub fn get_label(this: &ConsoleCounterError) -> Option; + #[doc = "Change the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleCounterError`*"] #[wasm_bindgen(method, setter = "label")] - fn set_label(this: &ConsoleCounterError, val: &str); + pub fn set_label(this: &ConsoleCounterError, val: &str); } impl ConsoleCounterError { #[doc = "Construct a new `ConsoleCounterError`."] @@ -34,16 +40,12 @@ impl ConsoleCounterError { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `error` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleCounterError`*"] + #[deprecated = "Use `set_error()` instead."] pub fn error(&mut self, val: &str) -> &mut Self { self.set_error(val); self } - #[doc = "Change the `label` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleCounterError`*"] + #[deprecated = "Use `set_label()` instead."] pub fn label(&mut self, val: &str) -> &mut Self { self.set_label(val); self diff --git a/crates/web-sys/src/features/gen_ConsoleEvent.rs b/crates/web-sys/src/features/gen_ConsoleEvent.rs index 3667fd4dee6a..1ab9de14dd22 100644 --- a/crates/web-sys/src/features/gen_ConsoleEvent.rs +++ b/crates/web-sys/src/features/gen_ConsoleEvent.rs @@ -15,120 +15,171 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] #[wasm_bindgen(method, getter = "ID")] pub fn get_id(this: &ConsoleEvent) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `ID` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] #[wasm_bindgen(method, setter = "ID")] - fn set_id(this: &ConsoleEvent, val: &::wasm_bindgen::JsValue); + pub fn set_id(this: &ConsoleEvent, val: &::wasm_bindgen::JsValue); #[doc = "Get the `addonId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] #[wasm_bindgen(method, getter = "addonId")] pub fn get_addon_id(this: &ConsoleEvent) -> Option; + #[doc = "Change the `addonId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] #[wasm_bindgen(method, setter = "addonId")] - fn set_addon_id(this: &ConsoleEvent, val: &str); + pub fn set_addon_id(this: &ConsoleEvent, val: &str); #[doc = "Get the `arguments` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] #[wasm_bindgen(method, getter = "arguments")] pub fn get_arguments(this: &ConsoleEvent) -> Option<::js_sys::Array>; + #[doc = "Change the `arguments` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] #[wasm_bindgen(method, setter = "arguments")] - fn set_arguments(this: &ConsoleEvent, val: &::wasm_bindgen::JsValue); + pub fn set_arguments(this: &ConsoleEvent, val: &::wasm_bindgen::JsValue); #[doc = "Get the `columnNumber` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] #[wasm_bindgen(method, getter = "columnNumber")] pub fn get_column_number(this: &ConsoleEvent) -> Option; + #[doc = "Change the `columnNumber` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] #[wasm_bindgen(method, setter = "columnNumber")] - fn set_column_number(this: &ConsoleEvent, val: u32); + pub fn set_column_number(this: &ConsoleEvent, val: u32); #[doc = "Get the `consoleID` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] #[wasm_bindgen(method, getter = "consoleID")] pub fn get_console_id(this: &ConsoleEvent) -> Option; + #[doc = "Change the `consoleID` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] #[wasm_bindgen(method, setter = "consoleID")] - fn set_console_id(this: &ConsoleEvent, val: &str); + pub fn set_console_id(this: &ConsoleEvent, val: &str); #[doc = "Get the `counter` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] #[wasm_bindgen(method, getter = "counter")] pub fn get_counter(this: &ConsoleEvent) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `counter` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] #[wasm_bindgen(method, setter = "counter")] - fn set_counter(this: &ConsoleEvent, val: &::wasm_bindgen::JsValue); + pub fn set_counter(this: &ConsoleEvent, val: &::wasm_bindgen::JsValue); #[doc = "Get the `filename` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] #[wasm_bindgen(method, getter = "filename")] pub fn get_filename(this: &ConsoleEvent) -> Option; + #[doc = "Change the `filename` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] #[wasm_bindgen(method, setter = "filename")] - fn set_filename(this: &ConsoleEvent, val: &str); + pub fn set_filename(this: &ConsoleEvent, val: &str); #[doc = "Get the `functionName` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] #[wasm_bindgen(method, getter = "functionName")] pub fn get_function_name(this: &ConsoleEvent) -> Option; + #[doc = "Change the `functionName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] #[wasm_bindgen(method, setter = "functionName")] - fn set_function_name(this: &ConsoleEvent, val: &str); + pub fn set_function_name(this: &ConsoleEvent, val: &str); #[doc = "Get the `groupName` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] #[wasm_bindgen(method, getter = "groupName")] pub fn get_group_name(this: &ConsoleEvent) -> Option; + #[doc = "Change the `groupName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] #[wasm_bindgen(method, setter = "groupName")] - fn set_group_name(this: &ConsoleEvent, val: &str); + pub fn set_group_name(this: &ConsoleEvent, val: &str); #[doc = "Get the `innerID` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] #[wasm_bindgen(method, getter = "innerID")] pub fn get_inner_id(this: &ConsoleEvent) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `innerID` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] #[wasm_bindgen(method, setter = "innerID")] - fn set_inner_id(this: &ConsoleEvent, val: &::wasm_bindgen::JsValue); + pub fn set_inner_id(this: &ConsoleEvent, val: &::wasm_bindgen::JsValue); #[doc = "Get the `level` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] #[wasm_bindgen(method, getter = "level")] pub fn get_level(this: &ConsoleEvent) -> Option; + #[doc = "Change the `level` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] #[wasm_bindgen(method, setter = "level")] - fn set_level(this: &ConsoleEvent, val: &str); + pub fn set_level(this: &ConsoleEvent, val: &str); #[doc = "Get the `lineNumber` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] #[wasm_bindgen(method, getter = "lineNumber")] pub fn get_line_number(this: &ConsoleEvent) -> Option; + #[doc = "Change the `lineNumber` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] #[wasm_bindgen(method, setter = "lineNumber")] - fn set_line_number(this: &ConsoleEvent, val: u32); + pub fn set_line_number(this: &ConsoleEvent, val: u32); #[doc = "Get the `prefix` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] #[wasm_bindgen(method, getter = "prefix")] pub fn get_prefix(this: &ConsoleEvent) -> Option; + #[doc = "Change the `prefix` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] #[wasm_bindgen(method, setter = "prefix")] - fn set_prefix(this: &ConsoleEvent, val: &str); + pub fn set_prefix(this: &ConsoleEvent, val: &str); #[doc = "Get the `private` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] #[wasm_bindgen(method, getter = "private")] pub fn get_private(this: &ConsoleEvent) -> Option; + #[doc = "Change the `private` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] #[wasm_bindgen(method, setter = "private")] - fn set_private(this: &ConsoleEvent, val: bool); + pub fn set_private(this: &ConsoleEvent, val: bool); #[doc = "Get the `styles` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] #[wasm_bindgen(method, getter = "styles")] pub fn get_styles(this: &ConsoleEvent) -> Option<::js_sys::Array>; + #[doc = "Change the `styles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] #[wasm_bindgen(method, setter = "styles")] - fn set_styles(this: &ConsoleEvent, val: &::wasm_bindgen::JsValue); + pub fn set_styles(this: &ConsoleEvent, val: &::wasm_bindgen::JsValue); #[doc = "Get the `timeStamp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] #[wasm_bindgen(method, getter = "timeStamp")] pub fn get_time_stamp(this: &ConsoleEvent) -> Option; + #[doc = "Change the `timeStamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] #[wasm_bindgen(method, setter = "timeStamp")] - fn set_time_stamp(this: &ConsoleEvent, val: f64); + pub fn set_time_stamp(this: &ConsoleEvent, val: f64); #[doc = "Get the `timer` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] #[wasm_bindgen(method, getter = "timer")] pub fn get_timer(this: &ConsoleEvent) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `timer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] #[wasm_bindgen(method, setter = "timer")] - fn set_timer(this: &ConsoleEvent, val: &::wasm_bindgen::JsValue); + pub fn set_timer(this: &ConsoleEvent, val: &::wasm_bindgen::JsValue); } impl ConsoleEvent { #[doc = "Construct a new `ConsoleEvent`."] @@ -139,121 +190,87 @@ impl ConsoleEvent { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `ID` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + #[deprecated = "Use `set_id()` instead."] pub fn id(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_id(val); self } - #[doc = "Change the `addonId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + #[deprecated = "Use `set_addon_id()` instead."] pub fn addon_id(&mut self, val: &str) -> &mut Self { self.set_addon_id(val); self } - #[doc = "Change the `arguments` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + #[deprecated = "Use `set_arguments()` instead."] pub fn arguments(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_arguments(val); self } - #[doc = "Change the `columnNumber` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + #[deprecated = "Use `set_column_number()` instead."] pub fn column_number(&mut self, val: u32) -> &mut Self { self.set_column_number(val); self } - #[doc = "Change the `consoleID` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + #[deprecated = "Use `set_console_id()` instead."] pub fn console_id(&mut self, val: &str) -> &mut Self { self.set_console_id(val); self } - #[doc = "Change the `counter` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + #[deprecated = "Use `set_counter()` instead."] pub fn counter(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_counter(val); self } - #[doc = "Change the `filename` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + #[deprecated = "Use `set_filename()` instead."] pub fn filename(&mut self, val: &str) -> &mut Self { self.set_filename(val); self } - #[doc = "Change the `functionName` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + #[deprecated = "Use `set_function_name()` instead."] pub fn function_name(&mut self, val: &str) -> &mut Self { self.set_function_name(val); self } - #[doc = "Change the `groupName` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + #[deprecated = "Use `set_group_name()` instead."] pub fn group_name(&mut self, val: &str) -> &mut Self { self.set_group_name(val); self } - #[doc = "Change the `innerID` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + #[deprecated = "Use `set_inner_id()` instead."] pub fn inner_id(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_inner_id(val); self } - #[doc = "Change the `level` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + #[deprecated = "Use `set_level()` instead."] pub fn level(&mut self, val: &str) -> &mut Self { self.set_level(val); self } - #[doc = "Change the `lineNumber` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + #[deprecated = "Use `set_line_number()` instead."] pub fn line_number(&mut self, val: u32) -> &mut Self { self.set_line_number(val); self } - #[doc = "Change the `prefix` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + #[deprecated = "Use `set_prefix()` instead."] pub fn prefix(&mut self, val: &str) -> &mut Self { self.set_prefix(val); self } - #[doc = "Change the `private` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + #[deprecated = "Use `set_private()` instead."] pub fn private(&mut self, val: bool) -> &mut Self { self.set_private(val); self } - #[doc = "Change the `styles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + #[deprecated = "Use `set_styles()` instead."] pub fn styles(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_styles(val); self } - #[doc = "Change the `timeStamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + #[deprecated = "Use `set_time_stamp()` instead."] pub fn time_stamp(&mut self, val: f64) -> &mut Self { self.set_time_stamp(val); self } - #[doc = "Change the `timer` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + #[deprecated = "Use `set_timer()` instead."] pub fn timer(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_timer(val); self diff --git a/crates/web-sys/src/features/gen_ConsoleInstanceOptions.rs b/crates/web-sys/src/features/gen_ConsoleInstanceOptions.rs index 9fef158b14d2..49f01a0f33e3 100644 --- a/crates/web-sys/src/features/gen_ConsoleInstanceOptions.rs +++ b/crates/web-sys/src/features/gen_ConsoleInstanceOptions.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"] #[wasm_bindgen(method, getter = "consoleID")] pub fn get_console_id(this: &ConsoleInstanceOptions) -> Option; + #[doc = "Change the `consoleID` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"] #[wasm_bindgen(method, setter = "consoleID")] - fn set_console_id(this: &ConsoleInstanceOptions, val: &str); + pub fn set_console_id(this: &ConsoleInstanceOptions, val: &str); #[doc = "Get the `dump` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"] #[wasm_bindgen(method, getter = "dump")] pub fn get_dump(this: &ConsoleInstanceOptions) -> Option<::js_sys::Function>; + #[doc = "Change the `dump` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"] #[wasm_bindgen(method, setter = "dump")] - fn set_dump(this: &ConsoleInstanceOptions, val: &::js_sys::Function); + pub fn set_dump(this: &ConsoleInstanceOptions, val: &::js_sys::Function); #[doc = "Get the `innerID` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"] #[wasm_bindgen(method, getter = "innerID")] pub fn get_inner_id(this: &ConsoleInstanceOptions) -> Option; + #[doc = "Change the `innerID` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"] #[wasm_bindgen(method, setter = "innerID")] - fn set_inner_id(this: &ConsoleInstanceOptions, val: &str); + pub fn set_inner_id(this: &ConsoleInstanceOptions, val: &str); #[cfg(feature = "ConsoleLogLevel")] #[doc = "Get the `maxLogLevel` field of this object."] #[doc = ""] @@ -38,22 +47,31 @@ extern "C" { #[wasm_bindgen(method, getter = "maxLogLevel")] pub fn get_max_log_level(this: &ConsoleInstanceOptions) -> Option; #[cfg(feature = "ConsoleLogLevel")] + #[doc = "Change the `maxLogLevel` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`, `ConsoleLogLevel`*"] #[wasm_bindgen(method, setter = "maxLogLevel")] - fn set_max_log_level(this: &ConsoleInstanceOptions, val: ConsoleLogLevel); + pub fn set_max_log_level(this: &ConsoleInstanceOptions, val: ConsoleLogLevel); #[doc = "Get the `maxLogLevelPref` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"] #[wasm_bindgen(method, getter = "maxLogLevelPref")] pub fn get_max_log_level_pref(this: &ConsoleInstanceOptions) -> Option; + #[doc = "Change the `maxLogLevelPref` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"] #[wasm_bindgen(method, setter = "maxLogLevelPref")] - fn set_max_log_level_pref(this: &ConsoleInstanceOptions, val: &str); + pub fn set_max_log_level_pref(this: &ConsoleInstanceOptions, val: &str); #[doc = "Get the `prefix` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"] #[wasm_bindgen(method, getter = "prefix")] pub fn get_prefix(this: &ConsoleInstanceOptions) -> Option; + #[doc = "Change the `prefix` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"] #[wasm_bindgen(method, setter = "prefix")] - fn set_prefix(this: &ConsoleInstanceOptions, val: &str); + pub fn set_prefix(this: &ConsoleInstanceOptions, val: &str); } impl ConsoleInstanceOptions { #[doc = "Construct a new `ConsoleInstanceOptions`."] @@ -64,45 +82,33 @@ impl ConsoleInstanceOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `consoleID` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"] + #[deprecated = "Use `set_console_id()` instead."] pub fn console_id(&mut self, val: &str) -> &mut Self { self.set_console_id(val); self } - #[doc = "Change the `dump` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"] + #[deprecated = "Use `set_dump()` instead."] pub fn dump(&mut self, val: &::js_sys::Function) -> &mut Self { self.set_dump(val); self } - #[doc = "Change the `innerID` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"] + #[deprecated = "Use `set_inner_id()` instead."] pub fn inner_id(&mut self, val: &str) -> &mut Self { self.set_inner_id(val); self } #[cfg(feature = "ConsoleLogLevel")] - #[doc = "Change the `maxLogLevel` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`, `ConsoleLogLevel`*"] + #[deprecated = "Use `set_max_log_level()` instead."] pub fn max_log_level(&mut self, val: ConsoleLogLevel) -> &mut Self { self.set_max_log_level(val); self } - #[doc = "Change the `maxLogLevelPref` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"] + #[deprecated = "Use `set_max_log_level_pref()` instead."] pub fn max_log_level_pref(&mut self, val: &str) -> &mut Self { self.set_max_log_level_pref(val); self } - #[doc = "Change the `prefix` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"] + #[deprecated = "Use `set_prefix()` instead."] pub fn prefix(&mut self, val: &str) -> &mut Self { self.set_prefix(val); self diff --git a/crates/web-sys/src/features/gen_ConsoleProfileEvent.rs b/crates/web-sys/src/features/gen_ConsoleProfileEvent.rs index 240ce3fd16ed..a845e746dc1c 100644 --- a/crates/web-sys/src/features/gen_ConsoleProfileEvent.rs +++ b/crates/web-sys/src/features/gen_ConsoleProfileEvent.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ConsoleProfileEvent`*"] #[wasm_bindgen(method, getter = "action")] pub fn get_action(this: &ConsoleProfileEvent) -> Option; + #[doc = "Change the `action` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleProfileEvent`*"] #[wasm_bindgen(method, setter = "action")] - fn set_action(this: &ConsoleProfileEvent, val: &str); + pub fn set_action(this: &ConsoleProfileEvent, val: &str); #[doc = "Get the `arguments` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleProfileEvent`*"] #[wasm_bindgen(method, getter = "arguments")] pub fn get_arguments(this: &ConsoleProfileEvent) -> Option<::js_sys::Array>; + #[doc = "Change the `arguments` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleProfileEvent`*"] #[wasm_bindgen(method, setter = "arguments")] - fn set_arguments(this: &ConsoleProfileEvent, val: &::wasm_bindgen::JsValue); + pub fn set_arguments(this: &ConsoleProfileEvent, val: &::wasm_bindgen::JsValue); } impl ConsoleProfileEvent { #[doc = "Construct a new `ConsoleProfileEvent`."] @@ -34,16 +40,12 @@ impl ConsoleProfileEvent { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `action` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleProfileEvent`*"] + #[deprecated = "Use `set_action()` instead."] pub fn action(&mut self, val: &str) -> &mut Self { self.set_action(val); self } - #[doc = "Change the `arguments` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleProfileEvent`*"] + #[deprecated = "Use `set_arguments()` instead."] pub fn arguments(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_arguments(val); self diff --git a/crates/web-sys/src/features/gen_ConsoleStackEntry.rs b/crates/web-sys/src/features/gen_ConsoleStackEntry.rs index 0e556036ad4f..b1ffa84f6de5 100644 --- a/crates/web-sys/src/features/gen_ConsoleStackEntry.rs +++ b/crates/web-sys/src/features/gen_ConsoleStackEntry.rs @@ -15,36 +15,51 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ConsoleStackEntry`*"] #[wasm_bindgen(method, getter = "asyncCause")] pub fn get_async_cause(this: &ConsoleStackEntry) -> Option; + #[doc = "Change the `asyncCause` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleStackEntry`*"] #[wasm_bindgen(method, setter = "asyncCause")] - fn set_async_cause(this: &ConsoleStackEntry, val: Option<&str>); + pub fn set_async_cause(this: &ConsoleStackEntry, val: Option<&str>); #[doc = "Get the `columnNumber` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleStackEntry`*"] #[wasm_bindgen(method, getter = "columnNumber")] pub fn get_column_number(this: &ConsoleStackEntry) -> Option; + #[doc = "Change the `columnNumber` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleStackEntry`*"] #[wasm_bindgen(method, setter = "columnNumber")] - fn set_column_number(this: &ConsoleStackEntry, val: u32); + pub fn set_column_number(this: &ConsoleStackEntry, val: u32); #[doc = "Get the `filename` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleStackEntry`*"] #[wasm_bindgen(method, getter = "filename")] pub fn get_filename(this: &ConsoleStackEntry) -> Option; + #[doc = "Change the `filename` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleStackEntry`*"] #[wasm_bindgen(method, setter = "filename")] - fn set_filename(this: &ConsoleStackEntry, val: &str); + pub fn set_filename(this: &ConsoleStackEntry, val: &str); #[doc = "Get the `functionName` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleStackEntry`*"] #[wasm_bindgen(method, getter = "functionName")] pub fn get_function_name(this: &ConsoleStackEntry) -> Option; + #[doc = "Change the `functionName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleStackEntry`*"] #[wasm_bindgen(method, setter = "functionName")] - fn set_function_name(this: &ConsoleStackEntry, val: &str); + pub fn set_function_name(this: &ConsoleStackEntry, val: &str); #[doc = "Get the `lineNumber` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleStackEntry`*"] #[wasm_bindgen(method, getter = "lineNumber")] pub fn get_line_number(this: &ConsoleStackEntry) -> Option; + #[doc = "Change the `lineNumber` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleStackEntry`*"] #[wasm_bindgen(method, setter = "lineNumber")] - fn set_line_number(this: &ConsoleStackEntry, val: u32); + pub fn set_line_number(this: &ConsoleStackEntry, val: u32); } impl ConsoleStackEntry { #[doc = "Construct a new `ConsoleStackEntry`."] @@ -55,37 +70,27 @@ impl ConsoleStackEntry { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `asyncCause` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleStackEntry`*"] + #[deprecated = "Use `set_async_cause()` instead."] pub fn async_cause(&mut self, val: Option<&str>) -> &mut Self { self.set_async_cause(val); self } - #[doc = "Change the `columnNumber` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleStackEntry`*"] + #[deprecated = "Use `set_column_number()` instead."] pub fn column_number(&mut self, val: u32) -> &mut Self { self.set_column_number(val); self } - #[doc = "Change the `filename` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleStackEntry`*"] + #[deprecated = "Use `set_filename()` instead."] pub fn filename(&mut self, val: &str) -> &mut Self { self.set_filename(val); self } - #[doc = "Change the `functionName` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleStackEntry`*"] + #[deprecated = "Use `set_function_name()` instead."] pub fn function_name(&mut self, val: &str) -> &mut Self { self.set_function_name(val); self } - #[doc = "Change the `lineNumber` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleStackEntry`*"] + #[deprecated = "Use `set_line_number()` instead."] pub fn line_number(&mut self, val: u32) -> &mut Self { self.set_line_number(val); self diff --git a/crates/web-sys/src/features/gen_ConsoleTimerError.rs b/crates/web-sys/src/features/gen_ConsoleTimerError.rs index bd71d6e5271d..b23bcbf39639 100644 --- a/crates/web-sys/src/features/gen_ConsoleTimerError.rs +++ b/crates/web-sys/src/features/gen_ConsoleTimerError.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ConsoleTimerError`*"] #[wasm_bindgen(method, getter = "error")] pub fn get_error(this: &ConsoleTimerError) -> Option; + #[doc = "Change the `error` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleTimerError`*"] #[wasm_bindgen(method, setter = "error")] - fn set_error(this: &ConsoleTimerError, val: &str); + pub fn set_error(this: &ConsoleTimerError, val: &str); #[doc = "Get the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleTimerError`*"] #[wasm_bindgen(method, getter = "name")] pub fn get_name(this: &ConsoleTimerError) -> Option; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleTimerError`*"] #[wasm_bindgen(method, setter = "name")] - fn set_name(this: &ConsoleTimerError, val: &str); + pub fn set_name(this: &ConsoleTimerError, val: &str); } impl ConsoleTimerError { #[doc = "Construct a new `ConsoleTimerError`."] @@ -34,16 +40,12 @@ impl ConsoleTimerError { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `error` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleTimerError`*"] + #[deprecated = "Use `set_error()` instead."] pub fn error(&mut self, val: &str) -> &mut Self { self.set_error(val); self } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleTimerError`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { self.set_name(val); self diff --git a/crates/web-sys/src/features/gen_ConsoleTimerLogOrEnd.rs b/crates/web-sys/src/features/gen_ConsoleTimerLogOrEnd.rs index 6a56570ee8db..7e74b760b0a2 100644 --- a/crates/web-sys/src/features/gen_ConsoleTimerLogOrEnd.rs +++ b/crates/web-sys/src/features/gen_ConsoleTimerLogOrEnd.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ConsoleTimerLogOrEnd`*"] #[wasm_bindgen(method, getter = "duration")] pub fn get_duration(this: &ConsoleTimerLogOrEnd) -> Option; + #[doc = "Change the `duration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleTimerLogOrEnd`*"] #[wasm_bindgen(method, setter = "duration")] - fn set_duration(this: &ConsoleTimerLogOrEnd, val: f64); + pub fn set_duration(this: &ConsoleTimerLogOrEnd, val: f64); #[doc = "Get the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleTimerLogOrEnd`*"] #[wasm_bindgen(method, getter = "name")] pub fn get_name(this: &ConsoleTimerLogOrEnd) -> Option; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleTimerLogOrEnd`*"] #[wasm_bindgen(method, setter = "name")] - fn set_name(this: &ConsoleTimerLogOrEnd, val: &str); + pub fn set_name(this: &ConsoleTimerLogOrEnd, val: &str); } impl ConsoleTimerLogOrEnd { #[doc = "Construct a new `ConsoleTimerLogOrEnd`."] @@ -34,16 +40,12 @@ impl ConsoleTimerLogOrEnd { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `duration` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleTimerLogOrEnd`*"] + #[deprecated = "Use `set_duration()` instead."] pub fn duration(&mut self, val: f64) -> &mut Self { self.set_duration(val); self } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleTimerLogOrEnd`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { self.set_name(val); self diff --git a/crates/web-sys/src/features/gen_ConsoleTimerStart.rs b/crates/web-sys/src/features/gen_ConsoleTimerStart.rs index 4208f4842264..5d3bd7152261 100644 --- a/crates/web-sys/src/features/gen_ConsoleTimerStart.rs +++ b/crates/web-sys/src/features/gen_ConsoleTimerStart.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ConsoleTimerStart`*"] #[wasm_bindgen(method, getter = "name")] pub fn get_name(this: &ConsoleTimerStart) -> Option; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleTimerStart`*"] #[wasm_bindgen(method, setter = "name")] - fn set_name(this: &ConsoleTimerStart, val: &str); + pub fn set_name(this: &ConsoleTimerStart, val: &str); } impl ConsoleTimerStart { #[doc = "Construct a new `ConsoleTimerStart`."] @@ -27,9 +30,7 @@ impl ConsoleTimerStart { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleTimerStart`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { self.set_name(val); self diff --git a/crates/web-sys/src/features/gen_ConstantSourceOptions.rs b/crates/web-sys/src/features/gen_ConstantSourceOptions.rs index 2828a661b09c..7b96a490b75f 100644 --- a/crates/web-sys/src/features/gen_ConstantSourceOptions.rs +++ b/crates/web-sys/src/features/gen_ConstantSourceOptions.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ConstantSourceOptions`*"] #[wasm_bindgen(method, getter = "offset")] pub fn get_offset(this: &ConstantSourceOptions) -> Option; + #[doc = "Change the `offset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConstantSourceOptions`*"] #[wasm_bindgen(method, setter = "offset")] - fn set_offset(this: &ConstantSourceOptions, val: f32); + pub fn set_offset(this: &ConstantSourceOptions, val: f32); } impl ConstantSourceOptions { #[doc = "Construct a new `ConstantSourceOptions`."] @@ -27,9 +30,7 @@ impl ConstantSourceOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `offset` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConstantSourceOptions`*"] + #[deprecated = "Use `set_offset()` instead."] pub fn offset(&mut self, val: f32) -> &mut Self { self.set_offset(val); self diff --git a/crates/web-sys/src/features/gen_ConstrainBooleanParameters.rs b/crates/web-sys/src/features/gen_ConstrainBooleanParameters.rs index bcf07acf83d4..51b890c87e36 100644 --- a/crates/web-sys/src/features/gen_ConstrainBooleanParameters.rs +++ b/crates/web-sys/src/features/gen_ConstrainBooleanParameters.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ConstrainBooleanParameters`*"] #[wasm_bindgen(method, getter = "exact")] pub fn get_exact(this: &ConstrainBooleanParameters) -> Option; + #[doc = "Change the `exact` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConstrainBooleanParameters`*"] #[wasm_bindgen(method, setter = "exact")] - fn set_exact(this: &ConstrainBooleanParameters, val: bool); + pub fn set_exact(this: &ConstrainBooleanParameters, val: bool); #[doc = "Get the `ideal` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConstrainBooleanParameters`*"] #[wasm_bindgen(method, getter = "ideal")] pub fn get_ideal(this: &ConstrainBooleanParameters) -> Option; + #[doc = "Change the `ideal` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConstrainBooleanParameters`*"] #[wasm_bindgen(method, setter = "ideal")] - fn set_ideal(this: &ConstrainBooleanParameters, val: bool); + pub fn set_ideal(this: &ConstrainBooleanParameters, val: bool); } impl ConstrainBooleanParameters { #[doc = "Construct a new `ConstrainBooleanParameters`."] @@ -34,16 +40,12 @@ impl ConstrainBooleanParameters { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `exact` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConstrainBooleanParameters`*"] + #[deprecated = "Use `set_exact()` instead."] pub fn exact(&mut self, val: bool) -> &mut Self { self.set_exact(val); self } - #[doc = "Change the `ideal` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConstrainBooleanParameters`*"] + #[deprecated = "Use `set_ideal()` instead."] pub fn ideal(&mut self, val: bool) -> &mut Self { self.set_ideal(val); self diff --git a/crates/web-sys/src/features/gen_ConstrainDomStringParameters.rs b/crates/web-sys/src/features/gen_ConstrainDomStringParameters.rs index 934c5eb175cf..b2827f2f1328 100644 --- a/crates/web-sys/src/features/gen_ConstrainDomStringParameters.rs +++ b/crates/web-sys/src/features/gen_ConstrainDomStringParameters.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ConstrainDomStringParameters`*"] #[wasm_bindgen(method, getter = "exact")] pub fn get_exact(this: &ConstrainDomStringParameters) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `exact` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConstrainDomStringParameters`*"] #[wasm_bindgen(method, setter = "exact")] - fn set_exact(this: &ConstrainDomStringParameters, val: &::wasm_bindgen::JsValue); + pub fn set_exact(this: &ConstrainDomStringParameters, val: &::wasm_bindgen::JsValue); #[doc = "Get the `ideal` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConstrainDomStringParameters`*"] #[wasm_bindgen(method, getter = "ideal")] pub fn get_ideal(this: &ConstrainDomStringParameters) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `ideal` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConstrainDomStringParameters`*"] #[wasm_bindgen(method, setter = "ideal")] - fn set_ideal(this: &ConstrainDomStringParameters, val: &::wasm_bindgen::JsValue); + pub fn set_ideal(this: &ConstrainDomStringParameters, val: &::wasm_bindgen::JsValue); } impl ConstrainDomStringParameters { #[doc = "Construct a new `ConstrainDomStringParameters`."] @@ -34,16 +40,12 @@ impl ConstrainDomStringParameters { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `exact` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConstrainDomStringParameters`*"] + #[deprecated = "Use `set_exact()` instead."] pub fn exact(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_exact(val); self } - #[doc = "Change the `ideal` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConstrainDomStringParameters`*"] + #[deprecated = "Use `set_ideal()` instead."] pub fn ideal(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_ideal(val); self diff --git a/crates/web-sys/src/features/gen_ConstrainDoubleRange.rs b/crates/web-sys/src/features/gen_ConstrainDoubleRange.rs index d1d88538e6c5..2a5430320195 100644 --- a/crates/web-sys/src/features/gen_ConstrainDoubleRange.rs +++ b/crates/web-sys/src/features/gen_ConstrainDoubleRange.rs @@ -15,29 +15,41 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ConstrainDoubleRange`*"] #[wasm_bindgen(method, getter = "exact")] pub fn get_exact(this: &ConstrainDoubleRange) -> Option; + #[doc = "Change the `exact` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConstrainDoubleRange`*"] #[wasm_bindgen(method, setter = "exact")] - fn set_exact(this: &ConstrainDoubleRange, val: f64); + pub fn set_exact(this: &ConstrainDoubleRange, val: f64); #[doc = "Get the `ideal` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConstrainDoubleRange`*"] #[wasm_bindgen(method, getter = "ideal")] pub fn get_ideal(this: &ConstrainDoubleRange) -> Option; + #[doc = "Change the `ideal` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConstrainDoubleRange`*"] #[wasm_bindgen(method, setter = "ideal")] - fn set_ideal(this: &ConstrainDoubleRange, val: f64); + pub fn set_ideal(this: &ConstrainDoubleRange, val: f64); #[doc = "Get the `max` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConstrainDoubleRange`*"] #[wasm_bindgen(method, getter = "max")] pub fn get_max(this: &ConstrainDoubleRange) -> Option; + #[doc = "Change the `max` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConstrainDoubleRange`*"] #[wasm_bindgen(method, setter = "max")] - fn set_max(this: &ConstrainDoubleRange, val: f64); + pub fn set_max(this: &ConstrainDoubleRange, val: f64); #[doc = "Get the `min` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConstrainDoubleRange`*"] #[wasm_bindgen(method, getter = "min")] pub fn get_min(this: &ConstrainDoubleRange) -> Option; + #[doc = "Change the `min` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConstrainDoubleRange`*"] #[wasm_bindgen(method, setter = "min")] - fn set_min(this: &ConstrainDoubleRange, val: f64); + pub fn set_min(this: &ConstrainDoubleRange, val: f64); } impl ConstrainDoubleRange { #[doc = "Construct a new `ConstrainDoubleRange`."] @@ -48,30 +60,22 @@ impl ConstrainDoubleRange { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `exact` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConstrainDoubleRange`*"] + #[deprecated = "Use `set_exact()` instead."] pub fn exact(&mut self, val: f64) -> &mut Self { self.set_exact(val); self } - #[doc = "Change the `ideal` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConstrainDoubleRange`*"] + #[deprecated = "Use `set_ideal()` instead."] pub fn ideal(&mut self, val: f64) -> &mut Self { self.set_ideal(val); self } - #[doc = "Change the `max` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConstrainDoubleRange`*"] + #[deprecated = "Use `set_max()` instead."] pub fn max(&mut self, val: f64) -> &mut Self { self.set_max(val); self } - #[doc = "Change the `min` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConstrainDoubleRange`*"] + #[deprecated = "Use `set_min()` instead."] pub fn min(&mut self, val: f64) -> &mut Self { self.set_min(val); self diff --git a/crates/web-sys/src/features/gen_ConstrainLongRange.rs b/crates/web-sys/src/features/gen_ConstrainLongRange.rs index 52035dcd357c..9a284100e08b 100644 --- a/crates/web-sys/src/features/gen_ConstrainLongRange.rs +++ b/crates/web-sys/src/features/gen_ConstrainLongRange.rs @@ -15,29 +15,41 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ConstrainLongRange`*"] #[wasm_bindgen(method, getter = "exact")] pub fn get_exact(this: &ConstrainLongRange) -> Option; + #[doc = "Change the `exact` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConstrainLongRange`*"] #[wasm_bindgen(method, setter = "exact")] - fn set_exact(this: &ConstrainLongRange, val: i32); + pub fn set_exact(this: &ConstrainLongRange, val: i32); #[doc = "Get the `ideal` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConstrainLongRange`*"] #[wasm_bindgen(method, getter = "ideal")] pub fn get_ideal(this: &ConstrainLongRange) -> Option; + #[doc = "Change the `ideal` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConstrainLongRange`*"] #[wasm_bindgen(method, setter = "ideal")] - fn set_ideal(this: &ConstrainLongRange, val: i32); + pub fn set_ideal(this: &ConstrainLongRange, val: i32); #[doc = "Get the `max` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConstrainLongRange`*"] #[wasm_bindgen(method, getter = "max")] pub fn get_max(this: &ConstrainLongRange) -> Option; + #[doc = "Change the `max` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConstrainLongRange`*"] #[wasm_bindgen(method, setter = "max")] - fn set_max(this: &ConstrainLongRange, val: i32); + pub fn set_max(this: &ConstrainLongRange, val: i32); #[doc = "Get the `min` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConstrainLongRange`*"] #[wasm_bindgen(method, getter = "min")] pub fn get_min(this: &ConstrainLongRange) -> Option; + #[doc = "Change the `min` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConstrainLongRange`*"] #[wasm_bindgen(method, setter = "min")] - fn set_min(this: &ConstrainLongRange, val: i32); + pub fn set_min(this: &ConstrainLongRange, val: i32); } impl ConstrainLongRange { #[doc = "Construct a new `ConstrainLongRange`."] @@ -48,30 +60,22 @@ impl ConstrainLongRange { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `exact` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConstrainLongRange`*"] + #[deprecated = "Use `set_exact()` instead."] pub fn exact(&mut self, val: i32) -> &mut Self { self.set_exact(val); self } - #[doc = "Change the `ideal` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConstrainLongRange`*"] + #[deprecated = "Use `set_ideal()` instead."] pub fn ideal(&mut self, val: i32) -> &mut Self { self.set_ideal(val); self } - #[doc = "Change the `max` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConstrainLongRange`*"] + #[deprecated = "Use `set_max()` instead."] pub fn max(&mut self, val: i32) -> &mut Self { self.set_max(val); self } - #[doc = "Change the `min` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConstrainLongRange`*"] + #[deprecated = "Use `set_min()` instead."] pub fn min(&mut self, val: i32) -> &mut Self { self.set_min(val); self diff --git a/crates/web-sys/src/features/gen_ContextAttributes2d.rs b/crates/web-sys/src/features/gen_ContextAttributes2d.rs index c7181536e718..570c3aca5439 100644 --- a/crates/web-sys/src/features/gen_ContextAttributes2d.rs +++ b/crates/web-sys/src/features/gen_ContextAttributes2d.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ContextAttributes2d`*"] #[wasm_bindgen(method, getter = "alpha")] pub fn get_alpha(this: &ContextAttributes2d) -> Option; + #[doc = "Change the `alpha` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ContextAttributes2d`*"] #[wasm_bindgen(method, setter = "alpha")] - fn set_alpha(this: &ContextAttributes2d, val: bool); + pub fn set_alpha(this: &ContextAttributes2d, val: bool); #[doc = "Get the `willReadFrequently` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ContextAttributes2d`*"] #[wasm_bindgen(method, getter = "willReadFrequently")] pub fn get_will_read_frequently(this: &ContextAttributes2d) -> Option; + #[doc = "Change the `willReadFrequently` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ContextAttributes2d`*"] #[wasm_bindgen(method, setter = "willReadFrequently")] - fn set_will_read_frequently(this: &ContextAttributes2d, val: bool); + pub fn set_will_read_frequently(this: &ContextAttributes2d, val: bool); } impl ContextAttributes2d { #[doc = "Construct a new `ContextAttributes2d`."] @@ -34,16 +40,12 @@ impl ContextAttributes2d { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `alpha` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ContextAttributes2d`*"] + #[deprecated = "Use `set_alpha()` instead."] pub fn alpha(&mut self, val: bool) -> &mut Self { self.set_alpha(val); self } - #[doc = "Change the `willReadFrequently` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ContextAttributes2d`*"] + #[deprecated = "Use `set_will_read_frequently()` instead."] pub fn will_read_frequently(&mut self, val: bool) -> &mut Self { self.set_will_read_frequently(val); self diff --git a/crates/web-sys/src/features/gen_ConvertCoordinateOptions.rs b/crates/web-sys/src/features/gen_ConvertCoordinateOptions.rs index 0a2a3f3ab83b..9d31410e431a 100644 --- a/crates/web-sys/src/features/gen_ConvertCoordinateOptions.rs +++ b/crates/web-sys/src/features/gen_ConvertCoordinateOptions.rs @@ -17,8 +17,11 @@ extern "C" { #[wasm_bindgen(method, getter = "fromBox")] pub fn get_from_box(this: &ConvertCoordinateOptions) -> Option; #[cfg(feature = "CssBoxType")] + #[doc = "Change the `fromBox` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConvertCoordinateOptions`, `CssBoxType`*"] #[wasm_bindgen(method, setter = "fromBox")] - fn set_from_box(this: &ConvertCoordinateOptions, val: CssBoxType); + pub fn set_from_box(this: &ConvertCoordinateOptions, val: CssBoxType); #[cfg(feature = "CssBoxType")] #[doc = "Get the `toBox` field of this object."] #[doc = ""] @@ -26,8 +29,11 @@ extern "C" { #[wasm_bindgen(method, getter = "toBox")] pub fn get_to_box(this: &ConvertCoordinateOptions) -> Option; #[cfg(feature = "CssBoxType")] + #[doc = "Change the `toBox` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConvertCoordinateOptions`, `CssBoxType`*"] #[wasm_bindgen(method, setter = "toBox")] - fn set_to_box(this: &ConvertCoordinateOptions, val: CssBoxType); + pub fn set_to_box(this: &ConvertCoordinateOptions, val: CssBoxType); } impl ConvertCoordinateOptions { #[doc = "Construct a new `ConvertCoordinateOptions`."] @@ -39,17 +45,13 @@ impl ConvertCoordinateOptions { ret } #[cfg(feature = "CssBoxType")] - #[doc = "Change the `fromBox` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConvertCoordinateOptions`, `CssBoxType`*"] + #[deprecated = "Use `set_from_box()` instead."] pub fn from_box(&mut self, val: CssBoxType) -> &mut Self { self.set_from_box(val); self } #[cfg(feature = "CssBoxType")] - #[doc = "Change the `toBox` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConvertCoordinateOptions`, `CssBoxType`*"] + #[deprecated = "Use `set_to_box()` instead."] pub fn to_box(&mut self, val: CssBoxType) -> &mut Self { self.set_to_box(val); self diff --git a/crates/web-sys/src/features/gen_ConvolverOptions.rs b/crates/web-sys/src/features/gen_ConvolverOptions.rs index 42ebd3b5d606..e53480644c43 100644 --- a/crates/web-sys/src/features/gen_ConvolverOptions.rs +++ b/crates/web-sys/src/features/gen_ConvolverOptions.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ConvolverOptions`*"] #[wasm_bindgen(method, getter = "channelCount")] pub fn get_channel_count(this: &ConvolverOptions) -> Option; + #[doc = "Change the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConvolverOptions`*"] #[wasm_bindgen(method, setter = "channelCount")] - fn set_channel_count(this: &ConvolverOptions, val: u32); + pub fn set_channel_count(this: &ConvolverOptions, val: u32); #[cfg(feature = "ChannelCountMode")] #[doc = "Get the `channelCountMode` field of this object."] #[doc = ""] @@ -24,8 +27,11 @@ extern "C" { #[wasm_bindgen(method, getter = "channelCountMode")] pub fn get_channel_count_mode(this: &ConvolverOptions) -> Option; #[cfg(feature = "ChannelCountMode")] + #[doc = "Change the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `ConvolverOptions`*"] #[wasm_bindgen(method, setter = "channelCountMode")] - fn set_channel_count_mode(this: &ConvolverOptions, val: ChannelCountMode); + pub fn set_channel_count_mode(this: &ConvolverOptions, val: ChannelCountMode); #[cfg(feature = "ChannelInterpretation")] #[doc = "Get the `channelInterpretation` field of this object."] #[doc = ""] @@ -33,8 +39,11 @@ extern "C" { #[wasm_bindgen(method, getter = "channelInterpretation")] pub fn get_channel_interpretation(this: &ConvolverOptions) -> Option; #[cfg(feature = "ChannelInterpretation")] + #[doc = "Change the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `ConvolverOptions`*"] #[wasm_bindgen(method, setter = "channelInterpretation")] - fn set_channel_interpretation(this: &ConvolverOptions, val: ChannelInterpretation); + pub fn set_channel_interpretation(this: &ConvolverOptions, val: ChannelInterpretation); #[cfg(feature = "AudioBuffer")] #[doc = "Get the `buffer` field of this object."] #[doc = ""] @@ -42,15 +51,21 @@ extern "C" { #[wasm_bindgen(method, getter = "buffer")] pub fn get_buffer(this: &ConvolverOptions) -> Option; #[cfg(feature = "AudioBuffer")] + #[doc = "Change the `buffer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioBuffer`, `ConvolverOptions`*"] #[wasm_bindgen(method, setter = "buffer")] - fn set_buffer(this: &ConvolverOptions, val: Option<&AudioBuffer>); + pub fn set_buffer(this: &ConvolverOptions, val: Option<&AudioBuffer>); #[doc = "Get the `disableNormalization` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConvolverOptions`*"] #[wasm_bindgen(method, getter = "disableNormalization")] pub fn get_disable_normalization(this: &ConvolverOptions) -> Option; + #[doc = "Change the `disableNormalization` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConvolverOptions`*"] #[wasm_bindgen(method, setter = "disableNormalization")] - fn set_disable_normalization(this: &ConvolverOptions, val: bool); + pub fn set_disable_normalization(this: &ConvolverOptions, val: bool); } impl ConvolverOptions { #[doc = "Construct a new `ConvolverOptions`."] @@ -61,40 +76,30 @@ impl ConvolverOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `channelCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConvolverOptions`*"] + #[deprecated = "Use `set_channel_count()` instead."] pub fn channel_count(&mut self, val: u32) -> &mut Self { self.set_channel_count(val); self } #[cfg(feature = "ChannelCountMode")] - #[doc = "Change the `channelCountMode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `ConvolverOptions`*"] + #[deprecated = "Use `set_channel_count_mode()` instead."] pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self { self.set_channel_count_mode(val); self } #[cfg(feature = "ChannelInterpretation")] - #[doc = "Change the `channelInterpretation` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `ConvolverOptions`*"] + #[deprecated = "Use `set_channel_interpretation()` instead."] pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self { self.set_channel_interpretation(val); self } #[cfg(feature = "AudioBuffer")] - #[doc = "Change the `buffer` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioBuffer`, `ConvolverOptions`*"] + #[deprecated = "Use `set_buffer()` instead."] pub fn buffer(&mut self, val: Option<&AudioBuffer>) -> &mut Self { self.set_buffer(val); self } - #[doc = "Change the `disableNormalization` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConvolverOptions`*"] + #[deprecated = "Use `set_disable_normalization()` instead."] pub fn disable_normalization(&mut self, val: bool) -> &mut Self { self.set_disable_normalization(val); self diff --git a/crates/web-sys/src/features/gen_CredentialCreationOptions.rs b/crates/web-sys/src/features/gen_CredentialCreationOptions.rs index 0c77d12c97f2..67aadd91e6f8 100644 --- a/crates/web-sys/src/features/gen_CredentialCreationOptions.rs +++ b/crates/web-sys/src/features/gen_CredentialCreationOptions.rs @@ -19,8 +19,14 @@ extern "C" { this: &CredentialCreationOptions, ) -> Option; #[cfg(feature = "PublicKeyCredentialCreationOptions")] + #[doc = "Change the `publicKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CredentialCreationOptions`, `PublicKeyCredentialCreationOptions`*"] #[wasm_bindgen(method, setter = "publicKey")] - fn set_public_key(this: &CredentialCreationOptions, val: &PublicKeyCredentialCreationOptions); + pub fn set_public_key( + this: &CredentialCreationOptions, + val: &PublicKeyCredentialCreationOptions, + ); #[cfg(feature = "AbortSignal")] #[doc = "Get the `signal` field of this object."] #[doc = ""] @@ -28,8 +34,11 @@ extern "C" { #[wasm_bindgen(method, getter = "signal")] pub fn get_signal(this: &CredentialCreationOptions) -> Option; #[cfg(feature = "AbortSignal")] + #[doc = "Change the `signal` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `CredentialCreationOptions`*"] #[wasm_bindgen(method, setter = "signal")] - fn set_signal(this: &CredentialCreationOptions, val: &AbortSignal); + pub fn set_signal(this: &CredentialCreationOptions, val: &AbortSignal); } impl CredentialCreationOptions { #[doc = "Construct a new `CredentialCreationOptions`."] @@ -41,17 +50,13 @@ impl CredentialCreationOptions { ret } #[cfg(feature = "PublicKeyCredentialCreationOptions")] - #[doc = "Change the `publicKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CredentialCreationOptions`, `PublicKeyCredentialCreationOptions`*"] + #[deprecated = "Use `set_public_key()` instead."] pub fn public_key(&mut self, val: &PublicKeyCredentialCreationOptions) -> &mut Self { self.set_public_key(val); self } #[cfg(feature = "AbortSignal")] - #[doc = "Change the `signal` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `CredentialCreationOptions`*"] + #[deprecated = "Use `set_signal()` instead."] pub fn signal(&mut self, val: &AbortSignal) -> &mut Self { self.set_signal(val); self diff --git a/crates/web-sys/src/features/gen_CredentialRequestOptions.rs b/crates/web-sys/src/features/gen_CredentialRequestOptions.rs index 6549c66e6651..2d2d0e187110 100644 --- a/crates/web-sys/src/features/gen_CredentialRequestOptions.rs +++ b/crates/web-sys/src/features/gen_CredentialRequestOptions.rs @@ -19,8 +19,11 @@ extern "C" { this: &CredentialRequestOptions, ) -> Option; #[cfg(feature = "PublicKeyCredentialRequestOptions")] + #[doc = "Change the `publicKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CredentialRequestOptions`, `PublicKeyCredentialRequestOptions`*"] #[wasm_bindgen(method, setter = "publicKey")] - fn set_public_key(this: &CredentialRequestOptions, val: &PublicKeyCredentialRequestOptions); + pub fn set_public_key(this: &CredentialRequestOptions, val: &PublicKeyCredentialRequestOptions); #[cfg(feature = "AbortSignal")] #[doc = "Get the `signal` field of this object."] #[doc = ""] @@ -28,8 +31,11 @@ extern "C" { #[wasm_bindgen(method, getter = "signal")] pub fn get_signal(this: &CredentialRequestOptions) -> Option; #[cfg(feature = "AbortSignal")] + #[doc = "Change the `signal` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `CredentialRequestOptions`*"] #[wasm_bindgen(method, setter = "signal")] - fn set_signal(this: &CredentialRequestOptions, val: &AbortSignal); + pub fn set_signal(this: &CredentialRequestOptions, val: &AbortSignal); } impl CredentialRequestOptions { #[doc = "Construct a new `CredentialRequestOptions`."] @@ -41,17 +47,13 @@ impl CredentialRequestOptions { ret } #[cfg(feature = "PublicKeyCredentialRequestOptions")] - #[doc = "Change the `publicKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CredentialRequestOptions`, `PublicKeyCredentialRequestOptions`*"] + #[deprecated = "Use `set_public_key()` instead."] pub fn public_key(&mut self, val: &PublicKeyCredentialRequestOptions) -> &mut Self { self.set_public_key(val); self } #[cfg(feature = "AbortSignal")] - #[doc = "Change the `signal` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `CredentialRequestOptions`*"] + #[deprecated = "Use `set_signal()` instead."] pub fn signal(&mut self, val: &AbortSignal) -> &mut Self { self.set_signal(val); self diff --git a/crates/web-sys/src/features/gen_CryptoKeyPair.rs b/crates/web-sys/src/features/gen_CryptoKeyPair.rs index 7075a647b19d..fdd078a2e64d 100644 --- a/crates/web-sys/src/features/gen_CryptoKeyPair.rs +++ b/crates/web-sys/src/features/gen_CryptoKeyPair.rs @@ -17,8 +17,11 @@ extern "C" { #[wasm_bindgen(method, getter = "privateKey")] pub fn get_private_key(this: &CryptoKeyPair) -> CryptoKey; #[cfg(feature = "CryptoKey")] + #[doc = "Change the `privateKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CryptoKey`, `CryptoKeyPair`*"] #[wasm_bindgen(method, setter = "privateKey")] - fn set_private_key(this: &CryptoKeyPair, val: &CryptoKey); + pub fn set_private_key(this: &CryptoKeyPair, val: &CryptoKey); #[cfg(feature = "CryptoKey")] #[doc = "Get the `publicKey` field of this object."] #[doc = ""] @@ -26,8 +29,11 @@ extern "C" { #[wasm_bindgen(method, getter = "publicKey")] pub fn get_public_key(this: &CryptoKeyPair) -> CryptoKey; #[cfg(feature = "CryptoKey")] + #[doc = "Change the `publicKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CryptoKey`, `CryptoKeyPair`*"] #[wasm_bindgen(method, setter = "publicKey")] - fn set_public_key(this: &CryptoKeyPair, val: &CryptoKey); + pub fn set_public_key(this: &CryptoKeyPair, val: &CryptoKey); } impl CryptoKeyPair { #[cfg(feature = "CryptoKey")] @@ -42,17 +48,13 @@ impl CryptoKeyPair { ret } #[cfg(feature = "CryptoKey")] - #[doc = "Change the `privateKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CryptoKey`, `CryptoKeyPair`*"] + #[deprecated = "Use `set_private_key()` instead."] pub fn private_key(&mut self, val: &CryptoKey) -> &mut Self { self.set_private_key(val); self } #[cfg(feature = "CryptoKey")] - #[doc = "Change the `publicKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CryptoKey`, `CryptoKeyPair`*"] + #[deprecated = "Use `set_public_key()` instead."] pub fn public_key(&mut self, val: &CryptoKey) -> &mut Self { self.set_public_key(val); self diff --git a/crates/web-sys/src/features/gen_CustomEventInit.rs b/crates/web-sys/src/features/gen_CustomEventInit.rs index 2e3cffd25c1f..b9f8dc37f6d1 100644 --- a/crates/web-sys/src/features/gen_CustomEventInit.rs +++ b/crates/web-sys/src/features/gen_CustomEventInit.rs @@ -15,29 +15,41 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `CustomEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &CustomEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CustomEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &CustomEventInit, val: bool); + pub fn set_bubbles(this: &CustomEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CustomEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &CustomEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CustomEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &CustomEventInit, val: bool); + pub fn set_cancelable(this: &CustomEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CustomEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &CustomEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CustomEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &CustomEventInit, val: bool); + pub fn set_composed(this: &CustomEventInit, val: bool); #[doc = "Get the `detail` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CustomEventInit`*"] #[wasm_bindgen(method, getter = "detail")] pub fn get_detail(this: &CustomEventInit) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `detail` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CustomEventInit`*"] #[wasm_bindgen(method, setter = "detail")] - fn set_detail(this: &CustomEventInit, val: &::wasm_bindgen::JsValue); + pub fn set_detail(this: &CustomEventInit, val: &::wasm_bindgen::JsValue); } impl CustomEventInit { #[doc = "Construct a new `CustomEventInit`."] @@ -48,30 +60,22 @@ impl CustomEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CustomEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CustomEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CustomEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } - #[doc = "Change the `detail` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CustomEventInit`*"] + #[deprecated = "Use `set_detail()` instead."] pub fn detail(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_detail(val); self diff --git a/crates/web-sys/src/features/gen_DateTimeValue.rs b/crates/web-sys/src/features/gen_DateTimeValue.rs index 651f0ffed371..2d3749195240 100644 --- a/crates/web-sys/src/features/gen_DateTimeValue.rs +++ b/crates/web-sys/src/features/gen_DateTimeValue.rs @@ -15,36 +15,51 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"] #[wasm_bindgen(method, getter = "day")] pub fn get_day(this: &DateTimeValue) -> Option; + #[doc = "Change the `day` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"] #[wasm_bindgen(method, setter = "day")] - fn set_day(this: &DateTimeValue, val: i32); + pub fn set_day(this: &DateTimeValue, val: i32); #[doc = "Get the `hour` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"] #[wasm_bindgen(method, getter = "hour")] pub fn get_hour(this: &DateTimeValue) -> Option; + #[doc = "Change the `hour` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"] #[wasm_bindgen(method, setter = "hour")] - fn set_hour(this: &DateTimeValue, val: i32); + pub fn set_hour(this: &DateTimeValue, val: i32); #[doc = "Get the `minute` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"] #[wasm_bindgen(method, getter = "minute")] pub fn get_minute(this: &DateTimeValue) -> Option; + #[doc = "Change the `minute` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"] #[wasm_bindgen(method, setter = "minute")] - fn set_minute(this: &DateTimeValue, val: i32); + pub fn set_minute(this: &DateTimeValue, val: i32); #[doc = "Get the `month` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"] #[wasm_bindgen(method, getter = "month")] pub fn get_month(this: &DateTimeValue) -> Option; + #[doc = "Change the `month` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"] #[wasm_bindgen(method, setter = "month")] - fn set_month(this: &DateTimeValue, val: i32); + pub fn set_month(this: &DateTimeValue, val: i32); #[doc = "Get the `year` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"] #[wasm_bindgen(method, getter = "year")] pub fn get_year(this: &DateTimeValue) -> Option; + #[doc = "Change the `year` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"] #[wasm_bindgen(method, setter = "year")] - fn set_year(this: &DateTimeValue, val: i32); + pub fn set_year(this: &DateTimeValue, val: i32); } impl DateTimeValue { #[doc = "Construct a new `DateTimeValue`."] @@ -55,37 +70,27 @@ impl DateTimeValue { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `day` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"] + #[deprecated = "Use `set_day()` instead."] pub fn day(&mut self, val: i32) -> &mut Self { self.set_day(val); self } - #[doc = "Change the `hour` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"] + #[deprecated = "Use `set_hour()` instead."] pub fn hour(&mut self, val: i32) -> &mut Self { self.set_hour(val); self } - #[doc = "Change the `minute` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"] + #[deprecated = "Use `set_minute()` instead."] pub fn minute(&mut self, val: i32) -> &mut Self { self.set_minute(val); self } - #[doc = "Change the `month` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"] + #[deprecated = "Use `set_month()` instead."] pub fn month(&mut self, val: i32) -> &mut Self { self.set_month(val); self } - #[doc = "Change the `year` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"] + #[deprecated = "Use `set_year()` instead."] pub fn year(&mut self, val: i32) -> &mut Self { self.set_year(val); self diff --git a/crates/web-sys/src/features/gen_DecoderDoctorNotification.rs b/crates/web-sys/src/features/gen_DecoderDoctorNotification.rs index ed3a491c14df..bbd77e5cfebd 100644 --- a/crates/web-sys/src/features/gen_DecoderDoctorNotification.rs +++ b/crates/web-sys/src/features/gen_DecoderDoctorNotification.rs @@ -15,43 +15,61 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"] #[wasm_bindgen(method, getter = "decodeIssue")] pub fn get_decode_issue(this: &DecoderDoctorNotification) -> Option; + #[doc = "Change the `decodeIssue` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"] #[wasm_bindgen(method, setter = "decodeIssue")] - fn set_decode_issue(this: &DecoderDoctorNotification, val: &str); + pub fn set_decode_issue(this: &DecoderDoctorNotification, val: &str); #[doc = "Get the `decoderDoctorReportId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"] #[wasm_bindgen(method, getter = "decoderDoctorReportId")] pub fn get_decoder_doctor_report_id(this: &DecoderDoctorNotification) -> String; + #[doc = "Change the `decoderDoctorReportId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"] #[wasm_bindgen(method, setter = "decoderDoctorReportId")] - fn set_decoder_doctor_report_id(this: &DecoderDoctorNotification, val: &str); + pub fn set_decoder_doctor_report_id(this: &DecoderDoctorNotification, val: &str); #[doc = "Get the `docURL` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"] #[wasm_bindgen(method, getter = "docURL")] pub fn get_doc_url(this: &DecoderDoctorNotification) -> Option; + #[doc = "Change the `docURL` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"] #[wasm_bindgen(method, setter = "docURL")] - fn set_doc_url(this: &DecoderDoctorNotification, val: &str); + pub fn set_doc_url(this: &DecoderDoctorNotification, val: &str); #[doc = "Get the `formats` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"] #[wasm_bindgen(method, getter = "formats")] pub fn get_formats(this: &DecoderDoctorNotification) -> Option; + #[doc = "Change the `formats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"] #[wasm_bindgen(method, setter = "formats")] - fn set_formats(this: &DecoderDoctorNotification, val: &str); + pub fn set_formats(this: &DecoderDoctorNotification, val: &str); #[doc = "Get the `isSolved` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"] #[wasm_bindgen(method, getter = "isSolved")] pub fn get_is_solved(this: &DecoderDoctorNotification) -> bool; + #[doc = "Change the `isSolved` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"] #[wasm_bindgen(method, setter = "isSolved")] - fn set_is_solved(this: &DecoderDoctorNotification, val: bool); + pub fn set_is_solved(this: &DecoderDoctorNotification, val: bool); #[doc = "Get the `resourceURL` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"] #[wasm_bindgen(method, getter = "resourceURL")] pub fn get_resource_url(this: &DecoderDoctorNotification) -> Option; + #[doc = "Change the `resourceURL` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"] #[wasm_bindgen(method, setter = "resourceURL")] - fn set_resource_url(this: &DecoderDoctorNotification, val: &str); + pub fn set_resource_url(this: &DecoderDoctorNotification, val: &str); #[cfg(feature = "DecoderDoctorNotificationType")] #[doc = "Get the `type` field of this object."] #[doc = ""] @@ -59,8 +77,11 @@ extern "C" { #[wasm_bindgen(method, getter = "type")] pub fn get_type(this: &DecoderDoctorNotification) -> DecoderDoctorNotificationType; #[cfg(feature = "DecoderDoctorNotificationType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`, `DecoderDoctorNotificationType`*"] #[wasm_bindgen(method, setter = "type")] - fn set_type(this: &DecoderDoctorNotification, val: DecoderDoctorNotificationType); + pub fn set_type(this: &DecoderDoctorNotification, val: DecoderDoctorNotificationType); } impl DecoderDoctorNotification { #[cfg(feature = "DecoderDoctorNotificationType")] @@ -79,52 +100,38 @@ impl DecoderDoctorNotification { ret.type_(type_); ret } - #[doc = "Change the `decodeIssue` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"] + #[deprecated = "Use `set_decode_issue()` instead."] pub fn decode_issue(&mut self, val: &str) -> &mut Self { self.set_decode_issue(val); self } - #[doc = "Change the `decoderDoctorReportId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"] + #[deprecated = "Use `set_decoder_doctor_report_id()` instead."] pub fn decoder_doctor_report_id(&mut self, val: &str) -> &mut Self { self.set_decoder_doctor_report_id(val); self } - #[doc = "Change the `docURL` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"] + #[deprecated = "Use `set_doc_url()` instead."] pub fn doc_url(&mut self, val: &str) -> &mut Self { self.set_doc_url(val); self } - #[doc = "Change the `formats` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"] + #[deprecated = "Use `set_formats()` instead."] pub fn formats(&mut self, val: &str) -> &mut Self { self.set_formats(val); self } - #[doc = "Change the `isSolved` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"] + #[deprecated = "Use `set_is_solved()` instead."] pub fn is_solved(&mut self, val: bool) -> &mut Self { self.set_is_solved(val); self } - #[doc = "Change the `resourceURL` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"] + #[deprecated = "Use `set_resource_url()` instead."] pub fn resource_url(&mut self, val: &str) -> &mut Self { self.set_resource_url(val); self } #[cfg(feature = "DecoderDoctorNotificationType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`, `DecoderDoctorNotificationType`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: DecoderDoctorNotificationType) -> &mut Self { self.set_type(val); self diff --git a/crates/web-sys/src/features/gen_DelayOptions.rs b/crates/web-sys/src/features/gen_DelayOptions.rs index ee66bb35de96..2228e7e529b6 100644 --- a/crates/web-sys/src/features/gen_DelayOptions.rs +++ b/crates/web-sys/src/features/gen_DelayOptions.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `DelayOptions`*"] #[wasm_bindgen(method, getter = "channelCount")] pub fn get_channel_count(this: &DelayOptions) -> Option; + #[doc = "Change the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DelayOptions`*"] #[wasm_bindgen(method, setter = "channelCount")] - fn set_channel_count(this: &DelayOptions, val: u32); + pub fn set_channel_count(this: &DelayOptions, val: u32); #[cfg(feature = "ChannelCountMode")] #[doc = "Get the `channelCountMode` field of this object."] #[doc = ""] @@ -24,8 +27,11 @@ extern "C" { #[wasm_bindgen(method, getter = "channelCountMode")] pub fn get_channel_count_mode(this: &DelayOptions) -> Option; #[cfg(feature = "ChannelCountMode")] + #[doc = "Change the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `DelayOptions`*"] #[wasm_bindgen(method, setter = "channelCountMode")] - fn set_channel_count_mode(this: &DelayOptions, val: ChannelCountMode); + pub fn set_channel_count_mode(this: &DelayOptions, val: ChannelCountMode); #[cfg(feature = "ChannelInterpretation")] #[doc = "Get the `channelInterpretation` field of this object."] #[doc = ""] @@ -33,22 +39,31 @@ extern "C" { #[wasm_bindgen(method, getter = "channelInterpretation")] pub fn get_channel_interpretation(this: &DelayOptions) -> Option; #[cfg(feature = "ChannelInterpretation")] + #[doc = "Change the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `DelayOptions`*"] #[wasm_bindgen(method, setter = "channelInterpretation")] - fn set_channel_interpretation(this: &DelayOptions, val: ChannelInterpretation); + pub fn set_channel_interpretation(this: &DelayOptions, val: ChannelInterpretation); #[doc = "Get the `delayTime` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DelayOptions`*"] #[wasm_bindgen(method, getter = "delayTime")] pub fn get_delay_time(this: &DelayOptions) -> Option; + #[doc = "Change the `delayTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DelayOptions`*"] #[wasm_bindgen(method, setter = "delayTime")] - fn set_delay_time(this: &DelayOptions, val: f64); + pub fn set_delay_time(this: &DelayOptions, val: f64); #[doc = "Get the `maxDelayTime` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DelayOptions`*"] #[wasm_bindgen(method, getter = "maxDelayTime")] pub fn get_max_delay_time(this: &DelayOptions) -> Option; + #[doc = "Change the `maxDelayTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DelayOptions`*"] #[wasm_bindgen(method, setter = "maxDelayTime")] - fn set_max_delay_time(this: &DelayOptions, val: f64); + pub fn set_max_delay_time(this: &DelayOptions, val: f64); } impl DelayOptions { #[doc = "Construct a new `DelayOptions`."] @@ -59,39 +74,29 @@ impl DelayOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `channelCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DelayOptions`*"] + #[deprecated = "Use `set_channel_count()` instead."] pub fn channel_count(&mut self, val: u32) -> &mut Self { self.set_channel_count(val); self } #[cfg(feature = "ChannelCountMode")] - #[doc = "Change the `channelCountMode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `DelayOptions`*"] + #[deprecated = "Use `set_channel_count_mode()` instead."] pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self { self.set_channel_count_mode(val); self } #[cfg(feature = "ChannelInterpretation")] - #[doc = "Change the `channelInterpretation` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `DelayOptions`*"] + #[deprecated = "Use `set_channel_interpretation()` instead."] pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self { self.set_channel_interpretation(val); self } - #[doc = "Change the `delayTime` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DelayOptions`*"] + #[deprecated = "Use `set_delay_time()` instead."] pub fn delay_time(&mut self, val: f64) -> &mut Self { self.set_delay_time(val); self } - #[doc = "Change the `maxDelayTime` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DelayOptions`*"] + #[deprecated = "Use `set_max_delay_time()` instead."] pub fn max_delay_time(&mut self, val: f64) -> &mut Self { self.set_max_delay_time(val); self diff --git a/crates/web-sys/src/features/gen_DeviceAccelerationInit.rs b/crates/web-sys/src/features/gen_DeviceAccelerationInit.rs index bfa612f503db..ca98e86bb70e 100644 --- a/crates/web-sys/src/features/gen_DeviceAccelerationInit.rs +++ b/crates/web-sys/src/features/gen_DeviceAccelerationInit.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `DeviceAccelerationInit`*"] #[wasm_bindgen(method, getter = "x")] pub fn get_x(this: &DeviceAccelerationInit) -> Option; + #[doc = "Change the `x` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceAccelerationInit`*"] #[wasm_bindgen(method, setter = "x")] - fn set_x(this: &DeviceAccelerationInit, val: Option); + pub fn set_x(this: &DeviceAccelerationInit, val: Option); #[doc = "Get the `y` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceAccelerationInit`*"] #[wasm_bindgen(method, getter = "y")] pub fn get_y(this: &DeviceAccelerationInit) -> Option; + #[doc = "Change the `y` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceAccelerationInit`*"] #[wasm_bindgen(method, setter = "y")] - fn set_y(this: &DeviceAccelerationInit, val: Option); + pub fn set_y(this: &DeviceAccelerationInit, val: Option); #[doc = "Get the `z` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceAccelerationInit`*"] #[wasm_bindgen(method, getter = "z")] pub fn get_z(this: &DeviceAccelerationInit) -> Option; + #[doc = "Change the `z` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceAccelerationInit`*"] #[wasm_bindgen(method, setter = "z")] - fn set_z(this: &DeviceAccelerationInit, val: Option); + pub fn set_z(this: &DeviceAccelerationInit, val: Option); } impl DeviceAccelerationInit { #[doc = "Construct a new `DeviceAccelerationInit`."] @@ -41,23 +50,17 @@ impl DeviceAccelerationInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `x` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceAccelerationInit`*"] + #[deprecated = "Use `set_x()` instead."] pub fn x(&mut self, val: Option) -> &mut Self { self.set_x(val); self } - #[doc = "Change the `y` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceAccelerationInit`*"] + #[deprecated = "Use `set_y()` instead."] pub fn y(&mut self, val: Option) -> &mut Self { self.set_y(val); self } - #[doc = "Change the `z` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceAccelerationInit`*"] + #[deprecated = "Use `set_z()` instead."] pub fn z(&mut self, val: Option) -> &mut Self { self.set_z(val); self diff --git a/crates/web-sys/src/features/gen_DeviceLightEventInit.rs b/crates/web-sys/src/features/gen_DeviceLightEventInit.rs index 35281fbf3d7a..8aa438238e0e 100644 --- a/crates/web-sys/src/features/gen_DeviceLightEventInit.rs +++ b/crates/web-sys/src/features/gen_DeviceLightEventInit.rs @@ -15,29 +15,41 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `DeviceLightEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &DeviceLightEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceLightEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &DeviceLightEventInit, val: bool); + pub fn set_bubbles(this: &DeviceLightEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceLightEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &DeviceLightEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceLightEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &DeviceLightEventInit, val: bool); + pub fn set_cancelable(this: &DeviceLightEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceLightEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &DeviceLightEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceLightEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &DeviceLightEventInit, val: bool); + pub fn set_composed(this: &DeviceLightEventInit, val: bool); #[doc = "Get the `value` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceLightEventInit`*"] #[wasm_bindgen(method, getter = "value")] pub fn get_value(this: &DeviceLightEventInit) -> Option; + #[doc = "Change the `value` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceLightEventInit`*"] #[wasm_bindgen(method, setter = "value")] - fn set_value(this: &DeviceLightEventInit, val: f64); + pub fn set_value(this: &DeviceLightEventInit, val: f64); } impl DeviceLightEventInit { #[doc = "Construct a new `DeviceLightEventInit`."] @@ -48,30 +60,22 @@ impl DeviceLightEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceLightEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceLightEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceLightEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } - #[doc = "Change the `value` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceLightEventInit`*"] + #[deprecated = "Use `set_value()` instead."] pub fn value(&mut self, val: f64) -> &mut Self { self.set_value(val); self diff --git a/crates/web-sys/src/features/gen_DeviceMotionEventInit.rs b/crates/web-sys/src/features/gen_DeviceMotionEventInit.rs index f42e73f900f1..6f46ea20a4d6 100644 --- a/crates/web-sys/src/features/gen_DeviceMotionEventInit.rs +++ b/crates/web-sys/src/features/gen_DeviceMotionEventInit.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `DeviceMotionEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &DeviceMotionEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceMotionEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &DeviceMotionEventInit, val: bool); + pub fn set_bubbles(this: &DeviceMotionEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceMotionEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &DeviceMotionEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceMotionEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &DeviceMotionEventInit, val: bool); + pub fn set_cancelable(this: &DeviceMotionEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceMotionEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &DeviceMotionEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceMotionEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &DeviceMotionEventInit, val: bool); + pub fn set_composed(this: &DeviceMotionEventInit, val: bool); #[cfg(feature = "DeviceAccelerationInit")] #[doc = "Get the `acceleration` field of this object."] #[doc = ""] @@ -38,8 +47,11 @@ extern "C" { #[wasm_bindgen(method, getter = "acceleration")] pub fn get_acceleration(this: &DeviceMotionEventInit) -> Option; #[cfg(feature = "DeviceAccelerationInit")] + #[doc = "Change the `acceleration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceAccelerationInit`, `DeviceMotionEventInit`*"] #[wasm_bindgen(method, setter = "acceleration")] - fn set_acceleration(this: &DeviceMotionEventInit, val: &DeviceAccelerationInit); + pub fn set_acceleration(this: &DeviceMotionEventInit, val: &DeviceAccelerationInit); #[cfg(feature = "DeviceAccelerationInit")] #[doc = "Get the `accelerationIncludingGravity` field of this object."] #[doc = ""] @@ -49,8 +61,11 @@ extern "C" { this: &DeviceMotionEventInit, ) -> Option; #[cfg(feature = "DeviceAccelerationInit")] + #[doc = "Change the `accelerationIncludingGravity` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceAccelerationInit`, `DeviceMotionEventInit`*"] #[wasm_bindgen(method, setter = "accelerationIncludingGravity")] - fn set_acceleration_including_gravity( + pub fn set_acceleration_including_gravity( this: &DeviceMotionEventInit, val: &DeviceAccelerationInit, ); @@ -59,8 +74,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `DeviceMotionEventInit`*"] #[wasm_bindgen(method, getter = "interval")] pub fn get_interval(this: &DeviceMotionEventInit) -> Option; + #[doc = "Change the `interval` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceMotionEventInit`*"] #[wasm_bindgen(method, setter = "interval")] - fn set_interval(this: &DeviceMotionEventInit, val: Option); + pub fn set_interval(this: &DeviceMotionEventInit, val: Option); #[cfg(feature = "DeviceRotationRateInit")] #[doc = "Get the `rotationRate` field of this object."] #[doc = ""] @@ -68,8 +86,11 @@ extern "C" { #[wasm_bindgen(method, getter = "rotationRate")] pub fn get_rotation_rate(this: &DeviceMotionEventInit) -> Option; #[cfg(feature = "DeviceRotationRateInit")] + #[doc = "Change the `rotationRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceMotionEventInit`, `DeviceRotationRateInit`*"] #[wasm_bindgen(method, setter = "rotationRate")] - fn set_rotation_rate(this: &DeviceMotionEventInit, val: &DeviceRotationRateInit); + pub fn set_rotation_rate(this: &DeviceMotionEventInit, val: &DeviceRotationRateInit); } impl DeviceMotionEventInit { #[doc = "Construct a new `DeviceMotionEventInit`."] @@ -80,54 +101,40 @@ impl DeviceMotionEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceMotionEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceMotionEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceMotionEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } #[cfg(feature = "DeviceAccelerationInit")] - #[doc = "Change the `acceleration` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceAccelerationInit`, `DeviceMotionEventInit`*"] + #[deprecated = "Use `set_acceleration()` instead."] pub fn acceleration(&mut self, val: &DeviceAccelerationInit) -> &mut Self { self.set_acceleration(val); self } #[cfg(feature = "DeviceAccelerationInit")] - #[doc = "Change the `accelerationIncludingGravity` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceAccelerationInit`, `DeviceMotionEventInit`*"] + #[deprecated = "Use `set_acceleration_including_gravity()` instead."] pub fn acceleration_including_gravity(&mut self, val: &DeviceAccelerationInit) -> &mut Self { self.set_acceleration_including_gravity(val); self } - #[doc = "Change the `interval` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceMotionEventInit`*"] + #[deprecated = "Use `set_interval()` instead."] pub fn interval(&mut self, val: Option) -> &mut Self { self.set_interval(val); self } #[cfg(feature = "DeviceRotationRateInit")] - #[doc = "Change the `rotationRate` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceMotionEventInit`, `DeviceRotationRateInit`*"] + #[deprecated = "Use `set_rotation_rate()` instead."] pub fn rotation_rate(&mut self, val: &DeviceRotationRateInit) -> &mut Self { self.set_rotation_rate(val); self diff --git a/crates/web-sys/src/features/gen_DeviceOrientationEventInit.rs b/crates/web-sys/src/features/gen_DeviceOrientationEventInit.rs index 44f3e12d1c8b..5570bf982a06 100644 --- a/crates/web-sys/src/features/gen_DeviceOrientationEventInit.rs +++ b/crates/web-sys/src/features/gen_DeviceOrientationEventInit.rs @@ -15,50 +15,71 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &DeviceOrientationEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &DeviceOrientationEventInit, val: bool); + pub fn set_bubbles(this: &DeviceOrientationEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &DeviceOrientationEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &DeviceOrientationEventInit, val: bool); + pub fn set_cancelable(this: &DeviceOrientationEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &DeviceOrientationEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &DeviceOrientationEventInit, val: bool); + pub fn set_composed(this: &DeviceOrientationEventInit, val: bool); #[doc = "Get the `absolute` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] #[wasm_bindgen(method, getter = "absolute")] pub fn get_absolute(this: &DeviceOrientationEventInit) -> Option; + #[doc = "Change the `absolute` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] #[wasm_bindgen(method, setter = "absolute")] - fn set_absolute(this: &DeviceOrientationEventInit, val: bool); + pub fn set_absolute(this: &DeviceOrientationEventInit, val: bool); #[doc = "Get the `alpha` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] #[wasm_bindgen(method, getter = "alpha")] pub fn get_alpha(this: &DeviceOrientationEventInit) -> Option; + #[doc = "Change the `alpha` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] #[wasm_bindgen(method, setter = "alpha")] - fn set_alpha(this: &DeviceOrientationEventInit, val: Option); + pub fn set_alpha(this: &DeviceOrientationEventInit, val: Option); #[doc = "Get the `beta` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] #[wasm_bindgen(method, getter = "beta")] pub fn get_beta(this: &DeviceOrientationEventInit) -> Option; + #[doc = "Change the `beta` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] #[wasm_bindgen(method, setter = "beta")] - fn set_beta(this: &DeviceOrientationEventInit, val: Option); + pub fn set_beta(this: &DeviceOrientationEventInit, val: Option); #[doc = "Get the `gamma` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] #[wasm_bindgen(method, getter = "gamma")] pub fn get_gamma(this: &DeviceOrientationEventInit) -> Option; + #[doc = "Change the `gamma` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] #[wasm_bindgen(method, setter = "gamma")] - fn set_gamma(this: &DeviceOrientationEventInit, val: Option); + pub fn set_gamma(this: &DeviceOrientationEventInit, val: Option); } impl DeviceOrientationEventInit { #[doc = "Construct a new `DeviceOrientationEventInit`."] @@ -69,51 +90,37 @@ impl DeviceOrientationEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } - #[doc = "Change the `absolute` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] + #[deprecated = "Use `set_absolute()` instead."] pub fn absolute(&mut self, val: bool) -> &mut Self { self.set_absolute(val); self } - #[doc = "Change the `alpha` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] + #[deprecated = "Use `set_alpha()` instead."] pub fn alpha(&mut self, val: Option) -> &mut Self { self.set_alpha(val); self } - #[doc = "Change the `beta` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] + #[deprecated = "Use `set_beta()` instead."] pub fn beta(&mut self, val: Option) -> &mut Self { self.set_beta(val); self } - #[doc = "Change the `gamma` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] + #[deprecated = "Use `set_gamma()` instead."] pub fn gamma(&mut self, val: Option) -> &mut Self { self.set_gamma(val); self diff --git a/crates/web-sys/src/features/gen_DeviceProximityEventInit.rs b/crates/web-sys/src/features/gen_DeviceProximityEventInit.rs index b9cda566064c..d63d33507593 100644 --- a/crates/web-sys/src/features/gen_DeviceProximityEventInit.rs +++ b/crates/web-sys/src/features/gen_DeviceProximityEventInit.rs @@ -15,43 +15,61 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `DeviceProximityEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &DeviceProximityEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceProximityEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &DeviceProximityEventInit, val: bool); + pub fn set_bubbles(this: &DeviceProximityEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceProximityEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &DeviceProximityEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceProximityEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &DeviceProximityEventInit, val: bool); + pub fn set_cancelable(this: &DeviceProximityEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceProximityEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &DeviceProximityEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceProximityEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &DeviceProximityEventInit, val: bool); + pub fn set_composed(this: &DeviceProximityEventInit, val: bool); #[doc = "Get the `max` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceProximityEventInit`*"] #[wasm_bindgen(method, getter = "max")] pub fn get_max(this: &DeviceProximityEventInit) -> Option; + #[doc = "Change the `max` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceProximityEventInit`*"] #[wasm_bindgen(method, setter = "max")] - fn set_max(this: &DeviceProximityEventInit, val: f64); + pub fn set_max(this: &DeviceProximityEventInit, val: f64); #[doc = "Get the `min` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceProximityEventInit`*"] #[wasm_bindgen(method, getter = "min")] pub fn get_min(this: &DeviceProximityEventInit) -> Option; + #[doc = "Change the `min` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceProximityEventInit`*"] #[wasm_bindgen(method, setter = "min")] - fn set_min(this: &DeviceProximityEventInit, val: f64); + pub fn set_min(this: &DeviceProximityEventInit, val: f64); #[doc = "Get the `value` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceProximityEventInit`*"] #[wasm_bindgen(method, getter = "value")] pub fn get_value(this: &DeviceProximityEventInit) -> Option; + #[doc = "Change the `value` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceProximityEventInit`*"] #[wasm_bindgen(method, setter = "value")] - fn set_value(this: &DeviceProximityEventInit, val: f64); + pub fn set_value(this: &DeviceProximityEventInit, val: f64); } impl DeviceProximityEventInit { #[doc = "Construct a new `DeviceProximityEventInit`."] @@ -62,44 +80,32 @@ impl DeviceProximityEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceProximityEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceProximityEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceProximityEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } - #[doc = "Change the `max` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceProximityEventInit`*"] + #[deprecated = "Use `set_max()` instead."] pub fn max(&mut self, val: f64) -> &mut Self { self.set_max(val); self } - #[doc = "Change the `min` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceProximityEventInit`*"] + #[deprecated = "Use `set_min()` instead."] pub fn min(&mut self, val: f64) -> &mut Self { self.set_min(val); self } - #[doc = "Change the `value` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceProximityEventInit`*"] + #[deprecated = "Use `set_value()` instead."] pub fn value(&mut self, val: f64) -> &mut Self { self.set_value(val); self diff --git a/crates/web-sys/src/features/gen_DeviceRotationRateInit.rs b/crates/web-sys/src/features/gen_DeviceRotationRateInit.rs index e610c99ecae9..842727776720 100644 --- a/crates/web-sys/src/features/gen_DeviceRotationRateInit.rs +++ b/crates/web-sys/src/features/gen_DeviceRotationRateInit.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `DeviceRotationRateInit`*"] #[wasm_bindgen(method, getter = "alpha")] pub fn get_alpha(this: &DeviceRotationRateInit) -> Option; + #[doc = "Change the `alpha` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceRotationRateInit`*"] #[wasm_bindgen(method, setter = "alpha")] - fn set_alpha(this: &DeviceRotationRateInit, val: Option); + pub fn set_alpha(this: &DeviceRotationRateInit, val: Option); #[doc = "Get the `beta` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceRotationRateInit`*"] #[wasm_bindgen(method, getter = "beta")] pub fn get_beta(this: &DeviceRotationRateInit) -> Option; + #[doc = "Change the `beta` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceRotationRateInit`*"] #[wasm_bindgen(method, setter = "beta")] - fn set_beta(this: &DeviceRotationRateInit, val: Option); + pub fn set_beta(this: &DeviceRotationRateInit, val: Option); #[doc = "Get the `gamma` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceRotationRateInit`*"] #[wasm_bindgen(method, getter = "gamma")] pub fn get_gamma(this: &DeviceRotationRateInit) -> Option; + #[doc = "Change the `gamma` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceRotationRateInit`*"] #[wasm_bindgen(method, setter = "gamma")] - fn set_gamma(this: &DeviceRotationRateInit, val: Option); + pub fn set_gamma(this: &DeviceRotationRateInit, val: Option); } impl DeviceRotationRateInit { #[doc = "Construct a new `DeviceRotationRateInit`."] @@ -41,23 +50,17 @@ impl DeviceRotationRateInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `alpha` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceRotationRateInit`*"] + #[deprecated = "Use `set_alpha()` instead."] pub fn alpha(&mut self, val: Option) -> &mut Self { self.set_alpha(val); self } - #[doc = "Change the `beta` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceRotationRateInit`*"] + #[deprecated = "Use `set_beta()` instead."] pub fn beta(&mut self, val: Option) -> &mut Self { self.set_beta(val); self } - #[doc = "Change the `gamma` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceRotationRateInit`*"] + #[deprecated = "Use `set_gamma()` instead."] pub fn gamma(&mut self, val: Option) -> &mut Self { self.set_gamma(val); self diff --git a/crates/web-sys/src/features/gen_DhKeyDeriveParams.rs b/crates/web-sys/src/features/gen_DhKeyDeriveParams.rs index 0f93b30f6601..323ac4159d73 100644 --- a/crates/web-sys/src/features/gen_DhKeyDeriveParams.rs +++ b/crates/web-sys/src/features/gen_DhKeyDeriveParams.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `DhKeyDeriveParams`*"] #[wasm_bindgen(method, getter = "name")] pub fn get_name(this: &DhKeyDeriveParams) -> String; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DhKeyDeriveParams`*"] #[wasm_bindgen(method, setter = "name")] - fn set_name(this: &DhKeyDeriveParams, val: &str); + pub fn set_name(this: &DhKeyDeriveParams, val: &str); #[cfg(feature = "CryptoKey")] #[doc = "Get the `public` field of this object."] #[doc = ""] @@ -24,8 +27,11 @@ extern "C" { #[wasm_bindgen(method, getter = "public")] pub fn get_public(this: &DhKeyDeriveParams) -> CryptoKey; #[cfg(feature = "CryptoKey")] + #[doc = "Change the `public` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CryptoKey`, `DhKeyDeriveParams`*"] #[wasm_bindgen(method, setter = "public")] - fn set_public(this: &DhKeyDeriveParams, val: &CryptoKey); + pub fn set_public(this: &DhKeyDeriveParams, val: &CryptoKey); } impl DhKeyDeriveParams { #[cfg(feature = "CryptoKey")] @@ -39,17 +45,13 @@ impl DhKeyDeriveParams { ret.public(public); ret } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DhKeyDeriveParams`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { self.set_name(val); self } #[cfg(feature = "CryptoKey")] - #[doc = "Change the `public` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CryptoKey`, `DhKeyDeriveParams`*"] + #[deprecated = "Use `set_public()` instead."] pub fn public(&mut self, val: &CryptoKey) -> &mut Self { self.set_public(val); self diff --git a/crates/web-sys/src/features/gen_DirectoryPickerOptions.rs b/crates/web-sys/src/features/gen_DirectoryPickerOptions.rs index c6be998ad5d5..ba0c9ee05696 100644 --- a/crates/web-sys/src/features/gen_DirectoryPickerOptions.rs +++ b/crates/web-sys/src/features/gen_DirectoryPickerOptions.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "id")] pub fn get_id(this: &DirectoryPickerOptions) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DirectoryPickerOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "id")] - fn set_id(this: &DirectoryPickerOptions, val: &str); + pub fn set_id(this: &DirectoryPickerOptions, val: &str); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "FileSystemPermissionMode")] #[doc = "Get the `mode` field of this object."] @@ -35,9 +42,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "mode")] pub fn get_mode(this: &DirectoryPickerOptions) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "FileSystemPermissionMode")] + #[doc = "Change the `mode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DirectoryPickerOptions`, `FileSystemPermissionMode`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "mode")] - fn set_mode(this: &DirectoryPickerOptions, val: FileSystemPermissionMode); + pub fn set_mode(this: &DirectoryPickerOptions, val: FileSystemPermissionMode); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `startIn` field of this object."] #[doc = ""] @@ -47,8 +61,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "startIn")] pub fn get_start_in(this: &DirectoryPickerOptions) -> ::wasm_bindgen::JsValue; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `startIn` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DirectoryPickerOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "startIn")] - fn set_start_in(this: &DirectoryPickerOptions, val: &::wasm_bindgen::JsValue); + pub fn set_start_in(this: &DirectoryPickerOptions, val: &::wasm_bindgen::JsValue); } #[cfg(web_sys_unstable_apis)] impl DirectoryPickerOptions { @@ -64,35 +85,20 @@ impl DirectoryPickerOptions { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `id` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DirectoryPickerOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_id()` instead."] pub fn id(&mut self, val: &str) -> &mut Self { self.set_id(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "FileSystemPermissionMode")] - #[doc = "Change the `mode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DirectoryPickerOptions`, `FileSystemPermissionMode`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_mode()` instead."] pub fn mode(&mut self, val: FileSystemPermissionMode) -> &mut Self { self.set_mode(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `startIn` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DirectoryPickerOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_start_in()` instead."] pub fn start_in(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_start_in(val); self diff --git a/crates/web-sys/src/features/gen_DisplayMediaStreamConstraints.rs b/crates/web-sys/src/features/gen_DisplayMediaStreamConstraints.rs index 28e032e53e5e..814a1279c886 100644 --- a/crates/web-sys/src/features/gen_DisplayMediaStreamConstraints.rs +++ b/crates/web-sys/src/features/gen_DisplayMediaStreamConstraints.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `DisplayMediaStreamConstraints`*"] #[wasm_bindgen(method, getter = "audio")] pub fn get_audio(this: &DisplayMediaStreamConstraints) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `audio` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DisplayMediaStreamConstraints`*"] #[wasm_bindgen(method, setter = "audio")] - fn set_audio(this: &DisplayMediaStreamConstraints, val: &::wasm_bindgen::JsValue); + pub fn set_audio(this: &DisplayMediaStreamConstraints, val: &::wasm_bindgen::JsValue); #[doc = "Get the `video` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DisplayMediaStreamConstraints`*"] #[wasm_bindgen(method, getter = "video")] pub fn get_video(this: &DisplayMediaStreamConstraints) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `video` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DisplayMediaStreamConstraints`*"] #[wasm_bindgen(method, setter = "video")] - fn set_video(this: &DisplayMediaStreamConstraints, val: &::wasm_bindgen::JsValue); + pub fn set_video(this: &DisplayMediaStreamConstraints, val: &::wasm_bindgen::JsValue); } impl DisplayMediaStreamConstraints { #[doc = "Construct a new `DisplayMediaStreamConstraints`."] @@ -34,16 +40,12 @@ impl DisplayMediaStreamConstraints { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `audio` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DisplayMediaStreamConstraints`*"] + #[deprecated = "Use `set_audio()` instead."] pub fn audio(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_audio(val); self } - #[doc = "Change the `video` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DisplayMediaStreamConstraints`*"] + #[deprecated = "Use `set_video()` instead."] pub fn video(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_video(val); self diff --git a/crates/web-sys/src/features/gen_DisplayNameOptions.rs b/crates/web-sys/src/features/gen_DisplayNameOptions.rs index 177d55a3a78c..837d9ecad1a7 100644 --- a/crates/web-sys/src/features/gen_DisplayNameOptions.rs +++ b/crates/web-sys/src/features/gen_DisplayNameOptions.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `DisplayNameOptions`*"] #[wasm_bindgen(method, getter = "keys")] pub fn get_keys(this: &DisplayNameOptions) -> Option<::js_sys::Array>; + #[doc = "Change the `keys` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DisplayNameOptions`*"] #[wasm_bindgen(method, setter = "keys")] - fn set_keys(this: &DisplayNameOptions, val: &::wasm_bindgen::JsValue); + pub fn set_keys(this: &DisplayNameOptions, val: &::wasm_bindgen::JsValue); #[doc = "Get the `style` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DisplayNameOptions`*"] #[wasm_bindgen(method, getter = "style")] pub fn get_style(this: &DisplayNameOptions) -> Option; + #[doc = "Change the `style` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DisplayNameOptions`*"] #[wasm_bindgen(method, setter = "style")] - fn set_style(this: &DisplayNameOptions, val: &str); + pub fn set_style(this: &DisplayNameOptions, val: &str); } impl DisplayNameOptions { #[doc = "Construct a new `DisplayNameOptions`."] @@ -34,16 +40,12 @@ impl DisplayNameOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `keys` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DisplayNameOptions`*"] + #[deprecated = "Use `set_keys()` instead."] pub fn keys(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_keys(val); self } - #[doc = "Change the `style` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DisplayNameOptions`*"] + #[deprecated = "Use `set_style()` instead."] pub fn style(&mut self, val: &str) -> &mut Self { self.set_style(val); self diff --git a/crates/web-sys/src/features/gen_DisplayNameResult.rs b/crates/web-sys/src/features/gen_DisplayNameResult.rs index 60003a06ab6d..bfb8507ddd53 100644 --- a/crates/web-sys/src/features/gen_DisplayNameResult.rs +++ b/crates/web-sys/src/features/gen_DisplayNameResult.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `DisplayNameResult`*"] #[wasm_bindgen(method, getter = "locale")] pub fn get_locale(this: &DisplayNameResult) -> Option; + #[doc = "Change the `locale` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DisplayNameResult`*"] #[wasm_bindgen(method, setter = "locale")] - fn set_locale(this: &DisplayNameResult, val: &str); + pub fn set_locale(this: &DisplayNameResult, val: &str); #[doc = "Get the `style` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DisplayNameResult`*"] #[wasm_bindgen(method, getter = "style")] pub fn get_style(this: &DisplayNameResult) -> Option; + #[doc = "Change the `style` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DisplayNameResult`*"] #[wasm_bindgen(method, setter = "style")] - fn set_style(this: &DisplayNameResult, val: &str); + pub fn set_style(this: &DisplayNameResult, val: &str); } impl DisplayNameResult { #[doc = "Construct a new `DisplayNameResult`."] @@ -34,16 +40,12 @@ impl DisplayNameResult { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `locale` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DisplayNameResult`*"] + #[deprecated = "Use `set_locale()` instead."] pub fn locale(&mut self, val: &str) -> &mut Self { self.set_locale(val); self } - #[doc = "Change the `style` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DisplayNameResult`*"] + #[deprecated = "Use `set_style()` instead."] pub fn style(&mut self, val: &str) -> &mut Self { self.set_style(val); self diff --git a/crates/web-sys/src/features/gen_DnsCacheDict.rs b/crates/web-sys/src/features/gen_DnsCacheDict.rs index 1a2d201b9dfe..a6467078f67a 100644 --- a/crates/web-sys/src/features/gen_DnsCacheDict.rs +++ b/crates/web-sys/src/features/gen_DnsCacheDict.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `DnsCacheDict`*"] #[wasm_bindgen(method, getter = "entries")] pub fn get_entries(this: &DnsCacheDict) -> Option<::js_sys::Array>; + #[doc = "Change the `entries` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DnsCacheDict`*"] #[wasm_bindgen(method, setter = "entries")] - fn set_entries(this: &DnsCacheDict, val: &::wasm_bindgen::JsValue); + pub fn set_entries(this: &DnsCacheDict, val: &::wasm_bindgen::JsValue); } impl DnsCacheDict { #[doc = "Construct a new `DnsCacheDict`."] @@ -27,9 +30,7 @@ impl DnsCacheDict { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `entries` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DnsCacheDict`*"] + #[deprecated = "Use `set_entries()` instead."] pub fn entries(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_entries(val); self diff --git a/crates/web-sys/src/features/gen_DnsCacheEntry.rs b/crates/web-sys/src/features/gen_DnsCacheEntry.rs index 1740c3b09e2a..54d837685fc3 100644 --- a/crates/web-sys/src/features/gen_DnsCacheEntry.rs +++ b/crates/web-sys/src/features/gen_DnsCacheEntry.rs @@ -15,36 +15,51 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `DnsCacheEntry`*"] #[wasm_bindgen(method, getter = "expiration")] pub fn get_expiration(this: &DnsCacheEntry) -> Option; + #[doc = "Change the `expiration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DnsCacheEntry`*"] #[wasm_bindgen(method, setter = "expiration")] - fn set_expiration(this: &DnsCacheEntry, val: f64); + pub fn set_expiration(this: &DnsCacheEntry, val: f64); #[doc = "Get the `family` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DnsCacheEntry`*"] #[wasm_bindgen(method, getter = "family")] pub fn get_family(this: &DnsCacheEntry) -> Option; + #[doc = "Change the `family` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DnsCacheEntry`*"] #[wasm_bindgen(method, setter = "family")] - fn set_family(this: &DnsCacheEntry, val: &str); + pub fn set_family(this: &DnsCacheEntry, val: &str); #[doc = "Get the `hostaddr` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DnsCacheEntry`*"] #[wasm_bindgen(method, getter = "hostaddr")] pub fn get_hostaddr(this: &DnsCacheEntry) -> Option<::js_sys::Array>; + #[doc = "Change the `hostaddr` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DnsCacheEntry`*"] #[wasm_bindgen(method, setter = "hostaddr")] - fn set_hostaddr(this: &DnsCacheEntry, val: &::wasm_bindgen::JsValue); + pub fn set_hostaddr(this: &DnsCacheEntry, val: &::wasm_bindgen::JsValue); #[doc = "Get the `hostname` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DnsCacheEntry`*"] #[wasm_bindgen(method, getter = "hostname")] pub fn get_hostname(this: &DnsCacheEntry) -> Option; + #[doc = "Change the `hostname` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DnsCacheEntry`*"] #[wasm_bindgen(method, setter = "hostname")] - fn set_hostname(this: &DnsCacheEntry, val: &str); + pub fn set_hostname(this: &DnsCacheEntry, val: &str); #[doc = "Get the `trr` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DnsCacheEntry`*"] #[wasm_bindgen(method, getter = "trr")] pub fn get_trr(this: &DnsCacheEntry) -> Option; + #[doc = "Change the `trr` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DnsCacheEntry`*"] #[wasm_bindgen(method, setter = "trr")] - fn set_trr(this: &DnsCacheEntry, val: bool); + pub fn set_trr(this: &DnsCacheEntry, val: bool); } impl DnsCacheEntry { #[doc = "Construct a new `DnsCacheEntry`."] @@ -55,37 +70,27 @@ impl DnsCacheEntry { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `expiration` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DnsCacheEntry`*"] + #[deprecated = "Use `set_expiration()` instead."] pub fn expiration(&mut self, val: f64) -> &mut Self { self.set_expiration(val); self } - #[doc = "Change the `family` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DnsCacheEntry`*"] + #[deprecated = "Use `set_family()` instead."] pub fn family(&mut self, val: &str) -> &mut Self { self.set_family(val); self } - #[doc = "Change the `hostaddr` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DnsCacheEntry`*"] + #[deprecated = "Use `set_hostaddr()` instead."] pub fn hostaddr(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_hostaddr(val); self } - #[doc = "Change the `hostname` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DnsCacheEntry`*"] + #[deprecated = "Use `set_hostname()` instead."] pub fn hostname(&mut self, val: &str) -> &mut Self { self.set_hostname(val); self } - #[doc = "Change the `trr` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DnsCacheEntry`*"] + #[deprecated = "Use `set_trr()` instead."] pub fn trr(&mut self, val: bool) -> &mut Self { self.set_trr(val); self diff --git a/crates/web-sys/src/features/gen_DnsLookupDict.rs b/crates/web-sys/src/features/gen_DnsLookupDict.rs index 0071970325f4..3a40b3dac609 100644 --- a/crates/web-sys/src/features/gen_DnsLookupDict.rs +++ b/crates/web-sys/src/features/gen_DnsLookupDict.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `DnsLookupDict`*"] #[wasm_bindgen(method, getter = "address")] pub fn get_address(this: &DnsLookupDict) -> Option<::js_sys::Array>; + #[doc = "Change the `address` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DnsLookupDict`*"] #[wasm_bindgen(method, setter = "address")] - fn set_address(this: &DnsLookupDict, val: &::wasm_bindgen::JsValue); + pub fn set_address(this: &DnsLookupDict, val: &::wasm_bindgen::JsValue); #[doc = "Get the `answer` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DnsLookupDict`*"] #[wasm_bindgen(method, getter = "answer")] pub fn get_answer(this: &DnsLookupDict) -> Option; + #[doc = "Change the `answer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DnsLookupDict`*"] #[wasm_bindgen(method, setter = "answer")] - fn set_answer(this: &DnsLookupDict, val: bool); + pub fn set_answer(this: &DnsLookupDict, val: bool); #[doc = "Get the `error` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DnsLookupDict`*"] #[wasm_bindgen(method, getter = "error")] pub fn get_error(this: &DnsLookupDict) -> Option; + #[doc = "Change the `error` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DnsLookupDict`*"] #[wasm_bindgen(method, setter = "error")] - fn set_error(this: &DnsLookupDict, val: &str); + pub fn set_error(this: &DnsLookupDict, val: &str); } impl DnsLookupDict { #[doc = "Construct a new `DnsLookupDict`."] @@ -41,23 +50,17 @@ impl DnsLookupDict { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `address` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DnsLookupDict`*"] + #[deprecated = "Use `set_address()` instead."] pub fn address(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_address(val); self } - #[doc = "Change the `answer` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DnsLookupDict`*"] + #[deprecated = "Use `set_answer()` instead."] pub fn answer(&mut self, val: bool) -> &mut Self { self.set_answer(val); self } - #[doc = "Change the `error` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DnsLookupDict`*"] + #[deprecated = "Use `set_error()` instead."] pub fn error(&mut self, val: &str) -> &mut Self { self.set_error(val); self diff --git a/crates/web-sys/src/features/gen_DocumentTimelineOptions.rs b/crates/web-sys/src/features/gen_DocumentTimelineOptions.rs index 407b87a9be05..116bf1075b75 100644 --- a/crates/web-sys/src/features/gen_DocumentTimelineOptions.rs +++ b/crates/web-sys/src/features/gen_DocumentTimelineOptions.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `DocumentTimelineOptions`*"] #[wasm_bindgen(method, getter = "originTime")] pub fn get_origin_time(this: &DocumentTimelineOptions) -> Option; + #[doc = "Change the `originTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DocumentTimelineOptions`*"] #[wasm_bindgen(method, setter = "originTime")] - fn set_origin_time(this: &DocumentTimelineOptions, val: f64); + pub fn set_origin_time(this: &DocumentTimelineOptions, val: f64); } impl DocumentTimelineOptions { #[doc = "Construct a new `DocumentTimelineOptions`."] @@ -27,9 +30,7 @@ impl DocumentTimelineOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `originTime` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DocumentTimelineOptions`*"] + #[deprecated = "Use `set_origin_time()` instead."] pub fn origin_time(&mut self, val: f64) -> &mut Self { self.set_origin_time(val); self diff --git a/crates/web-sys/src/features/gen_DomMatrix2dInit.rs b/crates/web-sys/src/features/gen_DomMatrix2dInit.rs index eed0aab71ee5..b3ca99c99318 100644 --- a/crates/web-sys/src/features/gen_DomMatrix2dInit.rs +++ b/crates/web-sys/src/features/gen_DomMatrix2dInit.rs @@ -15,85 +15,121 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] #[wasm_bindgen(method, getter = "a")] pub fn get_a(this: &DomMatrix2dInit) -> Option; + #[doc = "Change the `a` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] #[wasm_bindgen(method, setter = "a")] - fn set_a(this: &DomMatrix2dInit, val: f64); + pub fn set_a(this: &DomMatrix2dInit, val: f64); #[doc = "Get the `b` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] #[wasm_bindgen(method, getter = "b")] pub fn get_b(this: &DomMatrix2dInit) -> Option; + #[doc = "Change the `b` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] #[wasm_bindgen(method, setter = "b")] - fn set_b(this: &DomMatrix2dInit, val: f64); + pub fn set_b(this: &DomMatrix2dInit, val: f64); #[doc = "Get the `c` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] #[wasm_bindgen(method, getter = "c")] pub fn get_c(this: &DomMatrix2dInit) -> Option; + #[doc = "Change the `c` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] #[wasm_bindgen(method, setter = "c")] - fn set_c(this: &DomMatrix2dInit, val: f64); + pub fn set_c(this: &DomMatrix2dInit, val: f64); #[doc = "Get the `d` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] #[wasm_bindgen(method, getter = "d")] pub fn get_d(this: &DomMatrix2dInit) -> Option; + #[doc = "Change the `d` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] #[wasm_bindgen(method, setter = "d")] - fn set_d(this: &DomMatrix2dInit, val: f64); + pub fn set_d(this: &DomMatrix2dInit, val: f64); #[doc = "Get the `e` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] #[wasm_bindgen(method, getter = "e")] pub fn get_e(this: &DomMatrix2dInit) -> Option; + #[doc = "Change the `e` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] #[wasm_bindgen(method, setter = "e")] - fn set_e(this: &DomMatrix2dInit, val: f64); + pub fn set_e(this: &DomMatrix2dInit, val: f64); #[doc = "Get the `f` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] #[wasm_bindgen(method, getter = "f")] pub fn get_f(this: &DomMatrix2dInit) -> Option; + #[doc = "Change the `f` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] #[wasm_bindgen(method, setter = "f")] - fn set_f(this: &DomMatrix2dInit, val: f64); + pub fn set_f(this: &DomMatrix2dInit, val: f64); #[doc = "Get the `m11` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] #[wasm_bindgen(method, getter = "m11")] pub fn get_m11(this: &DomMatrix2dInit) -> Option; + #[doc = "Change the `m11` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] #[wasm_bindgen(method, setter = "m11")] - fn set_m11(this: &DomMatrix2dInit, val: f64); + pub fn set_m11(this: &DomMatrix2dInit, val: f64); #[doc = "Get the `m12` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] #[wasm_bindgen(method, getter = "m12")] pub fn get_m12(this: &DomMatrix2dInit) -> Option; + #[doc = "Change the `m12` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] #[wasm_bindgen(method, setter = "m12")] - fn set_m12(this: &DomMatrix2dInit, val: f64); + pub fn set_m12(this: &DomMatrix2dInit, val: f64); #[doc = "Get the `m21` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] #[wasm_bindgen(method, getter = "m21")] pub fn get_m21(this: &DomMatrix2dInit) -> Option; + #[doc = "Change the `m21` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] #[wasm_bindgen(method, setter = "m21")] - fn set_m21(this: &DomMatrix2dInit, val: f64); + pub fn set_m21(this: &DomMatrix2dInit, val: f64); #[doc = "Get the `m22` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] #[wasm_bindgen(method, getter = "m22")] pub fn get_m22(this: &DomMatrix2dInit) -> Option; + #[doc = "Change the `m22` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] #[wasm_bindgen(method, setter = "m22")] - fn set_m22(this: &DomMatrix2dInit, val: f64); + pub fn set_m22(this: &DomMatrix2dInit, val: f64); #[doc = "Get the `m41` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] #[wasm_bindgen(method, getter = "m41")] pub fn get_m41(this: &DomMatrix2dInit) -> Option; + #[doc = "Change the `m41` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] #[wasm_bindgen(method, setter = "m41")] - fn set_m41(this: &DomMatrix2dInit, val: f64); + pub fn set_m41(this: &DomMatrix2dInit, val: f64); #[doc = "Get the `m42` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] #[wasm_bindgen(method, getter = "m42")] pub fn get_m42(this: &DomMatrix2dInit) -> Option; + #[doc = "Change the `m42` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] #[wasm_bindgen(method, setter = "m42")] - fn set_m42(this: &DomMatrix2dInit, val: f64); + pub fn set_m42(this: &DomMatrix2dInit, val: f64); } impl DomMatrix2dInit { #[doc = "Construct a new `DomMatrix2dInit`."] @@ -104,86 +140,62 @@ impl DomMatrix2dInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `a` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] + #[deprecated = "Use `set_a()` instead."] pub fn a(&mut self, val: f64) -> &mut Self { self.set_a(val); self } - #[doc = "Change the `b` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] + #[deprecated = "Use `set_b()` instead."] pub fn b(&mut self, val: f64) -> &mut Self { self.set_b(val); self } - #[doc = "Change the `c` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] + #[deprecated = "Use `set_c()` instead."] pub fn c(&mut self, val: f64) -> &mut Self { self.set_c(val); self } - #[doc = "Change the `d` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] + #[deprecated = "Use `set_d()` instead."] pub fn d(&mut self, val: f64) -> &mut Self { self.set_d(val); self } - #[doc = "Change the `e` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] + #[deprecated = "Use `set_e()` instead."] pub fn e(&mut self, val: f64) -> &mut Self { self.set_e(val); self } - #[doc = "Change the `f` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] + #[deprecated = "Use `set_f()` instead."] pub fn f(&mut self, val: f64) -> &mut Self { self.set_f(val); self } - #[doc = "Change the `m11` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] + #[deprecated = "Use `set_m11()` instead."] pub fn m11(&mut self, val: f64) -> &mut Self { self.set_m11(val); self } - #[doc = "Change the `m12` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] + #[deprecated = "Use `set_m12()` instead."] pub fn m12(&mut self, val: f64) -> &mut Self { self.set_m12(val); self } - #[doc = "Change the `m21` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] + #[deprecated = "Use `set_m21()` instead."] pub fn m21(&mut self, val: f64) -> &mut Self { self.set_m21(val); self } - #[doc = "Change the `m22` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] + #[deprecated = "Use `set_m22()` instead."] pub fn m22(&mut self, val: f64) -> &mut Self { self.set_m22(val); self } - #[doc = "Change the `m41` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] + #[deprecated = "Use `set_m41()` instead."] pub fn m41(&mut self, val: f64) -> &mut Self { self.set_m41(val); self } - #[doc = "Change the `m42` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] + #[deprecated = "Use `set_m42()` instead."] pub fn m42(&mut self, val: f64) -> &mut Self { self.set_m42(val); self diff --git a/crates/web-sys/src/features/gen_DomMatrixInit.rs b/crates/web-sys/src/features/gen_DomMatrixInit.rs index 8ea790fc71bb..15809896dd0f 100644 --- a/crates/web-sys/src/features/gen_DomMatrixInit.rs +++ b/crates/web-sys/src/features/gen_DomMatrixInit.rs @@ -15,162 +15,231 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, getter = "a")] pub fn get_a(this: &DomMatrixInit) -> Option; + #[doc = "Change the `a` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, setter = "a")] - fn set_a(this: &DomMatrixInit, val: f64); + pub fn set_a(this: &DomMatrixInit, val: f64); #[doc = "Get the `b` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, getter = "b")] pub fn get_b(this: &DomMatrixInit) -> Option; + #[doc = "Change the `b` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, setter = "b")] - fn set_b(this: &DomMatrixInit, val: f64); + pub fn set_b(this: &DomMatrixInit, val: f64); #[doc = "Get the `c` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, getter = "c")] pub fn get_c(this: &DomMatrixInit) -> Option; + #[doc = "Change the `c` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, setter = "c")] - fn set_c(this: &DomMatrixInit, val: f64); + pub fn set_c(this: &DomMatrixInit, val: f64); #[doc = "Get the `d` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, getter = "d")] pub fn get_d(this: &DomMatrixInit) -> Option; + #[doc = "Change the `d` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, setter = "d")] - fn set_d(this: &DomMatrixInit, val: f64); + pub fn set_d(this: &DomMatrixInit, val: f64); #[doc = "Get the `e` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, getter = "e")] pub fn get_e(this: &DomMatrixInit) -> Option; + #[doc = "Change the `e` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, setter = "e")] - fn set_e(this: &DomMatrixInit, val: f64); + pub fn set_e(this: &DomMatrixInit, val: f64); #[doc = "Get the `f` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, getter = "f")] pub fn get_f(this: &DomMatrixInit) -> Option; + #[doc = "Change the `f` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, setter = "f")] - fn set_f(this: &DomMatrixInit, val: f64); + pub fn set_f(this: &DomMatrixInit, val: f64); #[doc = "Get the `m11` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, getter = "m11")] pub fn get_m11(this: &DomMatrixInit) -> Option; + #[doc = "Change the `m11` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, setter = "m11")] - fn set_m11(this: &DomMatrixInit, val: f64); + pub fn set_m11(this: &DomMatrixInit, val: f64); #[doc = "Get the `m12` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, getter = "m12")] pub fn get_m12(this: &DomMatrixInit) -> Option; + #[doc = "Change the `m12` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, setter = "m12")] - fn set_m12(this: &DomMatrixInit, val: f64); + pub fn set_m12(this: &DomMatrixInit, val: f64); #[doc = "Get the `m21` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, getter = "m21")] pub fn get_m21(this: &DomMatrixInit) -> Option; + #[doc = "Change the `m21` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, setter = "m21")] - fn set_m21(this: &DomMatrixInit, val: f64); + pub fn set_m21(this: &DomMatrixInit, val: f64); #[doc = "Get the `m22` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, getter = "m22")] pub fn get_m22(this: &DomMatrixInit) -> Option; + #[doc = "Change the `m22` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, setter = "m22")] - fn set_m22(this: &DomMatrixInit, val: f64); + pub fn set_m22(this: &DomMatrixInit, val: f64); #[doc = "Get the `m41` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, getter = "m41")] pub fn get_m41(this: &DomMatrixInit) -> Option; + #[doc = "Change the `m41` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, setter = "m41")] - fn set_m41(this: &DomMatrixInit, val: f64); + pub fn set_m41(this: &DomMatrixInit, val: f64); #[doc = "Get the `m42` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, getter = "m42")] pub fn get_m42(this: &DomMatrixInit) -> Option; + #[doc = "Change the `m42` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, setter = "m42")] - fn set_m42(this: &DomMatrixInit, val: f64); + pub fn set_m42(this: &DomMatrixInit, val: f64); #[doc = "Get the `is2D` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, getter = "is2D")] pub fn get_is_2d(this: &DomMatrixInit) -> Option; + #[doc = "Change the `is2D` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, setter = "is2D")] - fn set_is_2d(this: &DomMatrixInit, val: bool); + pub fn set_is_2d(this: &DomMatrixInit, val: bool); #[doc = "Get the `m13` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, getter = "m13")] pub fn get_m13(this: &DomMatrixInit) -> Option; + #[doc = "Change the `m13` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, setter = "m13")] - fn set_m13(this: &DomMatrixInit, val: f64); + pub fn set_m13(this: &DomMatrixInit, val: f64); #[doc = "Get the `m14` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, getter = "m14")] pub fn get_m14(this: &DomMatrixInit) -> Option; + #[doc = "Change the `m14` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, setter = "m14")] - fn set_m14(this: &DomMatrixInit, val: f64); + pub fn set_m14(this: &DomMatrixInit, val: f64); #[doc = "Get the `m23` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, getter = "m23")] pub fn get_m23(this: &DomMatrixInit) -> Option; + #[doc = "Change the `m23` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, setter = "m23")] - fn set_m23(this: &DomMatrixInit, val: f64); + pub fn set_m23(this: &DomMatrixInit, val: f64); #[doc = "Get the `m24` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, getter = "m24")] pub fn get_m24(this: &DomMatrixInit) -> Option; + #[doc = "Change the `m24` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, setter = "m24")] - fn set_m24(this: &DomMatrixInit, val: f64); + pub fn set_m24(this: &DomMatrixInit, val: f64); #[doc = "Get the `m31` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, getter = "m31")] pub fn get_m31(this: &DomMatrixInit) -> Option; + #[doc = "Change the `m31` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, setter = "m31")] - fn set_m31(this: &DomMatrixInit, val: f64); + pub fn set_m31(this: &DomMatrixInit, val: f64); #[doc = "Get the `m32` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, getter = "m32")] pub fn get_m32(this: &DomMatrixInit) -> Option; + #[doc = "Change the `m32` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, setter = "m32")] - fn set_m32(this: &DomMatrixInit, val: f64); + pub fn set_m32(this: &DomMatrixInit, val: f64); #[doc = "Get the `m33` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, getter = "m33")] pub fn get_m33(this: &DomMatrixInit) -> Option; + #[doc = "Change the `m33` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, setter = "m33")] - fn set_m33(this: &DomMatrixInit, val: f64); + pub fn set_m33(this: &DomMatrixInit, val: f64); #[doc = "Get the `m34` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, getter = "m34")] pub fn get_m34(this: &DomMatrixInit) -> Option; + #[doc = "Change the `m34` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, setter = "m34")] - fn set_m34(this: &DomMatrixInit, val: f64); + pub fn set_m34(this: &DomMatrixInit, val: f64); #[doc = "Get the `m43` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, getter = "m43")] pub fn get_m43(this: &DomMatrixInit) -> Option; + #[doc = "Change the `m43` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, setter = "m43")] - fn set_m43(this: &DomMatrixInit, val: f64); + pub fn set_m43(this: &DomMatrixInit, val: f64); #[doc = "Get the `m44` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, getter = "m44")] pub fn get_m44(this: &DomMatrixInit) -> Option; + #[doc = "Change the `m44` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, setter = "m44")] - fn set_m44(this: &DomMatrixInit, val: f64); + pub fn set_m44(this: &DomMatrixInit, val: f64); } impl DomMatrixInit { #[doc = "Construct a new `DomMatrixInit`."] @@ -181,163 +250,117 @@ impl DomMatrixInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `a` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[deprecated = "Use `set_a()` instead."] pub fn a(&mut self, val: f64) -> &mut Self { self.set_a(val); self } - #[doc = "Change the `b` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[deprecated = "Use `set_b()` instead."] pub fn b(&mut self, val: f64) -> &mut Self { self.set_b(val); self } - #[doc = "Change the `c` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[deprecated = "Use `set_c()` instead."] pub fn c(&mut self, val: f64) -> &mut Self { self.set_c(val); self } - #[doc = "Change the `d` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[deprecated = "Use `set_d()` instead."] pub fn d(&mut self, val: f64) -> &mut Self { self.set_d(val); self } - #[doc = "Change the `e` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[deprecated = "Use `set_e()` instead."] pub fn e(&mut self, val: f64) -> &mut Self { self.set_e(val); self } - #[doc = "Change the `f` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[deprecated = "Use `set_f()` instead."] pub fn f(&mut self, val: f64) -> &mut Self { self.set_f(val); self } - #[doc = "Change the `m11` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[deprecated = "Use `set_m11()` instead."] pub fn m11(&mut self, val: f64) -> &mut Self { self.set_m11(val); self } - #[doc = "Change the `m12` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[deprecated = "Use `set_m12()` instead."] pub fn m12(&mut self, val: f64) -> &mut Self { self.set_m12(val); self } - #[doc = "Change the `m21` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[deprecated = "Use `set_m21()` instead."] pub fn m21(&mut self, val: f64) -> &mut Self { self.set_m21(val); self } - #[doc = "Change the `m22` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[deprecated = "Use `set_m22()` instead."] pub fn m22(&mut self, val: f64) -> &mut Self { self.set_m22(val); self } - #[doc = "Change the `m41` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[deprecated = "Use `set_m41()` instead."] pub fn m41(&mut self, val: f64) -> &mut Self { self.set_m41(val); self } - #[doc = "Change the `m42` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[deprecated = "Use `set_m42()` instead."] pub fn m42(&mut self, val: f64) -> &mut Self { self.set_m42(val); self } - #[doc = "Change the `is2D` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[deprecated = "Use `set_is_2d()` instead."] pub fn is_2d(&mut self, val: bool) -> &mut Self { self.set_is_2d(val); self } - #[doc = "Change the `m13` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[deprecated = "Use `set_m13()` instead."] pub fn m13(&mut self, val: f64) -> &mut Self { self.set_m13(val); self } - #[doc = "Change the `m14` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[deprecated = "Use `set_m14()` instead."] pub fn m14(&mut self, val: f64) -> &mut Self { self.set_m14(val); self } - #[doc = "Change the `m23` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[deprecated = "Use `set_m23()` instead."] pub fn m23(&mut self, val: f64) -> &mut Self { self.set_m23(val); self } - #[doc = "Change the `m24` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[deprecated = "Use `set_m24()` instead."] pub fn m24(&mut self, val: f64) -> &mut Self { self.set_m24(val); self } - #[doc = "Change the `m31` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[deprecated = "Use `set_m31()` instead."] pub fn m31(&mut self, val: f64) -> &mut Self { self.set_m31(val); self } - #[doc = "Change the `m32` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[deprecated = "Use `set_m32()` instead."] pub fn m32(&mut self, val: f64) -> &mut Self { self.set_m32(val); self } - #[doc = "Change the `m33` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[deprecated = "Use `set_m33()` instead."] pub fn m33(&mut self, val: f64) -> &mut Self { self.set_m33(val); self } - #[doc = "Change the `m34` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[deprecated = "Use `set_m34()` instead."] pub fn m34(&mut self, val: f64) -> &mut Self { self.set_m34(val); self } - #[doc = "Change the `m43` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[deprecated = "Use `set_m43()` instead."] pub fn m43(&mut self, val: f64) -> &mut Self { self.set_m43(val); self } - #[doc = "Change the `m44` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[deprecated = "Use `set_m44()` instead."] pub fn m44(&mut self, val: f64) -> &mut Self { self.set_m44(val); self diff --git a/crates/web-sys/src/features/gen_DomPointInit.rs b/crates/web-sys/src/features/gen_DomPointInit.rs index 1cb3584c092a..b5f58ae1fb0e 100644 --- a/crates/web-sys/src/features/gen_DomPointInit.rs +++ b/crates/web-sys/src/features/gen_DomPointInit.rs @@ -15,29 +15,41 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `DomPointInit`*"] #[wasm_bindgen(method, getter = "w")] pub fn get_w(this: &DomPointInit) -> Option; + #[doc = "Change the `w` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomPointInit`*"] #[wasm_bindgen(method, setter = "w")] - fn set_w(this: &DomPointInit, val: f64); + pub fn set_w(this: &DomPointInit, val: f64); #[doc = "Get the `x` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomPointInit`*"] #[wasm_bindgen(method, getter = "x")] pub fn get_x(this: &DomPointInit) -> Option; + #[doc = "Change the `x` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomPointInit`*"] #[wasm_bindgen(method, setter = "x")] - fn set_x(this: &DomPointInit, val: f64); + pub fn set_x(this: &DomPointInit, val: f64); #[doc = "Get the `y` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomPointInit`*"] #[wasm_bindgen(method, getter = "y")] pub fn get_y(this: &DomPointInit) -> Option; + #[doc = "Change the `y` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomPointInit`*"] #[wasm_bindgen(method, setter = "y")] - fn set_y(this: &DomPointInit, val: f64); + pub fn set_y(this: &DomPointInit, val: f64); #[doc = "Get the `z` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomPointInit`*"] #[wasm_bindgen(method, getter = "z")] pub fn get_z(this: &DomPointInit) -> Option; + #[doc = "Change the `z` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomPointInit`*"] #[wasm_bindgen(method, setter = "z")] - fn set_z(this: &DomPointInit, val: f64); + pub fn set_z(this: &DomPointInit, val: f64); } impl DomPointInit { #[doc = "Construct a new `DomPointInit`."] @@ -48,30 +60,22 @@ impl DomPointInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `w` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomPointInit`*"] + #[deprecated = "Use `set_w()` instead."] pub fn w(&mut self, val: f64) -> &mut Self { self.set_w(val); self } - #[doc = "Change the `x` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomPointInit`*"] + #[deprecated = "Use `set_x()` instead."] pub fn x(&mut self, val: f64) -> &mut Self { self.set_x(val); self } - #[doc = "Change the `y` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomPointInit`*"] + #[deprecated = "Use `set_y()` instead."] pub fn y(&mut self, val: f64) -> &mut Self { self.set_y(val); self } - #[doc = "Change the `z` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomPointInit`*"] + #[deprecated = "Use `set_z()` instead."] pub fn z(&mut self, val: f64) -> &mut Self { self.set_z(val); self diff --git a/crates/web-sys/src/features/gen_DomQuadInit.rs b/crates/web-sys/src/features/gen_DomQuadInit.rs index a68268c99d5e..113f80350e00 100644 --- a/crates/web-sys/src/features/gen_DomQuadInit.rs +++ b/crates/web-sys/src/features/gen_DomQuadInit.rs @@ -17,8 +17,11 @@ extern "C" { #[wasm_bindgen(method, getter = "p1")] pub fn get_p1(this: &DomQuadInit) -> Option; #[cfg(feature = "DomPointInit")] + #[doc = "Change the `p1` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomPointInit`, `DomQuadInit`*"] #[wasm_bindgen(method, setter = "p1")] - fn set_p1(this: &DomQuadInit, val: &DomPointInit); + pub fn set_p1(this: &DomQuadInit, val: &DomPointInit); #[cfg(feature = "DomPointInit")] #[doc = "Get the `p2` field of this object."] #[doc = ""] @@ -26,8 +29,11 @@ extern "C" { #[wasm_bindgen(method, getter = "p2")] pub fn get_p2(this: &DomQuadInit) -> Option; #[cfg(feature = "DomPointInit")] + #[doc = "Change the `p2` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomPointInit`, `DomQuadInit`*"] #[wasm_bindgen(method, setter = "p2")] - fn set_p2(this: &DomQuadInit, val: &DomPointInit); + pub fn set_p2(this: &DomQuadInit, val: &DomPointInit); #[cfg(feature = "DomPointInit")] #[doc = "Get the `p3` field of this object."] #[doc = ""] @@ -35,8 +41,11 @@ extern "C" { #[wasm_bindgen(method, getter = "p3")] pub fn get_p3(this: &DomQuadInit) -> Option; #[cfg(feature = "DomPointInit")] + #[doc = "Change the `p3` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomPointInit`, `DomQuadInit`*"] #[wasm_bindgen(method, setter = "p3")] - fn set_p3(this: &DomQuadInit, val: &DomPointInit); + pub fn set_p3(this: &DomQuadInit, val: &DomPointInit); #[cfg(feature = "DomPointInit")] #[doc = "Get the `p4` field of this object."] #[doc = ""] @@ -44,8 +53,11 @@ extern "C" { #[wasm_bindgen(method, getter = "p4")] pub fn get_p4(this: &DomQuadInit) -> Option; #[cfg(feature = "DomPointInit")] + #[doc = "Change the `p4` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomPointInit`, `DomQuadInit`*"] #[wasm_bindgen(method, setter = "p4")] - fn set_p4(this: &DomQuadInit, val: &DomPointInit); + pub fn set_p4(this: &DomQuadInit, val: &DomPointInit); } impl DomQuadInit { #[doc = "Construct a new `DomQuadInit`."] @@ -57,33 +69,25 @@ impl DomQuadInit { ret } #[cfg(feature = "DomPointInit")] - #[doc = "Change the `p1` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomPointInit`, `DomQuadInit`*"] + #[deprecated = "Use `set_p1()` instead."] pub fn p1(&mut self, val: &DomPointInit) -> &mut Self { self.set_p1(val); self } #[cfg(feature = "DomPointInit")] - #[doc = "Change the `p2` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomPointInit`, `DomQuadInit`*"] + #[deprecated = "Use `set_p2()` instead."] pub fn p2(&mut self, val: &DomPointInit) -> &mut Self { self.set_p2(val); self } #[cfg(feature = "DomPointInit")] - #[doc = "Change the `p3` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomPointInit`, `DomQuadInit`*"] + #[deprecated = "Use `set_p3()` instead."] pub fn p3(&mut self, val: &DomPointInit) -> &mut Self { self.set_p3(val); self } #[cfg(feature = "DomPointInit")] - #[doc = "Change the `p4` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomPointInit`, `DomQuadInit`*"] + #[deprecated = "Use `set_p4()` instead."] pub fn p4(&mut self, val: &DomPointInit) -> &mut Self { self.set_p4(val); self diff --git a/crates/web-sys/src/features/gen_DomQuadJson.rs b/crates/web-sys/src/features/gen_DomQuadJson.rs index 440700e34a6c..2bba1e24bd7f 100644 --- a/crates/web-sys/src/features/gen_DomQuadJson.rs +++ b/crates/web-sys/src/features/gen_DomQuadJson.rs @@ -17,8 +17,11 @@ extern "C" { #[wasm_bindgen(method, getter = "p1")] pub fn get_p1(this: &DomQuadJson) -> Option; #[cfg(feature = "DomPoint")] + #[doc = "Change the `p1` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomPoint`, `DomQuadJson`*"] #[wasm_bindgen(method, setter = "p1")] - fn set_p1(this: &DomQuadJson, val: &DomPoint); + pub fn set_p1(this: &DomQuadJson, val: &DomPoint); #[cfg(feature = "DomPoint")] #[doc = "Get the `p2` field of this object."] #[doc = ""] @@ -26,8 +29,11 @@ extern "C" { #[wasm_bindgen(method, getter = "p2")] pub fn get_p2(this: &DomQuadJson) -> Option; #[cfg(feature = "DomPoint")] + #[doc = "Change the `p2` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomPoint`, `DomQuadJson`*"] #[wasm_bindgen(method, setter = "p2")] - fn set_p2(this: &DomQuadJson, val: &DomPoint); + pub fn set_p2(this: &DomQuadJson, val: &DomPoint); #[cfg(feature = "DomPoint")] #[doc = "Get the `p3` field of this object."] #[doc = ""] @@ -35,8 +41,11 @@ extern "C" { #[wasm_bindgen(method, getter = "p3")] pub fn get_p3(this: &DomQuadJson) -> Option; #[cfg(feature = "DomPoint")] + #[doc = "Change the `p3` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomPoint`, `DomQuadJson`*"] #[wasm_bindgen(method, setter = "p3")] - fn set_p3(this: &DomQuadJson, val: &DomPoint); + pub fn set_p3(this: &DomQuadJson, val: &DomPoint); #[cfg(feature = "DomPoint")] #[doc = "Get the `p4` field of this object."] #[doc = ""] @@ -44,8 +53,11 @@ extern "C" { #[wasm_bindgen(method, getter = "p4")] pub fn get_p4(this: &DomQuadJson) -> Option; #[cfg(feature = "DomPoint")] + #[doc = "Change the `p4` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomPoint`, `DomQuadJson`*"] #[wasm_bindgen(method, setter = "p4")] - fn set_p4(this: &DomQuadJson, val: &DomPoint); + pub fn set_p4(this: &DomQuadJson, val: &DomPoint); } impl DomQuadJson { #[doc = "Construct a new `DomQuadJson`."] @@ -57,33 +69,25 @@ impl DomQuadJson { ret } #[cfg(feature = "DomPoint")] - #[doc = "Change the `p1` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomPoint`, `DomQuadJson`*"] + #[deprecated = "Use `set_p1()` instead."] pub fn p1(&mut self, val: &DomPoint) -> &mut Self { self.set_p1(val); self } #[cfg(feature = "DomPoint")] - #[doc = "Change the `p2` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomPoint`, `DomQuadJson`*"] + #[deprecated = "Use `set_p2()` instead."] pub fn p2(&mut self, val: &DomPoint) -> &mut Self { self.set_p2(val); self } #[cfg(feature = "DomPoint")] - #[doc = "Change the `p3` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomPoint`, `DomQuadJson`*"] + #[deprecated = "Use `set_p3()` instead."] pub fn p3(&mut self, val: &DomPoint) -> &mut Self { self.set_p3(val); self } #[cfg(feature = "DomPoint")] - #[doc = "Change the `p4` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomPoint`, `DomQuadJson`*"] + #[deprecated = "Use `set_p4()` instead."] pub fn p4(&mut self, val: &DomPoint) -> &mut Self { self.set_p4(val); self diff --git a/crates/web-sys/src/features/gen_DomRectInit.rs b/crates/web-sys/src/features/gen_DomRectInit.rs index 44b50e58d7ad..d02056c5ce2e 100644 --- a/crates/web-sys/src/features/gen_DomRectInit.rs +++ b/crates/web-sys/src/features/gen_DomRectInit.rs @@ -15,29 +15,41 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `DomRectInit`*"] #[wasm_bindgen(method, getter = "height")] pub fn get_height(this: &DomRectInit) -> Option; + #[doc = "Change the `height` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomRectInit`*"] #[wasm_bindgen(method, setter = "height")] - fn set_height(this: &DomRectInit, val: f64); + pub fn set_height(this: &DomRectInit, val: f64); #[doc = "Get the `width` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomRectInit`*"] #[wasm_bindgen(method, getter = "width")] pub fn get_width(this: &DomRectInit) -> Option; + #[doc = "Change the `width` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomRectInit`*"] #[wasm_bindgen(method, setter = "width")] - fn set_width(this: &DomRectInit, val: f64); + pub fn set_width(this: &DomRectInit, val: f64); #[doc = "Get the `x` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomRectInit`*"] #[wasm_bindgen(method, getter = "x")] pub fn get_x(this: &DomRectInit) -> Option; + #[doc = "Change the `x` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomRectInit`*"] #[wasm_bindgen(method, setter = "x")] - fn set_x(this: &DomRectInit, val: f64); + pub fn set_x(this: &DomRectInit, val: f64); #[doc = "Get the `y` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomRectInit`*"] #[wasm_bindgen(method, getter = "y")] pub fn get_y(this: &DomRectInit) -> Option; + #[doc = "Change the `y` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomRectInit`*"] #[wasm_bindgen(method, setter = "y")] - fn set_y(this: &DomRectInit, val: f64); + pub fn set_y(this: &DomRectInit, val: f64); } impl DomRectInit { #[doc = "Construct a new `DomRectInit`."] @@ -48,30 +60,22 @@ impl DomRectInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `height` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomRectInit`*"] + #[deprecated = "Use `set_height()` instead."] pub fn height(&mut self, val: f64) -> &mut Self { self.set_height(val); self } - #[doc = "Change the `width` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomRectInit`*"] + #[deprecated = "Use `set_width()` instead."] pub fn width(&mut self, val: f64) -> &mut Self { self.set_width(val); self } - #[doc = "Change the `x` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomRectInit`*"] + #[deprecated = "Use `set_x()` instead."] pub fn x(&mut self, val: f64) -> &mut Self { self.set_x(val); self } - #[doc = "Change the `y` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomRectInit`*"] + #[deprecated = "Use `set_y()` instead."] pub fn y(&mut self, val: f64) -> &mut Self { self.set_y(val); self diff --git a/crates/web-sys/src/features/gen_DomWindowResizeEventDetail.rs b/crates/web-sys/src/features/gen_DomWindowResizeEventDetail.rs index f20f5c5fdcec..79560ef04a78 100644 --- a/crates/web-sys/src/features/gen_DomWindowResizeEventDetail.rs +++ b/crates/web-sys/src/features/gen_DomWindowResizeEventDetail.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `DomWindowResizeEventDetail`*"] #[wasm_bindgen(method, getter = "height")] pub fn get_height(this: &DomWindowResizeEventDetail) -> Option; + #[doc = "Change the `height` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomWindowResizeEventDetail`*"] #[wasm_bindgen(method, setter = "height")] - fn set_height(this: &DomWindowResizeEventDetail, val: i32); + pub fn set_height(this: &DomWindowResizeEventDetail, val: i32); #[doc = "Get the `width` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomWindowResizeEventDetail`*"] #[wasm_bindgen(method, getter = "width")] pub fn get_width(this: &DomWindowResizeEventDetail) -> Option; + #[doc = "Change the `width` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomWindowResizeEventDetail`*"] #[wasm_bindgen(method, setter = "width")] - fn set_width(this: &DomWindowResizeEventDetail, val: i32); + pub fn set_width(this: &DomWindowResizeEventDetail, val: i32); } impl DomWindowResizeEventDetail { #[doc = "Construct a new `DomWindowResizeEventDetail`."] @@ -34,16 +40,12 @@ impl DomWindowResizeEventDetail { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `height` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomWindowResizeEventDetail`*"] + #[deprecated = "Use `set_height()` instead."] pub fn height(&mut self, val: i32) -> &mut Self { self.set_height(val); self } - #[doc = "Change the `width` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomWindowResizeEventDetail`*"] + #[deprecated = "Use `set_width()` instead."] pub fn width(&mut self, val: i32) -> &mut Self { self.set_width(val); self diff --git a/crates/web-sys/src/features/gen_DoubleRange.rs b/crates/web-sys/src/features/gen_DoubleRange.rs index 4a041ef5c6cf..86a427e7df07 100644 --- a/crates/web-sys/src/features/gen_DoubleRange.rs +++ b/crates/web-sys/src/features/gen_DoubleRange.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "max")] pub fn get_max(this: &DoubleRange) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `max` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DoubleRange`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "max")] - fn set_max(this: &DoubleRange, val: f64); + pub fn set_max(this: &DoubleRange, val: f64); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `min` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "min")] pub fn get_min(this: &DoubleRange) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `min` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DoubleRange`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "min")] - fn set_min(this: &DoubleRange, val: f64); + pub fn set_min(this: &DoubleRange, val: f64); } #[cfg(web_sys_unstable_apis)] impl DoubleRange { @@ -51,23 +65,13 @@ impl DoubleRange { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `max` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DoubleRange`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_max()` instead."] pub fn max(&mut self, val: f64) -> &mut Self { self.set_max(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `min` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DoubleRange`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_min()` instead."] pub fn min(&mut self, val: f64) -> &mut Self { self.set_min(val); self diff --git a/crates/web-sys/src/features/gen_DragEventInit.rs b/crates/web-sys/src/features/gen_DragEventInit.rs index a6a0f52b7452..0781bdf13223 100644 --- a/crates/web-sys/src/features/gen_DragEventInit.rs +++ b/crates/web-sys/src/features/gen_DragEventInit.rs @@ -15,29 +15,41 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &DragEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &DragEventInit, val: bool); + pub fn set_bubbles(this: &DragEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &DragEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &DragEventInit, val: bool); + pub fn set_cancelable(this: &DragEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &DragEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &DragEventInit, val: bool); + pub fn set_composed(this: &DragEventInit, val: bool); #[doc = "Get the `detail` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, getter = "detail")] pub fn get_detail(this: &DragEventInit) -> Option; + #[doc = "Change the `detail` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, setter = "detail")] - fn set_detail(this: &DragEventInit, val: i32); + pub fn set_detail(this: &DragEventInit, val: i32); #[cfg(feature = "Window")] #[doc = "Get the `view` field of this object."] #[doc = ""] @@ -45,141 +57,201 @@ extern "C" { #[wasm_bindgen(method, getter = "view")] pub fn get_view(this: &DragEventInit) -> Option; #[cfg(feature = "Window")] + #[doc = "Change the `view` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`, `Window`*"] #[wasm_bindgen(method, setter = "view")] - fn set_view(this: &DragEventInit, val: Option<&Window>); + pub fn set_view(this: &DragEventInit, val: Option<&Window>); #[doc = "Get the `altKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, getter = "altKey")] pub fn get_alt_key(this: &DragEventInit) -> Option; + #[doc = "Change the `altKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, setter = "altKey")] - fn set_alt_key(this: &DragEventInit, val: bool); + pub fn set_alt_key(this: &DragEventInit, val: bool); #[doc = "Get the `ctrlKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, getter = "ctrlKey")] pub fn get_ctrl_key(this: &DragEventInit) -> Option; + #[doc = "Change the `ctrlKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, setter = "ctrlKey")] - fn set_ctrl_key(this: &DragEventInit, val: bool); + pub fn set_ctrl_key(this: &DragEventInit, val: bool); #[doc = "Get the `metaKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, getter = "metaKey")] pub fn get_meta_key(this: &DragEventInit) -> Option; + #[doc = "Change the `metaKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, setter = "metaKey")] - fn set_meta_key(this: &DragEventInit, val: bool); + pub fn set_meta_key(this: &DragEventInit, val: bool); #[doc = "Get the `modifierAltGraph` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, getter = "modifierAltGraph")] pub fn get_modifier_alt_graph(this: &DragEventInit) -> Option; + #[doc = "Change the `modifierAltGraph` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, setter = "modifierAltGraph")] - fn set_modifier_alt_graph(this: &DragEventInit, val: bool); + pub fn set_modifier_alt_graph(this: &DragEventInit, val: bool); #[doc = "Get the `modifierCapsLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, getter = "modifierCapsLock")] pub fn get_modifier_caps_lock(this: &DragEventInit) -> Option; + #[doc = "Change the `modifierCapsLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, setter = "modifierCapsLock")] - fn set_modifier_caps_lock(this: &DragEventInit, val: bool); + pub fn set_modifier_caps_lock(this: &DragEventInit, val: bool); #[doc = "Get the `modifierFn` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, getter = "modifierFn")] pub fn get_modifier_fn(this: &DragEventInit) -> Option; + #[doc = "Change the `modifierFn` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, setter = "modifierFn")] - fn set_modifier_fn(this: &DragEventInit, val: bool); + pub fn set_modifier_fn(this: &DragEventInit, val: bool); #[doc = "Get the `modifierFnLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, getter = "modifierFnLock")] pub fn get_modifier_fn_lock(this: &DragEventInit) -> Option; + #[doc = "Change the `modifierFnLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, setter = "modifierFnLock")] - fn set_modifier_fn_lock(this: &DragEventInit, val: bool); + pub fn set_modifier_fn_lock(this: &DragEventInit, val: bool); #[doc = "Get the `modifierNumLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, getter = "modifierNumLock")] pub fn get_modifier_num_lock(this: &DragEventInit) -> Option; + #[doc = "Change the `modifierNumLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, setter = "modifierNumLock")] - fn set_modifier_num_lock(this: &DragEventInit, val: bool); + pub fn set_modifier_num_lock(this: &DragEventInit, val: bool); #[doc = "Get the `modifierOS` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, getter = "modifierOS")] pub fn get_modifier_os(this: &DragEventInit) -> Option; + #[doc = "Change the `modifierOS` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, setter = "modifierOS")] - fn set_modifier_os(this: &DragEventInit, val: bool); + pub fn set_modifier_os(this: &DragEventInit, val: bool); #[doc = "Get the `modifierScrollLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, getter = "modifierScrollLock")] pub fn get_modifier_scroll_lock(this: &DragEventInit) -> Option; + #[doc = "Change the `modifierScrollLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, setter = "modifierScrollLock")] - fn set_modifier_scroll_lock(this: &DragEventInit, val: bool); + pub fn set_modifier_scroll_lock(this: &DragEventInit, val: bool); #[doc = "Get the `modifierSymbol` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, getter = "modifierSymbol")] pub fn get_modifier_symbol(this: &DragEventInit) -> Option; + #[doc = "Change the `modifierSymbol` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, setter = "modifierSymbol")] - fn set_modifier_symbol(this: &DragEventInit, val: bool); + pub fn set_modifier_symbol(this: &DragEventInit, val: bool); #[doc = "Get the `modifierSymbolLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, getter = "modifierSymbolLock")] pub fn get_modifier_symbol_lock(this: &DragEventInit) -> Option; + #[doc = "Change the `modifierSymbolLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, setter = "modifierSymbolLock")] - fn set_modifier_symbol_lock(this: &DragEventInit, val: bool); + pub fn set_modifier_symbol_lock(this: &DragEventInit, val: bool); #[doc = "Get the `shiftKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, getter = "shiftKey")] pub fn get_shift_key(this: &DragEventInit) -> Option; + #[doc = "Change the `shiftKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, setter = "shiftKey")] - fn set_shift_key(this: &DragEventInit, val: bool); + pub fn set_shift_key(this: &DragEventInit, val: bool); #[doc = "Get the `button` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, getter = "button")] pub fn get_button(this: &DragEventInit) -> Option; + #[doc = "Change the `button` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, setter = "button")] - fn set_button(this: &DragEventInit, val: i16); + pub fn set_button(this: &DragEventInit, val: i16); #[doc = "Get the `buttons` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, getter = "buttons")] pub fn get_buttons(this: &DragEventInit) -> Option; + #[doc = "Change the `buttons` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, setter = "buttons")] - fn set_buttons(this: &DragEventInit, val: u16); + pub fn set_buttons(this: &DragEventInit, val: u16); #[doc = "Get the `clientX` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, getter = "clientX")] pub fn get_client_x(this: &DragEventInit) -> Option; + #[doc = "Change the `clientX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, setter = "clientX")] - fn set_client_x(this: &DragEventInit, val: i32); + pub fn set_client_x(this: &DragEventInit, val: i32); #[doc = "Get the `clientY` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, getter = "clientY")] pub fn get_client_y(this: &DragEventInit) -> Option; + #[doc = "Change the `clientY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, setter = "clientY")] - fn set_client_y(this: &DragEventInit, val: i32); + pub fn set_client_y(this: &DragEventInit, val: i32); #[doc = "Get the `movementX` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, getter = "movementX")] pub fn get_movement_x(this: &DragEventInit) -> Option; + #[doc = "Change the `movementX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, setter = "movementX")] - fn set_movement_x(this: &DragEventInit, val: i32); + pub fn set_movement_x(this: &DragEventInit, val: i32); #[doc = "Get the `movementY` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, getter = "movementY")] pub fn get_movement_y(this: &DragEventInit) -> Option; + #[doc = "Change the `movementY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, setter = "movementY")] - fn set_movement_y(this: &DragEventInit, val: i32); + pub fn set_movement_y(this: &DragEventInit, val: i32); #[cfg(feature = "EventTarget")] #[doc = "Get the `relatedTarget` field of this object."] #[doc = ""] @@ -187,22 +259,31 @@ extern "C" { #[wasm_bindgen(method, getter = "relatedTarget")] pub fn get_related_target(this: &DragEventInit) -> Option; #[cfg(feature = "EventTarget")] + #[doc = "Change the `relatedTarget` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`, `EventTarget`*"] #[wasm_bindgen(method, setter = "relatedTarget")] - fn set_related_target(this: &DragEventInit, val: Option<&EventTarget>); + pub fn set_related_target(this: &DragEventInit, val: Option<&EventTarget>); #[doc = "Get the `screenX` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, getter = "screenX")] pub fn get_screen_x(this: &DragEventInit) -> Option; + #[doc = "Change the `screenX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, setter = "screenX")] - fn set_screen_x(this: &DragEventInit, val: i32); + pub fn set_screen_x(this: &DragEventInit, val: i32); #[doc = "Get the `screenY` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, getter = "screenY")] pub fn get_screen_y(this: &DragEventInit) -> Option; + #[doc = "Change the `screenY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, setter = "screenY")] - fn set_screen_y(this: &DragEventInit, val: i32); + pub fn set_screen_y(this: &DragEventInit, val: i32); #[cfg(feature = "DataTransfer")] #[doc = "Get the `dataTransfer` field of this object."] #[doc = ""] @@ -210,8 +291,11 @@ extern "C" { #[wasm_bindgen(method, getter = "dataTransfer")] pub fn get_data_transfer(this: &DragEventInit) -> Option; #[cfg(feature = "DataTransfer")] + #[doc = "Change the `dataTransfer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DataTransfer`, `DragEventInit`*"] #[wasm_bindgen(method, setter = "dataTransfer")] - fn set_data_transfer(this: &DragEventInit, val: Option<&DataTransfer>); + pub fn set_data_transfer(this: &DragEventInit, val: Option<&DataTransfer>); } impl DragEventInit { #[doc = "Construct a new `DragEventInit`."] @@ -222,201 +306,145 @@ impl DragEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } - #[doc = "Change the `detail` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[deprecated = "Use `set_detail()` instead."] pub fn detail(&mut self, val: i32) -> &mut Self { self.set_detail(val); self } #[cfg(feature = "Window")] - #[doc = "Change the `view` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DragEventInit`, `Window`*"] + #[deprecated = "Use `set_view()` instead."] pub fn view(&mut self, val: Option<&Window>) -> &mut Self { self.set_view(val); self } - #[doc = "Change the `altKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[deprecated = "Use `set_alt_key()` instead."] pub fn alt_key(&mut self, val: bool) -> &mut Self { self.set_alt_key(val); self } - #[doc = "Change the `ctrlKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[deprecated = "Use `set_ctrl_key()` instead."] pub fn ctrl_key(&mut self, val: bool) -> &mut Self { self.set_ctrl_key(val); self } - #[doc = "Change the `metaKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[deprecated = "Use `set_meta_key()` instead."] pub fn meta_key(&mut self, val: bool) -> &mut Self { self.set_meta_key(val); self } - #[doc = "Change the `modifierAltGraph` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[deprecated = "Use `set_modifier_alt_graph()` instead."] pub fn modifier_alt_graph(&mut self, val: bool) -> &mut Self { self.set_modifier_alt_graph(val); self } - #[doc = "Change the `modifierCapsLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[deprecated = "Use `set_modifier_caps_lock()` instead."] pub fn modifier_caps_lock(&mut self, val: bool) -> &mut Self { self.set_modifier_caps_lock(val); self } - #[doc = "Change the `modifierFn` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[deprecated = "Use `set_modifier_fn()` instead."] pub fn modifier_fn(&mut self, val: bool) -> &mut Self { self.set_modifier_fn(val); self } - #[doc = "Change the `modifierFnLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[deprecated = "Use `set_modifier_fn_lock()` instead."] pub fn modifier_fn_lock(&mut self, val: bool) -> &mut Self { self.set_modifier_fn_lock(val); self } - #[doc = "Change the `modifierNumLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[deprecated = "Use `set_modifier_num_lock()` instead."] pub fn modifier_num_lock(&mut self, val: bool) -> &mut Self { self.set_modifier_num_lock(val); self } - #[doc = "Change the `modifierOS` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[deprecated = "Use `set_modifier_os()` instead."] pub fn modifier_os(&mut self, val: bool) -> &mut Self { self.set_modifier_os(val); self } - #[doc = "Change the `modifierScrollLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[deprecated = "Use `set_modifier_scroll_lock()` instead."] pub fn modifier_scroll_lock(&mut self, val: bool) -> &mut Self { self.set_modifier_scroll_lock(val); self } - #[doc = "Change the `modifierSymbol` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[deprecated = "Use `set_modifier_symbol()` instead."] pub fn modifier_symbol(&mut self, val: bool) -> &mut Self { self.set_modifier_symbol(val); self } - #[doc = "Change the `modifierSymbolLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[deprecated = "Use `set_modifier_symbol_lock()` instead."] pub fn modifier_symbol_lock(&mut self, val: bool) -> &mut Self { self.set_modifier_symbol_lock(val); self } - #[doc = "Change the `shiftKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[deprecated = "Use `set_shift_key()` instead."] pub fn shift_key(&mut self, val: bool) -> &mut Self { self.set_shift_key(val); self } - #[doc = "Change the `button` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[deprecated = "Use `set_button()` instead."] pub fn button(&mut self, val: i16) -> &mut Self { self.set_button(val); self } - #[doc = "Change the `buttons` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[deprecated = "Use `set_buttons()` instead."] pub fn buttons(&mut self, val: u16) -> &mut Self { self.set_buttons(val); self } - #[doc = "Change the `clientX` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[deprecated = "Use `set_client_x()` instead."] pub fn client_x(&mut self, val: i32) -> &mut Self { self.set_client_x(val); self } - #[doc = "Change the `clientY` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[deprecated = "Use `set_client_y()` instead."] pub fn client_y(&mut self, val: i32) -> &mut Self { self.set_client_y(val); self } - #[doc = "Change the `movementX` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[deprecated = "Use `set_movement_x()` instead."] pub fn movement_x(&mut self, val: i32) -> &mut Self { self.set_movement_x(val); self } - #[doc = "Change the `movementY` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[deprecated = "Use `set_movement_y()` instead."] pub fn movement_y(&mut self, val: i32) -> &mut Self { self.set_movement_y(val); self } #[cfg(feature = "EventTarget")] - #[doc = "Change the `relatedTarget` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DragEventInit`, `EventTarget`*"] + #[deprecated = "Use `set_related_target()` instead."] pub fn related_target(&mut self, val: Option<&EventTarget>) -> &mut Self { self.set_related_target(val); self } - #[doc = "Change the `screenX` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[deprecated = "Use `set_screen_x()` instead."] pub fn screen_x(&mut self, val: i32) -> &mut Self { self.set_screen_x(val); self } - #[doc = "Change the `screenY` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[deprecated = "Use `set_screen_y()` instead."] pub fn screen_y(&mut self, val: i32) -> &mut Self { self.set_screen_y(val); self } #[cfg(feature = "DataTransfer")] - #[doc = "Change the `dataTransfer` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DataTransfer`, `DragEventInit`*"] + #[deprecated = "Use `set_data_transfer()` instead."] pub fn data_transfer(&mut self, val: Option<&DataTransfer>) -> &mut Self { self.set_data_transfer(val); self diff --git a/crates/web-sys/src/features/gen_DynamicsCompressorOptions.rs b/crates/web-sys/src/features/gen_DynamicsCompressorOptions.rs index a42e21bd4ae2..dfd8201207c5 100644 --- a/crates/web-sys/src/features/gen_DynamicsCompressorOptions.rs +++ b/crates/web-sys/src/features/gen_DynamicsCompressorOptions.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"] #[wasm_bindgen(method, getter = "channelCount")] pub fn get_channel_count(this: &DynamicsCompressorOptions) -> Option; + #[doc = "Change the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"] #[wasm_bindgen(method, setter = "channelCount")] - fn set_channel_count(this: &DynamicsCompressorOptions, val: u32); + pub fn set_channel_count(this: &DynamicsCompressorOptions, val: u32); #[cfg(feature = "ChannelCountMode")] #[doc = "Get the `channelCountMode` field of this object."] #[doc = ""] @@ -24,8 +27,11 @@ extern "C" { #[wasm_bindgen(method, getter = "channelCountMode")] pub fn get_channel_count_mode(this: &DynamicsCompressorOptions) -> Option; #[cfg(feature = "ChannelCountMode")] + #[doc = "Change the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `DynamicsCompressorOptions`*"] #[wasm_bindgen(method, setter = "channelCountMode")] - fn set_channel_count_mode(this: &DynamicsCompressorOptions, val: ChannelCountMode); + pub fn set_channel_count_mode(this: &DynamicsCompressorOptions, val: ChannelCountMode); #[cfg(feature = "ChannelInterpretation")] #[doc = "Get the `channelInterpretation` field of this object."] #[doc = ""] @@ -35,43 +41,61 @@ extern "C" { this: &DynamicsCompressorOptions, ) -> Option; #[cfg(feature = "ChannelInterpretation")] + #[doc = "Change the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `DynamicsCompressorOptions`*"] #[wasm_bindgen(method, setter = "channelInterpretation")] - fn set_channel_interpretation(this: &DynamicsCompressorOptions, val: ChannelInterpretation); + pub fn set_channel_interpretation(this: &DynamicsCompressorOptions, val: ChannelInterpretation); #[doc = "Get the `attack` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"] #[wasm_bindgen(method, getter = "attack")] pub fn get_attack(this: &DynamicsCompressorOptions) -> Option; + #[doc = "Change the `attack` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"] #[wasm_bindgen(method, setter = "attack")] - fn set_attack(this: &DynamicsCompressorOptions, val: f32); + pub fn set_attack(this: &DynamicsCompressorOptions, val: f32); #[doc = "Get the `knee` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"] #[wasm_bindgen(method, getter = "knee")] pub fn get_knee(this: &DynamicsCompressorOptions) -> Option; + #[doc = "Change the `knee` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"] #[wasm_bindgen(method, setter = "knee")] - fn set_knee(this: &DynamicsCompressorOptions, val: f32); + pub fn set_knee(this: &DynamicsCompressorOptions, val: f32); #[doc = "Get the `ratio` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"] #[wasm_bindgen(method, getter = "ratio")] pub fn get_ratio(this: &DynamicsCompressorOptions) -> Option; + #[doc = "Change the `ratio` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"] #[wasm_bindgen(method, setter = "ratio")] - fn set_ratio(this: &DynamicsCompressorOptions, val: f32); + pub fn set_ratio(this: &DynamicsCompressorOptions, val: f32); #[doc = "Get the `release` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"] #[wasm_bindgen(method, getter = "release")] pub fn get_release(this: &DynamicsCompressorOptions) -> Option; + #[doc = "Change the `release` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"] #[wasm_bindgen(method, setter = "release")] - fn set_release(this: &DynamicsCompressorOptions, val: f32); + pub fn set_release(this: &DynamicsCompressorOptions, val: f32); #[doc = "Get the `threshold` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"] #[wasm_bindgen(method, getter = "threshold")] pub fn get_threshold(this: &DynamicsCompressorOptions) -> Option; + #[doc = "Change the `threshold` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"] #[wasm_bindgen(method, setter = "threshold")] - fn set_threshold(this: &DynamicsCompressorOptions, val: f32); + pub fn set_threshold(this: &DynamicsCompressorOptions, val: f32); } impl DynamicsCompressorOptions { #[doc = "Construct a new `DynamicsCompressorOptions`."] @@ -82,60 +106,44 @@ impl DynamicsCompressorOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `channelCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"] + #[deprecated = "Use `set_channel_count()` instead."] pub fn channel_count(&mut self, val: u32) -> &mut Self { self.set_channel_count(val); self } #[cfg(feature = "ChannelCountMode")] - #[doc = "Change the `channelCountMode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `DynamicsCompressorOptions`*"] + #[deprecated = "Use `set_channel_count_mode()` instead."] pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self { self.set_channel_count_mode(val); self } #[cfg(feature = "ChannelInterpretation")] - #[doc = "Change the `channelInterpretation` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `DynamicsCompressorOptions`*"] + #[deprecated = "Use `set_channel_interpretation()` instead."] pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self { self.set_channel_interpretation(val); self } - #[doc = "Change the `attack` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"] + #[deprecated = "Use `set_attack()` instead."] pub fn attack(&mut self, val: f32) -> &mut Self { self.set_attack(val); self } - #[doc = "Change the `knee` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"] + #[deprecated = "Use `set_knee()` instead."] pub fn knee(&mut self, val: f32) -> &mut Self { self.set_knee(val); self } - #[doc = "Change the `ratio` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"] + #[deprecated = "Use `set_ratio()` instead."] pub fn ratio(&mut self, val: f32) -> &mut Self { self.set_ratio(val); self } - #[doc = "Change the `release` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"] + #[deprecated = "Use `set_release()` instead."] pub fn release(&mut self, val: f32) -> &mut Self { self.set_release(val); self } - #[doc = "Change the `threshold` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"] + #[deprecated = "Use `set_threshold()` instead."] pub fn threshold(&mut self, val: f32) -> &mut Self { self.set_threshold(val); self diff --git a/crates/web-sys/src/features/gen_EcKeyAlgorithm.rs b/crates/web-sys/src/features/gen_EcKeyAlgorithm.rs index 5c72852afc5c..e45951c04b1f 100644 --- a/crates/web-sys/src/features/gen_EcKeyAlgorithm.rs +++ b/crates/web-sys/src/features/gen_EcKeyAlgorithm.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `EcKeyAlgorithm`*"] #[wasm_bindgen(method, getter = "name")] pub fn get_name(this: &EcKeyAlgorithm) -> String; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EcKeyAlgorithm`*"] #[wasm_bindgen(method, setter = "name")] - fn set_name(this: &EcKeyAlgorithm, val: &str); + pub fn set_name(this: &EcKeyAlgorithm, val: &str); #[doc = "Get the `namedCurve` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EcKeyAlgorithm`*"] #[wasm_bindgen(method, getter = "namedCurve")] pub fn get_named_curve(this: &EcKeyAlgorithm) -> String; + #[doc = "Change the `namedCurve` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EcKeyAlgorithm`*"] #[wasm_bindgen(method, setter = "namedCurve")] - fn set_named_curve(this: &EcKeyAlgorithm, val: &str); + pub fn set_named_curve(this: &EcKeyAlgorithm, val: &str); } impl EcKeyAlgorithm { #[doc = "Construct a new `EcKeyAlgorithm`."] @@ -36,16 +42,12 @@ impl EcKeyAlgorithm { ret.named_curve(named_curve); ret } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EcKeyAlgorithm`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { self.set_name(val); self } - #[doc = "Change the `namedCurve` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EcKeyAlgorithm`*"] + #[deprecated = "Use `set_named_curve()` instead."] pub fn named_curve(&mut self, val: &str) -> &mut Self { self.set_named_curve(val); self diff --git a/crates/web-sys/src/features/gen_EcKeyGenParams.rs b/crates/web-sys/src/features/gen_EcKeyGenParams.rs index 222eba325cbf..8992f7851b3d 100644 --- a/crates/web-sys/src/features/gen_EcKeyGenParams.rs +++ b/crates/web-sys/src/features/gen_EcKeyGenParams.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `EcKeyGenParams`*"] #[wasm_bindgen(method, getter = "name")] pub fn get_name(this: &EcKeyGenParams) -> String; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EcKeyGenParams`*"] #[wasm_bindgen(method, setter = "name")] - fn set_name(this: &EcKeyGenParams, val: &str); + pub fn set_name(this: &EcKeyGenParams, val: &str); #[doc = "Get the `namedCurve` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EcKeyGenParams`*"] #[wasm_bindgen(method, getter = "namedCurve")] pub fn get_named_curve(this: &EcKeyGenParams) -> String; + #[doc = "Change the `namedCurve` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EcKeyGenParams`*"] #[wasm_bindgen(method, setter = "namedCurve")] - fn set_named_curve(this: &EcKeyGenParams, val: &str); + pub fn set_named_curve(this: &EcKeyGenParams, val: &str); } impl EcKeyGenParams { #[doc = "Construct a new `EcKeyGenParams`."] @@ -36,16 +42,12 @@ impl EcKeyGenParams { ret.named_curve(named_curve); ret } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EcKeyGenParams`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { self.set_name(val); self } - #[doc = "Change the `namedCurve` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EcKeyGenParams`*"] + #[deprecated = "Use `set_named_curve()` instead."] pub fn named_curve(&mut self, val: &str) -> &mut Self { self.set_named_curve(val); self diff --git a/crates/web-sys/src/features/gen_EcKeyImportParams.rs b/crates/web-sys/src/features/gen_EcKeyImportParams.rs index 4048cfe7a504..ed7890234593 100644 --- a/crates/web-sys/src/features/gen_EcKeyImportParams.rs +++ b/crates/web-sys/src/features/gen_EcKeyImportParams.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `EcKeyImportParams`*"] #[wasm_bindgen(method, getter = "name")] pub fn get_name(this: &EcKeyImportParams) -> String; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EcKeyImportParams`*"] #[wasm_bindgen(method, setter = "name")] - fn set_name(this: &EcKeyImportParams, val: &str); + pub fn set_name(this: &EcKeyImportParams, val: &str); #[doc = "Get the `namedCurve` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EcKeyImportParams`*"] #[wasm_bindgen(method, getter = "namedCurve")] pub fn get_named_curve(this: &EcKeyImportParams) -> Option; + #[doc = "Change the `namedCurve` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EcKeyImportParams`*"] #[wasm_bindgen(method, setter = "namedCurve")] - fn set_named_curve(this: &EcKeyImportParams, val: &str); + pub fn set_named_curve(this: &EcKeyImportParams, val: &str); } impl EcKeyImportParams { #[doc = "Construct a new `EcKeyImportParams`."] @@ -35,16 +41,12 @@ impl EcKeyImportParams { ret.name(name); ret } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EcKeyImportParams`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { self.set_name(val); self } - #[doc = "Change the `namedCurve` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EcKeyImportParams`*"] + #[deprecated = "Use `set_named_curve()` instead."] pub fn named_curve(&mut self, val: &str) -> &mut Self { self.set_named_curve(val); self diff --git a/crates/web-sys/src/features/gen_EcdhKeyDeriveParams.rs b/crates/web-sys/src/features/gen_EcdhKeyDeriveParams.rs index 02348f5be57e..a061a19b0ec5 100644 --- a/crates/web-sys/src/features/gen_EcdhKeyDeriveParams.rs +++ b/crates/web-sys/src/features/gen_EcdhKeyDeriveParams.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `EcdhKeyDeriveParams`*"] #[wasm_bindgen(method, getter = "name")] pub fn get_name(this: &EcdhKeyDeriveParams) -> String; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EcdhKeyDeriveParams`*"] #[wasm_bindgen(method, setter = "name")] - fn set_name(this: &EcdhKeyDeriveParams, val: &str); + pub fn set_name(this: &EcdhKeyDeriveParams, val: &str); #[cfg(feature = "CryptoKey")] #[doc = "Get the `public` field of this object."] #[doc = ""] @@ -24,8 +27,11 @@ extern "C" { #[wasm_bindgen(method, getter = "public")] pub fn get_public(this: &EcdhKeyDeriveParams) -> CryptoKey; #[cfg(feature = "CryptoKey")] + #[doc = "Change the `public` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CryptoKey`, `EcdhKeyDeriveParams`*"] #[wasm_bindgen(method, setter = "public")] - fn set_public(this: &EcdhKeyDeriveParams, val: &CryptoKey); + pub fn set_public(this: &EcdhKeyDeriveParams, val: &CryptoKey); } impl EcdhKeyDeriveParams { #[cfg(feature = "CryptoKey")] @@ -39,17 +45,13 @@ impl EcdhKeyDeriveParams { ret.public(public); ret } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EcdhKeyDeriveParams`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { self.set_name(val); self } #[cfg(feature = "CryptoKey")] - #[doc = "Change the `public` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CryptoKey`, `EcdhKeyDeriveParams`*"] + #[deprecated = "Use `set_public()` instead."] pub fn public(&mut self, val: &CryptoKey) -> &mut Self { self.set_public(val); self diff --git a/crates/web-sys/src/features/gen_EcdsaParams.rs b/crates/web-sys/src/features/gen_EcdsaParams.rs index f6b81fd39b6e..14fe80e857b0 100644 --- a/crates/web-sys/src/features/gen_EcdsaParams.rs +++ b/crates/web-sys/src/features/gen_EcdsaParams.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `EcdsaParams`*"] #[wasm_bindgen(method, getter = "name")] pub fn get_name(this: &EcdsaParams) -> String; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EcdsaParams`*"] #[wasm_bindgen(method, setter = "name")] - fn set_name(this: &EcdsaParams, val: &str); + pub fn set_name(this: &EcdsaParams, val: &str); #[doc = "Get the `hash` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EcdsaParams`*"] #[wasm_bindgen(method, getter = "hash")] pub fn get_hash(this: &EcdsaParams) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `hash` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EcdsaParams`*"] #[wasm_bindgen(method, setter = "hash")] - fn set_hash(this: &EcdsaParams, val: &::wasm_bindgen::JsValue); + pub fn set_hash(this: &EcdsaParams, val: &::wasm_bindgen::JsValue); } impl EcdsaParams { #[doc = "Construct a new `EcdsaParams`."] @@ -36,16 +42,12 @@ impl EcdsaParams { ret.hash(hash); ret } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EcdsaParams`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { self.set_name(val); self } - #[doc = "Change the `hash` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EcdsaParams`*"] + #[deprecated = "Use `set_hash()` instead."] pub fn hash(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_hash(val); self diff --git a/crates/web-sys/src/features/gen_EffectTiming.rs b/crates/web-sys/src/features/gen_EffectTiming.rs index d9728c0565be..7a43b7a75c0d 100644 --- a/crates/web-sys/src/features/gen_EffectTiming.rs +++ b/crates/web-sys/src/features/gen_EffectTiming.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `EffectTiming`*"] #[wasm_bindgen(method, getter = "delay")] pub fn get_delay(this: &EffectTiming) -> Option; + #[doc = "Change the `delay` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EffectTiming`*"] #[wasm_bindgen(method, setter = "delay")] - fn set_delay(this: &EffectTiming, val: f64); + pub fn set_delay(this: &EffectTiming, val: f64); #[cfg(feature = "PlaybackDirection")] #[doc = "Get the `direction` field of this object."] #[doc = ""] @@ -24,29 +27,41 @@ extern "C" { #[wasm_bindgen(method, getter = "direction")] pub fn get_direction(this: &EffectTiming) -> Option; #[cfg(feature = "PlaybackDirection")] + #[doc = "Change the `direction` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EffectTiming`, `PlaybackDirection`*"] #[wasm_bindgen(method, setter = "direction")] - fn set_direction(this: &EffectTiming, val: PlaybackDirection); + pub fn set_direction(this: &EffectTiming, val: PlaybackDirection); #[doc = "Get the `duration` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EffectTiming`*"] #[wasm_bindgen(method, getter = "duration")] pub fn get_duration(this: &EffectTiming) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `duration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EffectTiming`*"] #[wasm_bindgen(method, setter = "duration")] - fn set_duration(this: &EffectTiming, val: &::wasm_bindgen::JsValue); + pub fn set_duration(this: &EffectTiming, val: &::wasm_bindgen::JsValue); #[doc = "Get the `easing` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EffectTiming`*"] #[wasm_bindgen(method, getter = "easing")] pub fn get_easing(this: &EffectTiming) -> Option; + #[doc = "Change the `easing` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EffectTiming`*"] #[wasm_bindgen(method, setter = "easing")] - fn set_easing(this: &EffectTiming, val: &str); + pub fn set_easing(this: &EffectTiming, val: &str); #[doc = "Get the `endDelay` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EffectTiming`*"] #[wasm_bindgen(method, getter = "endDelay")] pub fn get_end_delay(this: &EffectTiming) -> Option; + #[doc = "Change the `endDelay` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EffectTiming`*"] #[wasm_bindgen(method, setter = "endDelay")] - fn set_end_delay(this: &EffectTiming, val: f64); + pub fn set_end_delay(this: &EffectTiming, val: f64); #[cfg(feature = "FillMode")] #[doc = "Get the `fill` field of this object."] #[doc = ""] @@ -54,22 +69,31 @@ extern "C" { #[wasm_bindgen(method, getter = "fill")] pub fn get_fill(this: &EffectTiming) -> Option; #[cfg(feature = "FillMode")] + #[doc = "Change the `fill` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EffectTiming`, `FillMode`*"] #[wasm_bindgen(method, setter = "fill")] - fn set_fill(this: &EffectTiming, val: FillMode); + pub fn set_fill(this: &EffectTiming, val: FillMode); #[doc = "Get the `iterationStart` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EffectTiming`*"] #[wasm_bindgen(method, getter = "iterationStart")] pub fn get_iteration_start(this: &EffectTiming) -> Option; + #[doc = "Change the `iterationStart` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EffectTiming`*"] #[wasm_bindgen(method, setter = "iterationStart")] - fn set_iteration_start(this: &EffectTiming, val: f64); + pub fn set_iteration_start(this: &EffectTiming, val: f64); #[doc = "Get the `iterations` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EffectTiming`*"] #[wasm_bindgen(method, getter = "iterations")] pub fn get_iterations(this: &EffectTiming) -> Option; + #[doc = "Change the `iterations` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EffectTiming`*"] #[wasm_bindgen(method, setter = "iterations")] - fn set_iterations(this: &EffectTiming, val: f64); + pub fn set_iterations(this: &EffectTiming, val: f64); } impl EffectTiming { #[doc = "Construct a new `EffectTiming`."] @@ -80,60 +104,44 @@ impl EffectTiming { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `delay` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EffectTiming`*"] + #[deprecated = "Use `set_delay()` instead."] pub fn delay(&mut self, val: f64) -> &mut Self { self.set_delay(val); self } #[cfg(feature = "PlaybackDirection")] - #[doc = "Change the `direction` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EffectTiming`, `PlaybackDirection`*"] + #[deprecated = "Use `set_direction()` instead."] pub fn direction(&mut self, val: PlaybackDirection) -> &mut Self { self.set_direction(val); self } - #[doc = "Change the `duration` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EffectTiming`*"] + #[deprecated = "Use `set_duration()` instead."] pub fn duration(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_duration(val); self } - #[doc = "Change the `easing` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EffectTiming`*"] + #[deprecated = "Use `set_easing()` instead."] pub fn easing(&mut self, val: &str) -> &mut Self { self.set_easing(val); self } - #[doc = "Change the `endDelay` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EffectTiming`*"] + #[deprecated = "Use `set_end_delay()` instead."] pub fn end_delay(&mut self, val: f64) -> &mut Self { self.set_end_delay(val); self } #[cfg(feature = "FillMode")] - #[doc = "Change the `fill` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EffectTiming`, `FillMode`*"] + #[deprecated = "Use `set_fill()` instead."] pub fn fill(&mut self, val: FillMode) -> &mut Self { self.set_fill(val); self } - #[doc = "Change the `iterationStart` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EffectTiming`*"] + #[deprecated = "Use `set_iteration_start()` instead."] pub fn iteration_start(&mut self, val: f64) -> &mut Self { self.set_iteration_start(val); self } - #[doc = "Change the `iterations` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EffectTiming`*"] + #[deprecated = "Use `set_iterations()` instead."] pub fn iterations(&mut self, val: f64) -> &mut Self { self.set_iterations(val); self diff --git a/crates/web-sys/src/features/gen_ElementCreationOptions.rs b/crates/web-sys/src/features/gen_ElementCreationOptions.rs index 647ff5de45d1..d9d29bca20da 100644 --- a/crates/web-sys/src/features/gen_ElementCreationOptions.rs +++ b/crates/web-sys/src/features/gen_ElementCreationOptions.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ElementCreationOptions`*"] #[wasm_bindgen(method, getter = "is")] pub fn get_is(this: &ElementCreationOptions) -> Option; + #[doc = "Change the `is` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ElementCreationOptions`*"] #[wasm_bindgen(method, setter = "is")] - fn set_is(this: &ElementCreationOptions, val: &str); + pub fn set_is(this: &ElementCreationOptions, val: &str); #[doc = "Get the `pseudo` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ElementCreationOptions`*"] #[wasm_bindgen(method, getter = "pseudo")] pub fn get_pseudo(this: &ElementCreationOptions) -> Option; + #[doc = "Change the `pseudo` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ElementCreationOptions`*"] #[wasm_bindgen(method, setter = "pseudo")] - fn set_pseudo(this: &ElementCreationOptions, val: &str); + pub fn set_pseudo(this: &ElementCreationOptions, val: &str); } impl ElementCreationOptions { #[doc = "Construct a new `ElementCreationOptions`."] @@ -34,16 +40,12 @@ impl ElementCreationOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `is` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ElementCreationOptions`*"] + #[deprecated = "Use `set_is()` instead."] pub fn is(&mut self, val: &str) -> &mut Self { self.set_is(val); self } - #[doc = "Change the `pseudo` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ElementCreationOptions`*"] + #[deprecated = "Use `set_pseudo()` instead."] pub fn pseudo(&mut self, val: &str) -> &mut Self { self.set_pseudo(val); self diff --git a/crates/web-sys/src/features/gen_ElementDefinitionOptions.rs b/crates/web-sys/src/features/gen_ElementDefinitionOptions.rs index 464d76ca87fd..086ab7bc6d33 100644 --- a/crates/web-sys/src/features/gen_ElementDefinitionOptions.rs +++ b/crates/web-sys/src/features/gen_ElementDefinitionOptions.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ElementDefinitionOptions`*"] #[wasm_bindgen(method, getter = "extends")] pub fn get_extends(this: &ElementDefinitionOptions) -> Option; + #[doc = "Change the `extends` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ElementDefinitionOptions`*"] #[wasm_bindgen(method, setter = "extends")] - fn set_extends(this: &ElementDefinitionOptions, val: &str); + pub fn set_extends(this: &ElementDefinitionOptions, val: &str); } impl ElementDefinitionOptions { #[doc = "Construct a new `ElementDefinitionOptions`."] @@ -27,9 +30,7 @@ impl ElementDefinitionOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `extends` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ElementDefinitionOptions`*"] + #[deprecated = "Use `set_extends()` instead."] pub fn extends(&mut self, val: &str) -> &mut Self { self.set_extends(val); self diff --git a/crates/web-sys/src/features/gen_EncodedAudioChunkInit.rs b/crates/web-sys/src/features/gen_EncodedAudioChunkInit.rs index 42a4ae5938a2..76b491edc457 100644 --- a/crates/web-sys/src/features/gen_EncodedAudioChunkInit.rs +++ b/crates/web-sys/src/features/gen_EncodedAudioChunkInit.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "data")] pub fn get_data(this: &EncodedAudioChunkInit) -> ::js_sys::Object; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EncodedAudioChunkInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "data")] - fn set_data(this: &EncodedAudioChunkInit, val: &::js_sys::Object); + pub fn set_data(this: &EncodedAudioChunkInit, val: &::js_sys::Object); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `duration` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "duration")] pub fn get_duration(this: &EncodedAudioChunkInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `duration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EncodedAudioChunkInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "duration")] - fn set_duration(this: &EncodedAudioChunkInit, val: f64); + pub fn set_duration(this: &EncodedAudioChunkInit, val: f64); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `timestamp` field of this object."] #[doc = ""] @@ -45,8 +59,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "timestamp")] pub fn get_timestamp(this: &EncodedAudioChunkInit) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EncodedAudioChunkInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "timestamp")] - fn set_timestamp(this: &EncodedAudioChunkInit, val: f64); + pub fn set_timestamp(this: &EncodedAudioChunkInit, val: f64); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "EncodedAudioChunkType")] #[doc = "Get the `type` field of this object."] @@ -57,9 +78,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "type")] pub fn get_type(this: &EncodedAudioChunkInit) -> EncodedAudioChunkType; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "EncodedAudioChunkType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EncodedAudioChunkInit`, `EncodedAudioChunkType`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "type")] - fn set_type(this: &EncodedAudioChunkInit, val: EncodedAudioChunkType); + pub fn set_type(this: &EncodedAudioChunkInit, val: EncodedAudioChunkType); } #[cfg(web_sys_unstable_apis)] impl EncodedAudioChunkInit { @@ -79,46 +107,26 @@ impl EncodedAudioChunkInit { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `data` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EncodedAudioChunkInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_data()` instead."] pub fn data(&mut self, val: &::js_sys::Object) -> &mut Self { self.set_data(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `duration` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EncodedAudioChunkInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_duration()` instead."] pub fn duration(&mut self, val: f64) -> &mut Self { self.set_duration(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `timestamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EncodedAudioChunkInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_timestamp()` instead."] pub fn timestamp(&mut self, val: f64) -> &mut Self { self.set_timestamp(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "EncodedAudioChunkType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EncodedAudioChunkInit`, `EncodedAudioChunkType`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: EncodedAudioChunkType) -> &mut Self { self.set_type(val); self diff --git a/crates/web-sys/src/features/gen_EncodedAudioChunkMetadata.rs b/crates/web-sys/src/features/gen_EncodedAudioChunkMetadata.rs index e669479570f4..b90551f90519 100644 --- a/crates/web-sys/src/features/gen_EncodedAudioChunkMetadata.rs +++ b/crates/web-sys/src/features/gen_EncodedAudioChunkMetadata.rs @@ -24,9 +24,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "decoderConfig")] pub fn get_decoder_config(this: &EncodedAudioChunkMetadata) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "AudioDecoderConfig")] + #[doc = "Change the `decoderConfig` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDecoderConfig`, `EncodedAudioChunkMetadata`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "decoderConfig")] - fn set_decoder_config(this: &EncodedAudioChunkMetadata, val: &AudioDecoderConfig); + pub fn set_decoder_config(this: &EncodedAudioChunkMetadata, val: &AudioDecoderConfig); } #[cfg(web_sys_unstable_apis)] impl EncodedAudioChunkMetadata { @@ -43,12 +50,7 @@ impl EncodedAudioChunkMetadata { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "AudioDecoderConfig")] - #[doc = "Change the `decoderConfig` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioDecoderConfig`, `EncodedAudioChunkMetadata`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_decoder_config()` instead."] pub fn decoder_config(&mut self, val: &AudioDecoderConfig) -> &mut Self { self.set_decoder_config(val); self diff --git a/crates/web-sys/src/features/gen_EncodedVideoChunkInit.rs b/crates/web-sys/src/features/gen_EncodedVideoChunkInit.rs index cd246a72f51d..1e523952822f 100644 --- a/crates/web-sys/src/features/gen_EncodedVideoChunkInit.rs +++ b/crates/web-sys/src/features/gen_EncodedVideoChunkInit.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "data")] pub fn get_data(this: &EncodedVideoChunkInit) -> ::js_sys::Object; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "data")] - fn set_data(this: &EncodedVideoChunkInit, val: &::js_sys::Object); + pub fn set_data(this: &EncodedVideoChunkInit, val: &::js_sys::Object); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `duration` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "duration")] pub fn get_duration(this: &EncodedVideoChunkInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `duration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "duration")] - fn set_duration(this: &EncodedVideoChunkInit, val: f64); + pub fn set_duration(this: &EncodedVideoChunkInit, val: f64); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `timestamp` field of this object."] #[doc = ""] @@ -45,8 +59,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "timestamp")] pub fn get_timestamp(this: &EncodedVideoChunkInit) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "timestamp")] - fn set_timestamp(this: &EncodedVideoChunkInit, val: f64); + pub fn set_timestamp(this: &EncodedVideoChunkInit, val: f64); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "EncodedVideoChunkType")] #[doc = "Get the `type` field of this object."] @@ -57,9 +78,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "type")] pub fn get_type(this: &EncodedVideoChunkInit) -> EncodedVideoChunkType; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "EncodedVideoChunkType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkInit`, `EncodedVideoChunkType`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "type")] - fn set_type(this: &EncodedVideoChunkInit, val: EncodedVideoChunkType); + pub fn set_type(this: &EncodedVideoChunkInit, val: EncodedVideoChunkType); } #[cfg(web_sys_unstable_apis)] impl EncodedVideoChunkInit { @@ -79,46 +107,26 @@ impl EncodedVideoChunkInit { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `data` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_data()` instead."] pub fn data(&mut self, val: &::js_sys::Object) -> &mut Self { self.set_data(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `duration` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_duration()` instead."] pub fn duration(&mut self, val: f64) -> &mut Self { self.set_duration(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `timestamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_timestamp()` instead."] pub fn timestamp(&mut self, val: f64) -> &mut Self { self.set_timestamp(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "EncodedVideoChunkType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkInit`, `EncodedVideoChunkType`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: EncodedVideoChunkType) -> &mut Self { self.set_type(val); self diff --git a/crates/web-sys/src/features/gen_EncodedVideoChunkMetadata.rs b/crates/web-sys/src/features/gen_EncodedVideoChunkMetadata.rs index bfca7c8b21e8..640832b426be 100644 --- a/crates/web-sys/src/features/gen_EncodedVideoChunkMetadata.rs +++ b/crates/web-sys/src/features/gen_EncodedVideoChunkMetadata.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "alphaSideData")] pub fn get_alpha_side_data(this: &EncodedVideoChunkMetadata) -> Option<::js_sys::Object>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `alphaSideData` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkMetadata`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "alphaSideData")] - fn set_alpha_side_data(this: &EncodedVideoChunkMetadata, val: &::js_sys::Object); + pub fn set_alpha_side_data(this: &EncodedVideoChunkMetadata, val: &::js_sys::Object); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "VideoDecoderConfig")] #[doc = "Get the `decoderConfig` field of this object."] @@ -35,9 +42,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "decoderConfig")] pub fn get_decoder_config(this: &EncodedVideoChunkMetadata) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "VideoDecoderConfig")] + #[doc = "Change the `decoderConfig` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkMetadata`, `VideoDecoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "decoderConfig")] - fn set_decoder_config(this: &EncodedVideoChunkMetadata, val: &VideoDecoderConfig); + pub fn set_decoder_config(this: &EncodedVideoChunkMetadata, val: &VideoDecoderConfig); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "SvcOutputMetadata")] #[doc = "Get the `svc` field of this object."] @@ -48,9 +62,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "svc")] pub fn get_svc(this: &EncodedVideoChunkMetadata) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "SvcOutputMetadata")] + #[doc = "Change the `svc` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkMetadata`, `SvcOutputMetadata`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "svc")] - fn set_svc(this: &EncodedVideoChunkMetadata, val: &SvcOutputMetadata); + pub fn set_svc(this: &EncodedVideoChunkMetadata, val: &SvcOutputMetadata); } #[cfg(web_sys_unstable_apis)] impl EncodedVideoChunkMetadata { @@ -66,36 +87,21 @@ impl EncodedVideoChunkMetadata { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `alphaSideData` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkMetadata`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_alpha_side_data()` instead."] pub fn alpha_side_data(&mut self, val: &::js_sys::Object) -> &mut Self { self.set_alpha_side_data(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "VideoDecoderConfig")] - #[doc = "Change the `decoderConfig` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkMetadata`, `VideoDecoderConfig`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_decoder_config()` instead."] pub fn decoder_config(&mut self, val: &VideoDecoderConfig) -> &mut Self { self.set_decoder_config(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "SvcOutputMetadata")] - #[doc = "Change the `svc` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkMetadata`, `SvcOutputMetadata`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_svc()` instead."] pub fn svc(&mut self, val: &SvcOutputMetadata) -> &mut Self { self.set_svc(val); self diff --git a/crates/web-sys/src/features/gen_ErrorCallback.rs b/crates/web-sys/src/features/gen_ErrorCallback.rs index 42cc4e31cf11..7ca32ff496f6 100644 --- a/crates/web-sys/src/features/gen_ErrorCallback.rs +++ b/crates/web-sys/src/features/gen_ErrorCallback.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ErrorCallback`*"] #[wasm_bindgen(method, getter = "handleEvent")] pub fn get_handle_event(this: &ErrorCallback) -> Option<::js_sys::Function>; + #[doc = "Change the `handleEvent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ErrorCallback`*"] #[wasm_bindgen(method, setter = "handleEvent")] - fn set_handle_event(this: &ErrorCallback, val: &::js_sys::Function); + pub fn set_handle_event(this: &ErrorCallback, val: &::js_sys::Function); } impl ErrorCallback { #[doc = "Construct a new `ErrorCallback`."] @@ -27,9 +30,7 @@ impl ErrorCallback { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `handleEvent` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ErrorCallback`*"] + #[deprecated = "Use `set_handle_event()` instead."] pub fn handle_event(&mut self, val: &::js_sys::Function) -> &mut Self { self.set_handle_event(val); self diff --git a/crates/web-sys/src/features/gen_ErrorEventInit.rs b/crates/web-sys/src/features/gen_ErrorEventInit.rs index 58e61811a39a..da240ac4c118 100644 --- a/crates/web-sys/src/features/gen_ErrorEventInit.rs +++ b/crates/web-sys/src/features/gen_ErrorEventInit.rs @@ -15,57 +15,81 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &ErrorEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &ErrorEventInit, val: bool); + pub fn set_bubbles(this: &ErrorEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &ErrorEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &ErrorEventInit, val: bool); + pub fn set_cancelable(this: &ErrorEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &ErrorEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &ErrorEventInit, val: bool); + pub fn set_composed(this: &ErrorEventInit, val: bool); #[doc = "Get the `colno` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] #[wasm_bindgen(method, getter = "colno")] pub fn get_colno(this: &ErrorEventInit) -> Option; + #[doc = "Change the `colno` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] #[wasm_bindgen(method, setter = "colno")] - fn set_colno(this: &ErrorEventInit, val: u32); + pub fn set_colno(this: &ErrorEventInit, val: u32); #[doc = "Get the `error` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] #[wasm_bindgen(method, getter = "error")] pub fn get_error(this: &ErrorEventInit) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `error` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] #[wasm_bindgen(method, setter = "error")] - fn set_error(this: &ErrorEventInit, val: &::wasm_bindgen::JsValue); + pub fn set_error(this: &ErrorEventInit, val: &::wasm_bindgen::JsValue); #[doc = "Get the `filename` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] #[wasm_bindgen(method, getter = "filename")] pub fn get_filename(this: &ErrorEventInit) -> Option; + #[doc = "Change the `filename` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] #[wasm_bindgen(method, setter = "filename")] - fn set_filename(this: &ErrorEventInit, val: &str); + pub fn set_filename(this: &ErrorEventInit, val: &str); #[doc = "Get the `lineno` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] #[wasm_bindgen(method, getter = "lineno")] pub fn get_lineno(this: &ErrorEventInit) -> Option; + #[doc = "Change the `lineno` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] #[wasm_bindgen(method, setter = "lineno")] - fn set_lineno(this: &ErrorEventInit, val: u32); + pub fn set_lineno(this: &ErrorEventInit, val: u32); #[doc = "Get the `message` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] #[wasm_bindgen(method, getter = "message")] pub fn get_message(this: &ErrorEventInit) -> Option; + #[doc = "Change the `message` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] #[wasm_bindgen(method, setter = "message")] - fn set_message(this: &ErrorEventInit, val: &str); + pub fn set_message(this: &ErrorEventInit, val: &str); } impl ErrorEventInit { #[doc = "Construct a new `ErrorEventInit`."] @@ -76,58 +100,42 @@ impl ErrorEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } - #[doc = "Change the `colno` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] + #[deprecated = "Use `set_colno()` instead."] pub fn colno(&mut self, val: u32) -> &mut Self { self.set_colno(val); self } - #[doc = "Change the `error` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] + #[deprecated = "Use `set_error()` instead."] pub fn error(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_error(val); self } - #[doc = "Change the `filename` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] + #[deprecated = "Use `set_filename()` instead."] pub fn filename(&mut self, val: &str) -> &mut Self { self.set_filename(val); self } - #[doc = "Change the `lineno` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] + #[deprecated = "Use `set_lineno()` instead."] pub fn lineno(&mut self, val: u32) -> &mut Self { self.set_lineno(val); self } - #[doc = "Change the `message` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] + #[deprecated = "Use `set_message()` instead."] pub fn message(&mut self, val: &str) -> &mut Self { self.set_message(val); self diff --git a/crates/web-sys/src/features/gen_EventInit.rs b/crates/web-sys/src/features/gen_EventInit.rs index 23e6ba52ef56..218f4c21e477 100644 --- a/crates/web-sys/src/features/gen_EventInit.rs +++ b/crates/web-sys/src/features/gen_EventInit.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `EventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &EventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &EventInit, val: bool); + pub fn set_bubbles(this: &EventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &EventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &EventInit, val: bool); + pub fn set_cancelable(this: &EventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &EventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &EventInit, val: bool); + pub fn set_composed(this: &EventInit, val: bool); } impl EventInit { #[doc = "Construct a new `EventInit`."] @@ -41,23 +50,17 @@ impl EventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self diff --git a/crates/web-sys/src/features/gen_EventListener.rs b/crates/web-sys/src/features/gen_EventListener.rs index 7657d989a3ee..20b2ba07407a 100644 --- a/crates/web-sys/src/features/gen_EventListener.rs +++ b/crates/web-sys/src/features/gen_EventListener.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `EventListener`*"] #[wasm_bindgen(method, getter = "handleEvent")] pub fn get_handle_event(this: &EventListener) -> Option<::js_sys::Function>; + #[doc = "Change the `handleEvent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventListener`*"] #[wasm_bindgen(method, setter = "handleEvent")] - fn set_handle_event(this: &EventListener, val: &::js_sys::Function); + pub fn set_handle_event(this: &EventListener, val: &::js_sys::Function); } impl EventListener { #[doc = "Construct a new `EventListener`."] @@ -27,9 +30,7 @@ impl EventListener { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `handleEvent` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventListener`*"] + #[deprecated = "Use `set_handle_event()` instead."] pub fn handle_event(&mut self, val: &::js_sys::Function) -> &mut Self { self.set_handle_event(val); self diff --git a/crates/web-sys/src/features/gen_EventListenerOptions.rs b/crates/web-sys/src/features/gen_EventListenerOptions.rs index af3345eaa6cc..521069c5617d 100644 --- a/crates/web-sys/src/features/gen_EventListenerOptions.rs +++ b/crates/web-sys/src/features/gen_EventListenerOptions.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `EventListenerOptions`*"] #[wasm_bindgen(method, getter = "capture")] pub fn get_capture(this: &EventListenerOptions) -> Option; + #[doc = "Change the `capture` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventListenerOptions`*"] #[wasm_bindgen(method, setter = "capture")] - fn set_capture(this: &EventListenerOptions, val: bool); + pub fn set_capture(this: &EventListenerOptions, val: bool); } impl EventListenerOptions { #[doc = "Construct a new `EventListenerOptions`."] @@ -27,9 +30,7 @@ impl EventListenerOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `capture` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventListenerOptions`*"] + #[deprecated = "Use `set_capture()` instead."] pub fn capture(&mut self, val: bool) -> &mut Self { self.set_capture(val); self diff --git a/crates/web-sys/src/features/gen_EventModifierInit.rs b/crates/web-sys/src/features/gen_EventModifierInit.rs index 3d5452797da6..1e19e648c120 100644 --- a/crates/web-sys/src/features/gen_EventModifierInit.rs +++ b/crates/web-sys/src/features/gen_EventModifierInit.rs @@ -15,29 +15,41 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &EventModifierInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &EventModifierInit, val: bool); + pub fn set_bubbles(this: &EventModifierInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &EventModifierInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &EventModifierInit, val: bool); + pub fn set_cancelable(this: &EventModifierInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &EventModifierInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &EventModifierInit, val: bool); + pub fn set_composed(this: &EventModifierInit, val: bool); #[doc = "Get the `detail` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] #[wasm_bindgen(method, getter = "detail")] pub fn get_detail(this: &EventModifierInit) -> Option; + #[doc = "Change the `detail` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] #[wasm_bindgen(method, setter = "detail")] - fn set_detail(this: &EventModifierInit, val: i32); + pub fn set_detail(this: &EventModifierInit, val: i32); #[cfg(feature = "Window")] #[doc = "Get the `view` field of this object."] #[doc = ""] @@ -45,99 +57,141 @@ extern "C" { #[wasm_bindgen(method, getter = "view")] pub fn get_view(this: &EventModifierInit) -> Option; #[cfg(feature = "Window")] + #[doc = "Change the `view` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`, `Window`*"] #[wasm_bindgen(method, setter = "view")] - fn set_view(this: &EventModifierInit, val: Option<&Window>); + pub fn set_view(this: &EventModifierInit, val: Option<&Window>); #[doc = "Get the `altKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] #[wasm_bindgen(method, getter = "altKey")] pub fn get_alt_key(this: &EventModifierInit) -> Option; + #[doc = "Change the `altKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] #[wasm_bindgen(method, setter = "altKey")] - fn set_alt_key(this: &EventModifierInit, val: bool); + pub fn set_alt_key(this: &EventModifierInit, val: bool); #[doc = "Get the `ctrlKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] #[wasm_bindgen(method, getter = "ctrlKey")] pub fn get_ctrl_key(this: &EventModifierInit) -> Option; + #[doc = "Change the `ctrlKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] #[wasm_bindgen(method, setter = "ctrlKey")] - fn set_ctrl_key(this: &EventModifierInit, val: bool); + pub fn set_ctrl_key(this: &EventModifierInit, val: bool); #[doc = "Get the `metaKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] #[wasm_bindgen(method, getter = "metaKey")] pub fn get_meta_key(this: &EventModifierInit) -> Option; + #[doc = "Change the `metaKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] #[wasm_bindgen(method, setter = "metaKey")] - fn set_meta_key(this: &EventModifierInit, val: bool); + pub fn set_meta_key(this: &EventModifierInit, val: bool); #[doc = "Get the `modifierAltGraph` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] #[wasm_bindgen(method, getter = "modifierAltGraph")] pub fn get_modifier_alt_graph(this: &EventModifierInit) -> Option; + #[doc = "Change the `modifierAltGraph` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] #[wasm_bindgen(method, setter = "modifierAltGraph")] - fn set_modifier_alt_graph(this: &EventModifierInit, val: bool); + pub fn set_modifier_alt_graph(this: &EventModifierInit, val: bool); #[doc = "Get the `modifierCapsLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] #[wasm_bindgen(method, getter = "modifierCapsLock")] pub fn get_modifier_caps_lock(this: &EventModifierInit) -> Option; + #[doc = "Change the `modifierCapsLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] #[wasm_bindgen(method, setter = "modifierCapsLock")] - fn set_modifier_caps_lock(this: &EventModifierInit, val: bool); + pub fn set_modifier_caps_lock(this: &EventModifierInit, val: bool); #[doc = "Get the `modifierFn` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] #[wasm_bindgen(method, getter = "modifierFn")] pub fn get_modifier_fn(this: &EventModifierInit) -> Option; + #[doc = "Change the `modifierFn` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] #[wasm_bindgen(method, setter = "modifierFn")] - fn set_modifier_fn(this: &EventModifierInit, val: bool); + pub fn set_modifier_fn(this: &EventModifierInit, val: bool); #[doc = "Get the `modifierFnLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] #[wasm_bindgen(method, getter = "modifierFnLock")] pub fn get_modifier_fn_lock(this: &EventModifierInit) -> Option; + #[doc = "Change the `modifierFnLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] #[wasm_bindgen(method, setter = "modifierFnLock")] - fn set_modifier_fn_lock(this: &EventModifierInit, val: bool); + pub fn set_modifier_fn_lock(this: &EventModifierInit, val: bool); #[doc = "Get the `modifierNumLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] #[wasm_bindgen(method, getter = "modifierNumLock")] pub fn get_modifier_num_lock(this: &EventModifierInit) -> Option; + #[doc = "Change the `modifierNumLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] #[wasm_bindgen(method, setter = "modifierNumLock")] - fn set_modifier_num_lock(this: &EventModifierInit, val: bool); + pub fn set_modifier_num_lock(this: &EventModifierInit, val: bool); #[doc = "Get the `modifierOS` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] #[wasm_bindgen(method, getter = "modifierOS")] pub fn get_modifier_os(this: &EventModifierInit) -> Option; + #[doc = "Change the `modifierOS` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] #[wasm_bindgen(method, setter = "modifierOS")] - fn set_modifier_os(this: &EventModifierInit, val: bool); + pub fn set_modifier_os(this: &EventModifierInit, val: bool); #[doc = "Get the `modifierScrollLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] #[wasm_bindgen(method, getter = "modifierScrollLock")] pub fn get_modifier_scroll_lock(this: &EventModifierInit) -> Option; + #[doc = "Change the `modifierScrollLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] #[wasm_bindgen(method, setter = "modifierScrollLock")] - fn set_modifier_scroll_lock(this: &EventModifierInit, val: bool); + pub fn set_modifier_scroll_lock(this: &EventModifierInit, val: bool); #[doc = "Get the `modifierSymbol` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] #[wasm_bindgen(method, getter = "modifierSymbol")] pub fn get_modifier_symbol(this: &EventModifierInit) -> Option; + #[doc = "Change the `modifierSymbol` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] #[wasm_bindgen(method, setter = "modifierSymbol")] - fn set_modifier_symbol(this: &EventModifierInit, val: bool); + pub fn set_modifier_symbol(this: &EventModifierInit, val: bool); #[doc = "Get the `modifierSymbolLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] #[wasm_bindgen(method, getter = "modifierSymbolLock")] pub fn get_modifier_symbol_lock(this: &EventModifierInit) -> Option; + #[doc = "Change the `modifierSymbolLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] #[wasm_bindgen(method, setter = "modifierSymbolLock")] - fn set_modifier_symbol_lock(this: &EventModifierInit, val: bool); + pub fn set_modifier_symbol_lock(this: &EventModifierInit, val: bool); #[doc = "Get the `shiftKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] #[wasm_bindgen(method, getter = "shiftKey")] pub fn get_shift_key(this: &EventModifierInit) -> Option; + #[doc = "Change the `shiftKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] #[wasm_bindgen(method, setter = "shiftKey")] - fn set_shift_key(this: &EventModifierInit, val: bool); + pub fn set_shift_key(this: &EventModifierInit, val: bool); } impl EventModifierInit { #[doc = "Construct a new `EventModifierInit`."] @@ -148,129 +202,93 @@ impl EventModifierInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } - #[doc = "Change the `detail` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + #[deprecated = "Use `set_detail()` instead."] pub fn detail(&mut self, val: i32) -> &mut Self { self.set_detail(val); self } #[cfg(feature = "Window")] - #[doc = "Change the `view` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`, `Window`*"] + #[deprecated = "Use `set_view()` instead."] pub fn view(&mut self, val: Option<&Window>) -> &mut Self { self.set_view(val); self } - #[doc = "Change the `altKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + #[deprecated = "Use `set_alt_key()` instead."] pub fn alt_key(&mut self, val: bool) -> &mut Self { self.set_alt_key(val); self } - #[doc = "Change the `ctrlKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + #[deprecated = "Use `set_ctrl_key()` instead."] pub fn ctrl_key(&mut self, val: bool) -> &mut Self { self.set_ctrl_key(val); self } - #[doc = "Change the `metaKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + #[deprecated = "Use `set_meta_key()` instead."] pub fn meta_key(&mut self, val: bool) -> &mut Self { self.set_meta_key(val); self } - #[doc = "Change the `modifierAltGraph` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + #[deprecated = "Use `set_modifier_alt_graph()` instead."] pub fn modifier_alt_graph(&mut self, val: bool) -> &mut Self { self.set_modifier_alt_graph(val); self } - #[doc = "Change the `modifierCapsLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + #[deprecated = "Use `set_modifier_caps_lock()` instead."] pub fn modifier_caps_lock(&mut self, val: bool) -> &mut Self { self.set_modifier_caps_lock(val); self } - #[doc = "Change the `modifierFn` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + #[deprecated = "Use `set_modifier_fn()` instead."] pub fn modifier_fn(&mut self, val: bool) -> &mut Self { self.set_modifier_fn(val); self } - #[doc = "Change the `modifierFnLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + #[deprecated = "Use `set_modifier_fn_lock()` instead."] pub fn modifier_fn_lock(&mut self, val: bool) -> &mut Self { self.set_modifier_fn_lock(val); self } - #[doc = "Change the `modifierNumLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + #[deprecated = "Use `set_modifier_num_lock()` instead."] pub fn modifier_num_lock(&mut self, val: bool) -> &mut Self { self.set_modifier_num_lock(val); self } - #[doc = "Change the `modifierOS` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + #[deprecated = "Use `set_modifier_os()` instead."] pub fn modifier_os(&mut self, val: bool) -> &mut Self { self.set_modifier_os(val); self } - #[doc = "Change the `modifierScrollLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + #[deprecated = "Use `set_modifier_scroll_lock()` instead."] pub fn modifier_scroll_lock(&mut self, val: bool) -> &mut Self { self.set_modifier_scroll_lock(val); self } - #[doc = "Change the `modifierSymbol` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + #[deprecated = "Use `set_modifier_symbol()` instead."] pub fn modifier_symbol(&mut self, val: bool) -> &mut Self { self.set_modifier_symbol(val); self } - #[doc = "Change the `modifierSymbolLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + #[deprecated = "Use `set_modifier_symbol_lock()` instead."] pub fn modifier_symbol_lock(&mut self, val: bool) -> &mut Self { self.set_modifier_symbol_lock(val); self } - #[doc = "Change the `shiftKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + #[deprecated = "Use `set_shift_key()` instead."] pub fn shift_key(&mut self, val: bool) -> &mut Self { self.set_shift_key(val); self diff --git a/crates/web-sys/src/features/gen_EventSourceInit.rs b/crates/web-sys/src/features/gen_EventSourceInit.rs index d5f901a2e9e4..24afbe7a88b9 100644 --- a/crates/web-sys/src/features/gen_EventSourceInit.rs +++ b/crates/web-sys/src/features/gen_EventSourceInit.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `EventSourceInit`*"] #[wasm_bindgen(method, getter = "withCredentials")] pub fn get_with_credentials(this: &EventSourceInit) -> Option; + #[doc = "Change the `withCredentials` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventSourceInit`*"] #[wasm_bindgen(method, setter = "withCredentials")] - fn set_with_credentials(this: &EventSourceInit, val: bool); + pub fn set_with_credentials(this: &EventSourceInit, val: bool); } impl EventSourceInit { #[doc = "Construct a new `EventSourceInit`."] @@ -27,9 +30,7 @@ impl EventSourceInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `withCredentials` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventSourceInit`*"] + #[deprecated = "Use `set_with_credentials()` instead."] pub fn with_credentials(&mut self, val: bool) -> &mut Self { self.set_with_credentials(val); self diff --git a/crates/web-sys/src/features/gen_ExtendableEventInit.rs b/crates/web-sys/src/features/gen_ExtendableEventInit.rs index 716adc6c223f..5d701d27c82e 100644 --- a/crates/web-sys/src/features/gen_ExtendableEventInit.rs +++ b/crates/web-sys/src/features/gen_ExtendableEventInit.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ExtendableEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &ExtendableEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ExtendableEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &ExtendableEventInit, val: bool); + pub fn set_bubbles(this: &ExtendableEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ExtendableEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &ExtendableEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ExtendableEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &ExtendableEventInit, val: bool); + pub fn set_cancelable(this: &ExtendableEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ExtendableEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &ExtendableEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ExtendableEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &ExtendableEventInit, val: bool); + pub fn set_composed(this: &ExtendableEventInit, val: bool); } impl ExtendableEventInit { #[doc = "Construct a new `ExtendableEventInit`."] @@ -41,23 +50,17 @@ impl ExtendableEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ExtendableEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ExtendableEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ExtendableEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self diff --git a/crates/web-sys/src/features/gen_ExtendableMessageEventInit.rs b/crates/web-sys/src/features/gen_ExtendableMessageEventInit.rs index e0fbad89b1df..745d1f041f84 100644 --- a/crates/web-sys/src/features/gen_ExtendableMessageEventInit.rs +++ b/crates/web-sys/src/features/gen_ExtendableMessageEventInit.rs @@ -15,57 +15,81 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &ExtendableMessageEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &ExtendableMessageEventInit, val: bool); + pub fn set_bubbles(this: &ExtendableMessageEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &ExtendableMessageEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &ExtendableMessageEventInit, val: bool); + pub fn set_cancelable(this: &ExtendableMessageEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &ExtendableMessageEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &ExtendableMessageEventInit, val: bool); + pub fn set_composed(this: &ExtendableMessageEventInit, val: bool); #[doc = "Get the `data` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] #[wasm_bindgen(method, getter = "data")] pub fn get_data(this: &ExtendableMessageEventInit) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] #[wasm_bindgen(method, setter = "data")] - fn set_data(this: &ExtendableMessageEventInit, val: &::wasm_bindgen::JsValue); + pub fn set_data(this: &ExtendableMessageEventInit, val: &::wasm_bindgen::JsValue); #[doc = "Get the `lastEventId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] #[wasm_bindgen(method, getter = "lastEventId")] pub fn get_last_event_id(this: &ExtendableMessageEventInit) -> Option; + #[doc = "Change the `lastEventId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] #[wasm_bindgen(method, setter = "lastEventId")] - fn set_last_event_id(this: &ExtendableMessageEventInit, val: &str); + pub fn set_last_event_id(this: &ExtendableMessageEventInit, val: &str); #[doc = "Get the `origin` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] #[wasm_bindgen(method, getter = "origin")] pub fn get_origin(this: &ExtendableMessageEventInit) -> Option; + #[doc = "Change the `origin` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] #[wasm_bindgen(method, setter = "origin")] - fn set_origin(this: &ExtendableMessageEventInit, val: &str); + pub fn set_origin(this: &ExtendableMessageEventInit, val: &str); #[doc = "Get the `ports` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] #[wasm_bindgen(method, getter = "ports")] pub fn get_ports(this: &ExtendableMessageEventInit) -> Option<::js_sys::Array>; + #[doc = "Change the `ports` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] #[wasm_bindgen(method, setter = "ports")] - fn set_ports(this: &ExtendableMessageEventInit, val: &::wasm_bindgen::JsValue); + pub fn set_ports(this: &ExtendableMessageEventInit, val: &::wasm_bindgen::JsValue); #[doc = "Get the `source` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] #[wasm_bindgen(method, getter = "source")] pub fn get_source(this: &ExtendableMessageEventInit) -> Option<::js_sys::Object>; + #[doc = "Change the `source` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] #[wasm_bindgen(method, setter = "source")] - fn set_source(this: &ExtendableMessageEventInit, val: Option<&::js_sys::Object>); + pub fn set_source(this: &ExtendableMessageEventInit, val: Option<&::js_sys::Object>); } impl ExtendableMessageEventInit { #[doc = "Construct a new `ExtendableMessageEventInit`."] @@ -76,58 +100,42 @@ impl ExtendableMessageEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } - #[doc = "Change the `data` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] + #[deprecated = "Use `set_data()` instead."] pub fn data(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_data(val); self } - #[doc = "Change the `lastEventId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] + #[deprecated = "Use `set_last_event_id()` instead."] pub fn last_event_id(&mut self, val: &str) -> &mut Self { self.set_last_event_id(val); self } - #[doc = "Change the `origin` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] + #[deprecated = "Use `set_origin()` instead."] pub fn origin(&mut self, val: &str) -> &mut Self { self.set_origin(val); self } - #[doc = "Change the `ports` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] + #[deprecated = "Use `set_ports()` instead."] pub fn ports(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_ports(val); self } - #[doc = "Change the `source` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] + #[deprecated = "Use `set_source()` instead."] pub fn source(&mut self, val: Option<&::js_sys::Object>) -> &mut Self { self.set_source(val); self diff --git a/crates/web-sys/src/features/gen_FakePluginMimeEntry.rs b/crates/web-sys/src/features/gen_FakePluginMimeEntry.rs index 1f083875db19..f1209b12a9ea 100644 --- a/crates/web-sys/src/features/gen_FakePluginMimeEntry.rs +++ b/crates/web-sys/src/features/gen_FakePluginMimeEntry.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `FakePluginMimeEntry`*"] #[wasm_bindgen(method, getter = "description")] pub fn get_description(this: &FakePluginMimeEntry) -> Option; + #[doc = "Change the `description` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FakePluginMimeEntry`*"] #[wasm_bindgen(method, setter = "description")] - fn set_description(this: &FakePluginMimeEntry, val: &str); + pub fn set_description(this: &FakePluginMimeEntry, val: &str); #[doc = "Get the `extension` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FakePluginMimeEntry`*"] #[wasm_bindgen(method, getter = "extension")] pub fn get_extension(this: &FakePluginMimeEntry) -> Option; + #[doc = "Change the `extension` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FakePluginMimeEntry`*"] #[wasm_bindgen(method, setter = "extension")] - fn set_extension(this: &FakePluginMimeEntry, val: &str); + pub fn set_extension(this: &FakePluginMimeEntry, val: &str); #[doc = "Get the `type` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FakePluginMimeEntry`*"] #[wasm_bindgen(method, getter = "type")] pub fn get_type(this: &FakePluginMimeEntry) -> String; + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FakePluginMimeEntry`*"] #[wasm_bindgen(method, setter = "type")] - fn set_type(this: &FakePluginMimeEntry, val: &str); + pub fn set_type(this: &FakePluginMimeEntry, val: &str); } impl FakePluginMimeEntry { #[doc = "Construct a new `FakePluginMimeEntry`."] @@ -42,23 +51,17 @@ impl FakePluginMimeEntry { ret.type_(type_); ret } - #[doc = "Change the `description` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FakePluginMimeEntry`*"] + #[deprecated = "Use `set_description()` instead."] pub fn description(&mut self, val: &str) -> &mut Self { self.set_description(val); self } - #[doc = "Change the `extension` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FakePluginMimeEntry`*"] + #[deprecated = "Use `set_extension()` instead."] pub fn extension(&mut self, val: &str) -> &mut Self { self.set_extension(val); self } - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FakePluginMimeEntry`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: &str) -> &mut Self { self.set_type(val); self diff --git a/crates/web-sys/src/features/gen_FakePluginTagInit.rs b/crates/web-sys/src/features/gen_FakePluginTagInit.rs index e15b4a17b281..43ab5067c1af 100644 --- a/crates/web-sys/src/features/gen_FakePluginTagInit.rs +++ b/crates/web-sys/src/features/gen_FakePluginTagInit.rs @@ -15,64 +15,91 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] #[wasm_bindgen(method, getter = "description")] pub fn get_description(this: &FakePluginTagInit) -> Option; + #[doc = "Change the `description` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] #[wasm_bindgen(method, setter = "description")] - fn set_description(this: &FakePluginTagInit, val: &str); + pub fn set_description(this: &FakePluginTagInit, val: &str); #[doc = "Get the `fileName` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] #[wasm_bindgen(method, getter = "fileName")] pub fn get_file_name(this: &FakePluginTagInit) -> Option; + #[doc = "Change the `fileName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] #[wasm_bindgen(method, setter = "fileName")] - fn set_file_name(this: &FakePluginTagInit, val: &str); + pub fn set_file_name(this: &FakePluginTagInit, val: &str); #[doc = "Get the `fullPath` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] #[wasm_bindgen(method, getter = "fullPath")] pub fn get_full_path(this: &FakePluginTagInit) -> Option; + #[doc = "Change the `fullPath` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] #[wasm_bindgen(method, setter = "fullPath")] - fn set_full_path(this: &FakePluginTagInit, val: &str); + pub fn set_full_path(this: &FakePluginTagInit, val: &str); #[doc = "Get the `handlerURI` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] #[wasm_bindgen(method, getter = "handlerURI")] pub fn get_handler_uri(this: &FakePluginTagInit) -> String; + #[doc = "Change the `handlerURI` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] #[wasm_bindgen(method, setter = "handlerURI")] - fn set_handler_uri(this: &FakePluginTagInit, val: &str); + pub fn set_handler_uri(this: &FakePluginTagInit, val: &str); #[doc = "Get the `mimeEntries` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] #[wasm_bindgen(method, getter = "mimeEntries")] pub fn get_mime_entries(this: &FakePluginTagInit) -> ::js_sys::Array; + #[doc = "Change the `mimeEntries` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] #[wasm_bindgen(method, setter = "mimeEntries")] - fn set_mime_entries(this: &FakePluginTagInit, val: &::wasm_bindgen::JsValue); + pub fn set_mime_entries(this: &FakePluginTagInit, val: &::wasm_bindgen::JsValue); #[doc = "Get the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] #[wasm_bindgen(method, getter = "name")] pub fn get_name(this: &FakePluginTagInit) -> Option; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] #[wasm_bindgen(method, setter = "name")] - fn set_name(this: &FakePluginTagInit, val: &str); + pub fn set_name(this: &FakePluginTagInit, val: &str); #[doc = "Get the `niceName` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] #[wasm_bindgen(method, getter = "niceName")] pub fn get_nice_name(this: &FakePluginTagInit) -> Option; + #[doc = "Change the `niceName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] #[wasm_bindgen(method, setter = "niceName")] - fn set_nice_name(this: &FakePluginTagInit, val: &str); + pub fn set_nice_name(this: &FakePluginTagInit, val: &str); #[doc = "Get the `sandboxScript` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] #[wasm_bindgen(method, getter = "sandboxScript")] pub fn get_sandbox_script(this: &FakePluginTagInit) -> Option; + #[doc = "Change the `sandboxScript` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] #[wasm_bindgen(method, setter = "sandboxScript")] - fn set_sandbox_script(this: &FakePluginTagInit, val: &str); + pub fn set_sandbox_script(this: &FakePluginTagInit, val: &str); #[doc = "Get the `version` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] #[wasm_bindgen(method, getter = "version")] pub fn get_version(this: &FakePluginTagInit) -> Option; + #[doc = "Change the `version` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] #[wasm_bindgen(method, setter = "version")] - fn set_version(this: &FakePluginTagInit, val: &str); + pub fn set_version(this: &FakePluginTagInit, val: &str); } impl FakePluginTagInit { #[doc = "Construct a new `FakePluginTagInit`."] @@ -85,65 +112,47 @@ impl FakePluginTagInit { ret.mime_entries(mime_entries); ret } - #[doc = "Change the `description` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] + #[deprecated = "Use `set_description()` instead."] pub fn description(&mut self, val: &str) -> &mut Self { self.set_description(val); self } - #[doc = "Change the `fileName` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] + #[deprecated = "Use `set_file_name()` instead."] pub fn file_name(&mut self, val: &str) -> &mut Self { self.set_file_name(val); self } - #[doc = "Change the `fullPath` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] + #[deprecated = "Use `set_full_path()` instead."] pub fn full_path(&mut self, val: &str) -> &mut Self { self.set_full_path(val); self } - #[doc = "Change the `handlerURI` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] + #[deprecated = "Use `set_handler_uri()` instead."] pub fn handler_uri(&mut self, val: &str) -> &mut Self { self.set_handler_uri(val); self } - #[doc = "Change the `mimeEntries` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] + #[deprecated = "Use `set_mime_entries()` instead."] pub fn mime_entries(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_mime_entries(val); self } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { self.set_name(val); self } - #[doc = "Change the `niceName` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] + #[deprecated = "Use `set_nice_name()` instead."] pub fn nice_name(&mut self, val: &str) -> &mut Self { self.set_nice_name(val); self } - #[doc = "Change the `sandboxScript` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] + #[deprecated = "Use `set_sandbox_script()` instead."] pub fn sandbox_script(&mut self, val: &str) -> &mut Self { self.set_sandbox_script(val); self } - #[doc = "Change the `version` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] + #[deprecated = "Use `set_version()` instead."] pub fn version(&mut self, val: &str) -> &mut Self { self.set_version(val); self diff --git a/crates/web-sys/src/features/gen_FetchEventInit.rs b/crates/web-sys/src/features/gen_FetchEventInit.rs index db2fd05b0448..0041cb594508 100644 --- a/crates/web-sys/src/features/gen_FetchEventInit.rs +++ b/crates/web-sys/src/features/gen_FetchEventInit.rs @@ -15,36 +15,51 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &FetchEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &FetchEventInit, val: bool); + pub fn set_bubbles(this: &FetchEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &FetchEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &FetchEventInit, val: bool); + pub fn set_cancelable(this: &FetchEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &FetchEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &FetchEventInit, val: bool); + pub fn set_composed(this: &FetchEventInit, val: bool); #[doc = "Get the `clientId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"] #[wasm_bindgen(method, getter = "clientId")] pub fn get_client_id(this: &FetchEventInit) -> Option; + #[doc = "Change the `clientId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"] #[wasm_bindgen(method, setter = "clientId")] - fn set_client_id(this: &FetchEventInit, val: Option<&str>); + pub fn set_client_id(this: &FetchEventInit, val: Option<&str>); #[doc = "Get the `isReload` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"] #[wasm_bindgen(method, getter = "isReload")] pub fn get_is_reload(this: &FetchEventInit) -> Option; + #[doc = "Change the `isReload` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"] #[wasm_bindgen(method, setter = "isReload")] - fn set_is_reload(this: &FetchEventInit, val: bool); + pub fn set_is_reload(this: &FetchEventInit, val: bool); #[cfg(feature = "Request")] #[doc = "Get the `request` field of this object."] #[doc = ""] @@ -52,8 +67,11 @@ extern "C" { #[wasm_bindgen(method, getter = "request")] pub fn get_request(this: &FetchEventInit) -> Request; #[cfg(feature = "Request")] + #[doc = "Change the `request` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`, `Request`*"] #[wasm_bindgen(method, setter = "request")] - fn set_request(this: &FetchEventInit, val: &Request); + pub fn set_request(this: &FetchEventInit, val: &Request); } impl FetchEventInit { #[cfg(feature = "Request")] @@ -66,45 +84,33 @@ impl FetchEventInit { ret.request(request); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } - #[doc = "Change the `clientId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"] + #[deprecated = "Use `set_client_id()` instead."] pub fn client_id(&mut self, val: Option<&str>) -> &mut Self { self.set_client_id(val); self } - #[doc = "Change the `isReload` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"] + #[deprecated = "Use `set_is_reload()` instead."] pub fn is_reload(&mut self, val: bool) -> &mut Self { self.set_is_reload(val); self } #[cfg(feature = "Request")] - #[doc = "Change the `request` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`, `Request`*"] + #[deprecated = "Use `set_request()` instead."] pub fn request(&mut self, val: &Request) -> &mut Self { self.set_request(val); self diff --git a/crates/web-sys/src/features/gen_FetchReadableStreamReadDataDone.rs b/crates/web-sys/src/features/gen_FetchReadableStreamReadDataDone.rs index 9a883e8ca5ce..04e2c6e4040c 100644 --- a/crates/web-sys/src/features/gen_FetchReadableStreamReadDataDone.rs +++ b/crates/web-sys/src/features/gen_FetchReadableStreamReadDataDone.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `FetchReadableStreamReadDataDone`*"] #[wasm_bindgen(method, getter = "done")] pub fn get_done(this: &FetchReadableStreamReadDataDone) -> Option; + #[doc = "Change the `done` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FetchReadableStreamReadDataDone`*"] #[wasm_bindgen(method, setter = "done")] - fn set_done(this: &FetchReadableStreamReadDataDone, val: bool); + pub fn set_done(this: &FetchReadableStreamReadDataDone, val: bool); } impl FetchReadableStreamReadDataDone { #[doc = "Construct a new `FetchReadableStreamReadDataDone`."] @@ -27,9 +30,7 @@ impl FetchReadableStreamReadDataDone { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `done` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FetchReadableStreamReadDataDone`*"] + #[deprecated = "Use `set_done()` instead."] pub fn done(&mut self, val: bool) -> &mut Self { self.set_done(val); self diff --git a/crates/web-sys/src/features/gen_FileCallback.rs b/crates/web-sys/src/features/gen_FileCallback.rs index 148663b69a5a..3aa94c60949c 100644 --- a/crates/web-sys/src/features/gen_FileCallback.rs +++ b/crates/web-sys/src/features/gen_FileCallback.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `FileCallback`*"] #[wasm_bindgen(method, getter = "handleEvent")] pub fn get_handle_event(this: &FileCallback) -> Option<::js_sys::Function>; + #[doc = "Change the `handleEvent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FileCallback`*"] #[wasm_bindgen(method, setter = "handleEvent")] - fn set_handle_event(this: &FileCallback, val: &::js_sys::Function); + pub fn set_handle_event(this: &FileCallback, val: &::js_sys::Function); } impl FileCallback { #[doc = "Construct a new `FileCallback`."] @@ -27,9 +30,7 @@ impl FileCallback { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `handleEvent` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FileCallback`*"] + #[deprecated = "Use `set_handle_event()` instead."] pub fn handle_event(&mut self, val: &::js_sys::Function) -> &mut Self { self.set_handle_event(val); self diff --git a/crates/web-sys/src/features/gen_FilePickerAcceptType.rs b/crates/web-sys/src/features/gen_FilePickerAcceptType.rs index 6c2365f6711e..f969507a01c0 100644 --- a/crates/web-sys/src/features/gen_FilePickerAcceptType.rs +++ b/crates/web-sys/src/features/gen_FilePickerAcceptType.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "description")] pub fn get_description(this: &FilePickerAcceptType) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `description` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FilePickerAcceptType`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "description")] - fn set_description(this: &FilePickerAcceptType, val: &str); + pub fn set_description(this: &FilePickerAcceptType, val: &str); } #[cfg(web_sys_unstable_apis)] impl FilePickerAcceptType { @@ -40,12 +47,7 @@ impl FilePickerAcceptType { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `description` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FilePickerAcceptType`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_description()` instead."] pub fn description(&mut self, val: &str) -> &mut Self { self.set_description(val); self diff --git a/crates/web-sys/src/features/gen_FilePickerOptions.rs b/crates/web-sys/src/features/gen_FilePickerOptions.rs index 7d28ab2b06b4..deb857f4ce4b 100644 --- a/crates/web-sys/src/features/gen_FilePickerOptions.rs +++ b/crates/web-sys/src/features/gen_FilePickerOptions.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "excludeAcceptAllOption")] pub fn get_exclude_accept_all_option(this: &FilePickerOptions) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `excludeAcceptAllOption` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FilePickerOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "excludeAcceptAllOption")] - fn set_exclude_accept_all_option(this: &FilePickerOptions, val: bool); + pub fn set_exclude_accept_all_option(this: &FilePickerOptions, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `id` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "id")] pub fn get_id(this: &FilePickerOptions) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FilePickerOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "id")] - fn set_id(this: &FilePickerOptions, val: &str); + pub fn set_id(this: &FilePickerOptions, val: &str); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `startIn` field of this object."] #[doc = ""] @@ -45,8 +59,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "startIn")] pub fn get_start_in(this: &FilePickerOptions) -> ::wasm_bindgen::JsValue; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `startIn` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FilePickerOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "startIn")] - fn set_start_in(this: &FilePickerOptions, val: &::wasm_bindgen::JsValue); + pub fn set_start_in(this: &FilePickerOptions, val: &::wasm_bindgen::JsValue); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `types` field of this object."] #[doc = ""] @@ -56,8 +77,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "types")] pub fn get_types(this: &FilePickerOptions) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `types` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FilePickerOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "types")] - fn set_types(this: &FilePickerOptions, val: &::wasm_bindgen::JsValue); + pub fn set_types(this: &FilePickerOptions, val: &::wasm_bindgen::JsValue); } #[cfg(web_sys_unstable_apis)] impl FilePickerOptions { @@ -73,45 +101,25 @@ impl FilePickerOptions { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `excludeAcceptAllOption` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FilePickerOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_exclude_accept_all_option()` instead."] pub fn exclude_accept_all_option(&mut self, val: bool) -> &mut Self { self.set_exclude_accept_all_option(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `id` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FilePickerOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_id()` instead."] pub fn id(&mut self, val: &str) -> &mut Self { self.set_id(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `startIn` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FilePickerOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_start_in()` instead."] pub fn start_in(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_start_in(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `types` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FilePickerOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_types()` instead."] pub fn types(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_types(val); self diff --git a/crates/web-sys/src/features/gen_FilePropertyBag.rs b/crates/web-sys/src/features/gen_FilePropertyBag.rs index 482a14021393..0b5c3ad87512 100644 --- a/crates/web-sys/src/features/gen_FilePropertyBag.rs +++ b/crates/web-sys/src/features/gen_FilePropertyBag.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `FilePropertyBag`*"] #[wasm_bindgen(method, getter = "lastModified")] pub fn get_last_modified(this: &FilePropertyBag) -> Option; + #[doc = "Change the `lastModified` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FilePropertyBag`*"] #[wasm_bindgen(method, setter = "lastModified")] - fn set_last_modified(this: &FilePropertyBag, val: f64); + pub fn set_last_modified(this: &FilePropertyBag, val: f64); #[doc = "Get the `type` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FilePropertyBag`*"] #[wasm_bindgen(method, getter = "type")] pub fn get_type(this: &FilePropertyBag) -> Option; + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FilePropertyBag`*"] #[wasm_bindgen(method, setter = "type")] - fn set_type(this: &FilePropertyBag, val: &str); + pub fn set_type(this: &FilePropertyBag, val: &str); } impl FilePropertyBag { #[doc = "Construct a new `FilePropertyBag`."] @@ -34,16 +40,12 @@ impl FilePropertyBag { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `lastModified` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FilePropertyBag`*"] + #[deprecated = "Use `set_last_modified()` instead."] pub fn last_modified(&mut self, val: f64) -> &mut Self { self.set_last_modified(val); self } - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FilePropertyBag`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: &str) -> &mut Self { self.set_type(val); self diff --git a/crates/web-sys/src/features/gen_FileSystemCreateWritableOptions.rs b/crates/web-sys/src/features/gen_FileSystemCreateWritableOptions.rs index 479e31093eff..3d03f2adf658 100644 --- a/crates/web-sys/src/features/gen_FileSystemCreateWritableOptions.rs +++ b/crates/web-sys/src/features/gen_FileSystemCreateWritableOptions.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `FileSystemCreateWritableOptions`*"] #[wasm_bindgen(method, getter = "keepExistingData")] pub fn get_keep_existing_data(this: &FileSystemCreateWritableOptions) -> Option; + #[doc = "Change the `keepExistingData` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FileSystemCreateWritableOptions`*"] #[wasm_bindgen(method, setter = "keepExistingData")] - fn set_keep_existing_data(this: &FileSystemCreateWritableOptions, val: bool); + pub fn set_keep_existing_data(this: &FileSystemCreateWritableOptions, val: bool); } impl FileSystemCreateWritableOptions { #[doc = "Construct a new `FileSystemCreateWritableOptions`."] @@ -27,9 +30,7 @@ impl FileSystemCreateWritableOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `keepExistingData` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FileSystemCreateWritableOptions`*"] + #[deprecated = "Use `set_keep_existing_data()` instead."] pub fn keep_existing_data(&mut self, val: bool) -> &mut Self { self.set_keep_existing_data(val); self diff --git a/crates/web-sys/src/features/gen_FileSystemEntriesCallback.rs b/crates/web-sys/src/features/gen_FileSystemEntriesCallback.rs index 3cabacc616a9..581452a8fdac 100644 --- a/crates/web-sys/src/features/gen_FileSystemEntriesCallback.rs +++ b/crates/web-sys/src/features/gen_FileSystemEntriesCallback.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `FileSystemEntriesCallback`*"] #[wasm_bindgen(method, getter = "handleEvent")] pub fn get_handle_event(this: &FileSystemEntriesCallback) -> Option<::js_sys::Function>; + #[doc = "Change the `handleEvent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FileSystemEntriesCallback`*"] #[wasm_bindgen(method, setter = "handleEvent")] - fn set_handle_event(this: &FileSystemEntriesCallback, val: &::js_sys::Function); + pub fn set_handle_event(this: &FileSystemEntriesCallback, val: &::js_sys::Function); } impl FileSystemEntriesCallback { #[doc = "Construct a new `FileSystemEntriesCallback`."] @@ -27,9 +30,7 @@ impl FileSystemEntriesCallback { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `handleEvent` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FileSystemEntriesCallback`*"] + #[deprecated = "Use `set_handle_event()` instead."] pub fn handle_event(&mut self, val: &::js_sys::Function) -> &mut Self { self.set_handle_event(val); self diff --git a/crates/web-sys/src/features/gen_FileSystemEntryCallback.rs b/crates/web-sys/src/features/gen_FileSystemEntryCallback.rs index eeb72898a665..ef3d86cf1b69 100644 --- a/crates/web-sys/src/features/gen_FileSystemEntryCallback.rs +++ b/crates/web-sys/src/features/gen_FileSystemEntryCallback.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `FileSystemEntryCallback`*"] #[wasm_bindgen(method, getter = "handleEvent")] pub fn get_handle_event(this: &FileSystemEntryCallback) -> Option<::js_sys::Function>; + #[doc = "Change the `handleEvent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FileSystemEntryCallback`*"] #[wasm_bindgen(method, setter = "handleEvent")] - fn set_handle_event(this: &FileSystemEntryCallback, val: &::js_sys::Function); + pub fn set_handle_event(this: &FileSystemEntryCallback, val: &::js_sys::Function); } impl FileSystemEntryCallback { #[doc = "Construct a new `FileSystemEntryCallback`."] @@ -27,9 +30,7 @@ impl FileSystemEntryCallback { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `handleEvent` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FileSystemEntryCallback`*"] + #[deprecated = "Use `set_handle_event()` instead."] pub fn handle_event(&mut self, val: &::js_sys::Function) -> &mut Self { self.set_handle_event(val); self diff --git a/crates/web-sys/src/features/gen_FileSystemFlags.rs b/crates/web-sys/src/features/gen_FileSystemFlags.rs index 66a4a01396a9..62be51dd8639 100644 --- a/crates/web-sys/src/features/gen_FileSystemFlags.rs +++ b/crates/web-sys/src/features/gen_FileSystemFlags.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `FileSystemFlags`*"] #[wasm_bindgen(method, getter = "create")] pub fn get_create(this: &FileSystemFlags) -> Option; + #[doc = "Change the `create` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FileSystemFlags`*"] #[wasm_bindgen(method, setter = "create")] - fn set_create(this: &FileSystemFlags, val: bool); + pub fn set_create(this: &FileSystemFlags, val: bool); #[doc = "Get the `exclusive` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemFlags`*"] #[wasm_bindgen(method, getter = "exclusive")] pub fn get_exclusive(this: &FileSystemFlags) -> Option; + #[doc = "Change the `exclusive` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FileSystemFlags`*"] #[wasm_bindgen(method, setter = "exclusive")] - fn set_exclusive(this: &FileSystemFlags, val: bool); + pub fn set_exclusive(this: &FileSystemFlags, val: bool); } impl FileSystemFlags { #[doc = "Construct a new `FileSystemFlags`."] @@ -34,16 +40,12 @@ impl FileSystemFlags { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `create` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FileSystemFlags`*"] + #[deprecated = "Use `set_create()` instead."] pub fn create(&mut self, val: bool) -> &mut Self { self.set_create(val); self } - #[doc = "Change the `exclusive` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FileSystemFlags`*"] + #[deprecated = "Use `set_exclusive()` instead."] pub fn exclusive(&mut self, val: bool) -> &mut Self { self.set_exclusive(val); self diff --git a/crates/web-sys/src/features/gen_FileSystemGetDirectoryOptions.rs b/crates/web-sys/src/features/gen_FileSystemGetDirectoryOptions.rs index 9c19fb8313de..1d5c1d52131d 100644 --- a/crates/web-sys/src/features/gen_FileSystemGetDirectoryOptions.rs +++ b/crates/web-sys/src/features/gen_FileSystemGetDirectoryOptions.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `FileSystemGetDirectoryOptions`*"] #[wasm_bindgen(method, getter = "create")] pub fn get_create(this: &FileSystemGetDirectoryOptions) -> Option; + #[doc = "Change the `create` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FileSystemGetDirectoryOptions`*"] #[wasm_bindgen(method, setter = "create")] - fn set_create(this: &FileSystemGetDirectoryOptions, val: bool); + pub fn set_create(this: &FileSystemGetDirectoryOptions, val: bool); } impl FileSystemGetDirectoryOptions { #[doc = "Construct a new `FileSystemGetDirectoryOptions`."] @@ -27,9 +30,7 @@ impl FileSystemGetDirectoryOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `create` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FileSystemGetDirectoryOptions`*"] + #[deprecated = "Use `set_create()` instead."] pub fn create(&mut self, val: bool) -> &mut Self { self.set_create(val); self diff --git a/crates/web-sys/src/features/gen_FileSystemGetFileOptions.rs b/crates/web-sys/src/features/gen_FileSystemGetFileOptions.rs index 4c0b928a142f..2aebf3b23ea7 100644 --- a/crates/web-sys/src/features/gen_FileSystemGetFileOptions.rs +++ b/crates/web-sys/src/features/gen_FileSystemGetFileOptions.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `FileSystemGetFileOptions`*"] #[wasm_bindgen(method, getter = "create")] pub fn get_create(this: &FileSystemGetFileOptions) -> Option; + #[doc = "Change the `create` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FileSystemGetFileOptions`*"] #[wasm_bindgen(method, setter = "create")] - fn set_create(this: &FileSystemGetFileOptions, val: bool); + pub fn set_create(this: &FileSystemGetFileOptions, val: bool); } impl FileSystemGetFileOptions { #[doc = "Construct a new `FileSystemGetFileOptions`."] @@ -27,9 +30,7 @@ impl FileSystemGetFileOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `create` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FileSystemGetFileOptions`*"] + #[deprecated = "Use `set_create()` instead."] pub fn create(&mut self, val: bool) -> &mut Self { self.set_create(val); self diff --git a/crates/web-sys/src/features/gen_FileSystemHandlePermissionDescriptor.rs b/crates/web-sys/src/features/gen_FileSystemHandlePermissionDescriptor.rs index 7b8cc61c1ec6..8f8aaa1c0ede 100644 --- a/crates/web-sys/src/features/gen_FileSystemHandlePermissionDescriptor.rs +++ b/crates/web-sys/src/features/gen_FileSystemHandlePermissionDescriptor.rs @@ -26,9 +26,16 @@ extern "C" { pub fn get_mode( this: &FileSystemHandlePermissionDescriptor, ) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "FileSystemPermissionMode")] + #[doc = "Change the `mode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FileSystemHandlePermissionDescriptor`, `FileSystemPermissionMode`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "mode")] - fn set_mode(this: &FileSystemHandlePermissionDescriptor, val: FileSystemPermissionMode); + pub fn set_mode(this: &FileSystemHandlePermissionDescriptor, val: FileSystemPermissionMode); } #[cfg(web_sys_unstable_apis)] impl FileSystemHandlePermissionDescriptor { @@ -45,12 +52,7 @@ impl FileSystemHandlePermissionDescriptor { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "FileSystemPermissionMode")] - #[doc = "Change the `mode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FileSystemHandlePermissionDescriptor`, `FileSystemPermissionMode`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_mode()` instead."] pub fn mode(&mut self, val: FileSystemPermissionMode) -> &mut Self { self.set_mode(val); self diff --git a/crates/web-sys/src/features/gen_FileSystemPermissionDescriptor.rs b/crates/web-sys/src/features/gen_FileSystemPermissionDescriptor.rs index d396269c144e..4a8c7df1f12f 100644 --- a/crates/web-sys/src/features/gen_FileSystemPermissionDescriptor.rs +++ b/crates/web-sys/src/features/gen_FileSystemPermissionDescriptor.rs @@ -24,9 +24,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "name")] pub fn get_name(this: &FileSystemPermissionDescriptor) -> PermissionName; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "PermissionName")] + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FileSystemPermissionDescriptor`, `PermissionName`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "name")] - fn set_name(this: &FileSystemPermissionDescriptor, val: PermissionName); + pub fn set_name(this: &FileSystemPermissionDescriptor, val: PermissionName); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "FileSystemHandle")] #[doc = "Get the `handle` field of this object."] @@ -37,9 +44,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "handle")] pub fn get_handle(this: &FileSystemPermissionDescriptor) -> FileSystemHandle; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "FileSystemHandle")] + #[doc = "Change the `handle` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FileSystemHandle`, `FileSystemPermissionDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "handle")] - fn set_handle(this: &FileSystemPermissionDescriptor, val: &FileSystemHandle); + pub fn set_handle(this: &FileSystemPermissionDescriptor, val: &FileSystemHandle); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "FileSystemPermissionMode")] #[doc = "Get the `mode` field of this object."] @@ -50,9 +64,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "mode")] pub fn get_mode(this: &FileSystemPermissionDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "FileSystemPermissionMode")] + #[doc = "Change the `mode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FileSystemPermissionDescriptor`, `FileSystemPermissionMode`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "mode")] - fn set_mode(this: &FileSystemPermissionDescriptor, val: FileSystemPermissionMode); + pub fn set_mode(this: &FileSystemPermissionDescriptor, val: FileSystemPermissionMode); } #[cfg(web_sys_unstable_apis)] impl FileSystemPermissionDescriptor { @@ -72,36 +93,21 @@ impl FileSystemPermissionDescriptor { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "PermissionName")] - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FileSystemPermissionDescriptor`, `PermissionName`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: PermissionName) -> &mut Self { self.set_name(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "FileSystemHandle")] - #[doc = "Change the `handle` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FileSystemHandle`, `FileSystemPermissionDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_handle()` instead."] pub fn handle(&mut self, val: &FileSystemHandle) -> &mut Self { self.set_handle(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "FileSystemPermissionMode")] - #[doc = "Change the `mode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FileSystemPermissionDescriptor`, `FileSystemPermissionMode`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_mode()` instead."] pub fn mode(&mut self, val: FileSystemPermissionMode) -> &mut Self { self.set_mode(val); self diff --git a/crates/web-sys/src/features/gen_FileSystemReadWriteOptions.rs b/crates/web-sys/src/features/gen_FileSystemReadWriteOptions.rs index 41f7ff679f29..2cdd030a0eec 100644 --- a/crates/web-sys/src/features/gen_FileSystemReadWriteOptions.rs +++ b/crates/web-sys/src/features/gen_FileSystemReadWriteOptions.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `FileSystemReadWriteOptions`*"] #[wasm_bindgen(method, getter = "at")] pub fn get_at(this: &FileSystemReadWriteOptions) -> Option; + #[doc = "Change the `at` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FileSystemReadWriteOptions`*"] #[wasm_bindgen(method, setter = "at")] - fn set_at(this: &FileSystemReadWriteOptions, val: f64); + pub fn set_at(this: &FileSystemReadWriteOptions, val: f64); } impl FileSystemReadWriteOptions { #[doc = "Construct a new `FileSystemReadWriteOptions`."] @@ -27,9 +30,7 @@ impl FileSystemReadWriteOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `at` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FileSystemReadWriteOptions`*"] + #[deprecated = "Use `set_at()` instead."] pub fn at(&mut self, val: f64) -> &mut Self { self.set_at(val); self diff --git a/crates/web-sys/src/features/gen_FileSystemRemoveOptions.rs b/crates/web-sys/src/features/gen_FileSystemRemoveOptions.rs index 803cd998b154..e1ec6700ef1f 100644 --- a/crates/web-sys/src/features/gen_FileSystemRemoveOptions.rs +++ b/crates/web-sys/src/features/gen_FileSystemRemoveOptions.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `FileSystemRemoveOptions`*"] #[wasm_bindgen(method, getter = "recursive")] pub fn get_recursive(this: &FileSystemRemoveOptions) -> Option; + #[doc = "Change the `recursive` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FileSystemRemoveOptions`*"] #[wasm_bindgen(method, setter = "recursive")] - fn set_recursive(this: &FileSystemRemoveOptions, val: bool); + pub fn set_recursive(this: &FileSystemRemoveOptions, val: bool); } impl FileSystemRemoveOptions { #[doc = "Construct a new `FileSystemRemoveOptions`."] @@ -27,9 +30,7 @@ impl FileSystemRemoveOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `recursive` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FileSystemRemoveOptions`*"] + #[deprecated = "Use `set_recursive()` instead."] pub fn recursive(&mut self, val: bool) -> &mut Self { self.set_recursive(val); self diff --git a/crates/web-sys/src/features/gen_FocusEventInit.rs b/crates/web-sys/src/features/gen_FocusEventInit.rs index 4076e70a5a07..a7a84b2eb99a 100644 --- a/crates/web-sys/src/features/gen_FocusEventInit.rs +++ b/crates/web-sys/src/features/gen_FocusEventInit.rs @@ -15,29 +15,41 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `FocusEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &FocusEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FocusEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &FocusEventInit, val: bool); + pub fn set_bubbles(this: &FocusEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FocusEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &FocusEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FocusEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &FocusEventInit, val: bool); + pub fn set_cancelable(this: &FocusEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FocusEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &FocusEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FocusEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &FocusEventInit, val: bool); + pub fn set_composed(this: &FocusEventInit, val: bool); #[doc = "Get the `detail` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FocusEventInit`*"] #[wasm_bindgen(method, getter = "detail")] pub fn get_detail(this: &FocusEventInit) -> Option; + #[doc = "Change the `detail` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FocusEventInit`*"] #[wasm_bindgen(method, setter = "detail")] - fn set_detail(this: &FocusEventInit, val: i32); + pub fn set_detail(this: &FocusEventInit, val: i32); #[cfg(feature = "Window")] #[doc = "Get the `view` field of this object."] #[doc = ""] @@ -45,8 +57,11 @@ extern "C" { #[wasm_bindgen(method, getter = "view")] pub fn get_view(this: &FocusEventInit) -> Option; #[cfg(feature = "Window")] + #[doc = "Change the `view` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FocusEventInit`, `Window`*"] #[wasm_bindgen(method, setter = "view")] - fn set_view(this: &FocusEventInit, val: Option<&Window>); + pub fn set_view(this: &FocusEventInit, val: Option<&Window>); #[cfg(feature = "EventTarget")] #[doc = "Get the `relatedTarget` field of this object."] #[doc = ""] @@ -54,8 +69,11 @@ extern "C" { #[wasm_bindgen(method, getter = "relatedTarget")] pub fn get_related_target(this: &FocusEventInit) -> Option; #[cfg(feature = "EventTarget")] + #[doc = "Change the `relatedTarget` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventTarget`, `FocusEventInit`*"] #[wasm_bindgen(method, setter = "relatedTarget")] - fn set_related_target(this: &FocusEventInit, val: Option<&EventTarget>); + pub fn set_related_target(this: &FocusEventInit, val: Option<&EventTarget>); } impl FocusEventInit { #[doc = "Construct a new `FocusEventInit`."] @@ -66,46 +84,34 @@ impl FocusEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FocusEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FocusEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FocusEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } - #[doc = "Change the `detail` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FocusEventInit`*"] + #[deprecated = "Use `set_detail()` instead."] pub fn detail(&mut self, val: i32) -> &mut Self { self.set_detail(val); self } #[cfg(feature = "Window")] - #[doc = "Change the `view` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FocusEventInit`, `Window`*"] + #[deprecated = "Use `set_view()` instead."] pub fn view(&mut self, val: Option<&Window>) -> &mut Self { self.set_view(val); self } #[cfg(feature = "EventTarget")] - #[doc = "Change the `relatedTarget` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventTarget`, `FocusEventInit`*"] + #[deprecated = "Use `set_related_target()` instead."] pub fn related_target(&mut self, val: Option<&EventTarget>) -> &mut Self { self.set_related_target(val); self diff --git a/crates/web-sys/src/features/gen_FontFaceDescriptors.rs b/crates/web-sys/src/features/gen_FontFaceDescriptors.rs index 6bfbf2262acb..3598c4f11dd9 100644 --- a/crates/web-sys/src/features/gen_FontFaceDescriptors.rs +++ b/crates/web-sys/src/features/gen_FontFaceDescriptors.rs @@ -15,57 +15,81 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] #[wasm_bindgen(method, getter = "display")] pub fn get_display(this: &FontFaceDescriptors) -> Option; + #[doc = "Change the `display` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] #[wasm_bindgen(method, setter = "display")] - fn set_display(this: &FontFaceDescriptors, val: &str); + pub fn set_display(this: &FontFaceDescriptors, val: &str); #[doc = "Get the `featureSettings` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] #[wasm_bindgen(method, getter = "featureSettings")] pub fn get_feature_settings(this: &FontFaceDescriptors) -> Option; + #[doc = "Change the `featureSettings` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] #[wasm_bindgen(method, setter = "featureSettings")] - fn set_feature_settings(this: &FontFaceDescriptors, val: &str); + pub fn set_feature_settings(this: &FontFaceDescriptors, val: &str); #[doc = "Get the `stretch` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] #[wasm_bindgen(method, getter = "stretch")] pub fn get_stretch(this: &FontFaceDescriptors) -> Option; + #[doc = "Change the `stretch` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] #[wasm_bindgen(method, setter = "stretch")] - fn set_stretch(this: &FontFaceDescriptors, val: &str); + pub fn set_stretch(this: &FontFaceDescriptors, val: &str); #[doc = "Get the `style` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] #[wasm_bindgen(method, getter = "style")] pub fn get_style(this: &FontFaceDescriptors) -> Option; + #[doc = "Change the `style` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] #[wasm_bindgen(method, setter = "style")] - fn set_style(this: &FontFaceDescriptors, val: &str); + pub fn set_style(this: &FontFaceDescriptors, val: &str); #[doc = "Get the `unicodeRange` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] #[wasm_bindgen(method, getter = "unicodeRange")] pub fn get_unicode_range(this: &FontFaceDescriptors) -> Option; + #[doc = "Change the `unicodeRange` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] #[wasm_bindgen(method, setter = "unicodeRange")] - fn set_unicode_range(this: &FontFaceDescriptors, val: &str); + pub fn set_unicode_range(this: &FontFaceDescriptors, val: &str); #[doc = "Get the `variant` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] #[wasm_bindgen(method, getter = "variant")] pub fn get_variant(this: &FontFaceDescriptors) -> Option; + #[doc = "Change the `variant` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] #[wasm_bindgen(method, setter = "variant")] - fn set_variant(this: &FontFaceDescriptors, val: &str); + pub fn set_variant(this: &FontFaceDescriptors, val: &str); #[doc = "Get the `variationSettings` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] #[wasm_bindgen(method, getter = "variationSettings")] pub fn get_variation_settings(this: &FontFaceDescriptors) -> Option; + #[doc = "Change the `variationSettings` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] #[wasm_bindgen(method, setter = "variationSettings")] - fn set_variation_settings(this: &FontFaceDescriptors, val: &str); + pub fn set_variation_settings(this: &FontFaceDescriptors, val: &str); #[doc = "Get the `weight` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] #[wasm_bindgen(method, getter = "weight")] pub fn get_weight(this: &FontFaceDescriptors) -> Option; + #[doc = "Change the `weight` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] #[wasm_bindgen(method, setter = "weight")] - fn set_weight(this: &FontFaceDescriptors, val: &str); + pub fn set_weight(this: &FontFaceDescriptors, val: &str); } impl FontFaceDescriptors { #[doc = "Construct a new `FontFaceDescriptors`."] @@ -76,58 +100,42 @@ impl FontFaceDescriptors { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `display` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] + #[deprecated = "Use `set_display()` instead."] pub fn display(&mut self, val: &str) -> &mut Self { self.set_display(val); self } - #[doc = "Change the `featureSettings` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] + #[deprecated = "Use `set_feature_settings()` instead."] pub fn feature_settings(&mut self, val: &str) -> &mut Self { self.set_feature_settings(val); self } - #[doc = "Change the `stretch` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] + #[deprecated = "Use `set_stretch()` instead."] pub fn stretch(&mut self, val: &str) -> &mut Self { self.set_stretch(val); self } - #[doc = "Change the `style` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] + #[deprecated = "Use `set_style()` instead."] pub fn style(&mut self, val: &str) -> &mut Self { self.set_style(val); self } - #[doc = "Change the `unicodeRange` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] + #[deprecated = "Use `set_unicode_range()` instead."] pub fn unicode_range(&mut self, val: &str) -> &mut Self { self.set_unicode_range(val); self } - #[doc = "Change the `variant` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] + #[deprecated = "Use `set_variant()` instead."] pub fn variant(&mut self, val: &str) -> &mut Self { self.set_variant(val); self } - #[doc = "Change the `variationSettings` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] + #[deprecated = "Use `set_variation_settings()` instead."] pub fn variation_settings(&mut self, val: &str) -> &mut Self { self.set_variation_settings(val); self } - #[doc = "Change the `weight` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] + #[deprecated = "Use `set_weight()` instead."] pub fn weight(&mut self, val: &str) -> &mut Self { self.set_weight(val); self diff --git a/crates/web-sys/src/features/gen_FontFaceSetIteratorResult.rs b/crates/web-sys/src/features/gen_FontFaceSetIteratorResult.rs index 4184b0d6a8a8..469670809fb4 100644 --- a/crates/web-sys/src/features/gen_FontFaceSetIteratorResult.rs +++ b/crates/web-sys/src/features/gen_FontFaceSetIteratorResult.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `FontFaceSetIteratorResult`*"] #[wasm_bindgen(method, getter = "done")] pub fn get_done(this: &FontFaceSetIteratorResult) -> bool; + #[doc = "Change the `done` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FontFaceSetIteratorResult`*"] #[wasm_bindgen(method, setter = "done")] - fn set_done(this: &FontFaceSetIteratorResult, val: bool); + pub fn set_done(this: &FontFaceSetIteratorResult, val: bool); #[doc = "Get the `value` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FontFaceSetIteratorResult`*"] #[wasm_bindgen(method, getter = "value")] pub fn get_value(this: &FontFaceSetIteratorResult) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `value` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FontFaceSetIteratorResult`*"] #[wasm_bindgen(method, setter = "value")] - fn set_value(this: &FontFaceSetIteratorResult, val: &::wasm_bindgen::JsValue); + pub fn set_value(this: &FontFaceSetIteratorResult, val: &::wasm_bindgen::JsValue); } impl FontFaceSetIteratorResult { #[doc = "Construct a new `FontFaceSetIteratorResult`."] @@ -36,16 +42,12 @@ impl FontFaceSetIteratorResult { ret.value(value); ret } - #[doc = "Change the `done` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FontFaceSetIteratorResult`*"] + #[deprecated = "Use `set_done()` instead."] pub fn done(&mut self, val: bool) -> &mut Self { self.set_done(val); self } - #[doc = "Change the `value` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FontFaceSetIteratorResult`*"] + #[deprecated = "Use `set_value()` instead."] pub fn value(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_value(val); self diff --git a/crates/web-sys/src/features/gen_FontFaceSetLoadEventInit.rs b/crates/web-sys/src/features/gen_FontFaceSetLoadEventInit.rs index 170ea8aa8215..147a33165815 100644 --- a/crates/web-sys/src/features/gen_FontFaceSetLoadEventInit.rs +++ b/crates/web-sys/src/features/gen_FontFaceSetLoadEventInit.rs @@ -15,29 +15,41 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `FontFaceSetLoadEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &FontFaceSetLoadEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FontFaceSetLoadEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &FontFaceSetLoadEventInit, val: bool); + pub fn set_bubbles(this: &FontFaceSetLoadEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FontFaceSetLoadEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &FontFaceSetLoadEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FontFaceSetLoadEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &FontFaceSetLoadEventInit, val: bool); + pub fn set_cancelable(this: &FontFaceSetLoadEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FontFaceSetLoadEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &FontFaceSetLoadEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FontFaceSetLoadEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &FontFaceSetLoadEventInit, val: bool); + pub fn set_composed(this: &FontFaceSetLoadEventInit, val: bool); #[doc = "Get the `fontfaces` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FontFaceSetLoadEventInit`*"] #[wasm_bindgen(method, getter = "fontfaces")] pub fn get_fontfaces(this: &FontFaceSetLoadEventInit) -> Option<::js_sys::Array>; + #[doc = "Change the `fontfaces` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FontFaceSetLoadEventInit`*"] #[wasm_bindgen(method, setter = "fontfaces")] - fn set_fontfaces(this: &FontFaceSetLoadEventInit, val: &::wasm_bindgen::JsValue); + pub fn set_fontfaces(this: &FontFaceSetLoadEventInit, val: &::wasm_bindgen::JsValue); } impl FontFaceSetLoadEventInit { #[doc = "Construct a new `FontFaceSetLoadEventInit`."] @@ -48,30 +60,22 @@ impl FontFaceSetLoadEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FontFaceSetLoadEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FontFaceSetLoadEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FontFaceSetLoadEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } - #[doc = "Change the `fontfaces` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FontFaceSetLoadEventInit`*"] + #[deprecated = "Use `set_fontfaces()` instead."] pub fn fontfaces(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_fontfaces(val); self diff --git a/crates/web-sys/src/features/gen_GainOptions.rs b/crates/web-sys/src/features/gen_GainOptions.rs index aa28d84d8869..11dbccc476be 100644 --- a/crates/web-sys/src/features/gen_GainOptions.rs +++ b/crates/web-sys/src/features/gen_GainOptions.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `GainOptions`*"] #[wasm_bindgen(method, getter = "channelCount")] pub fn get_channel_count(this: &GainOptions) -> Option; + #[doc = "Change the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GainOptions`*"] #[wasm_bindgen(method, setter = "channelCount")] - fn set_channel_count(this: &GainOptions, val: u32); + pub fn set_channel_count(this: &GainOptions, val: u32); #[cfg(feature = "ChannelCountMode")] #[doc = "Get the `channelCountMode` field of this object."] #[doc = ""] @@ -24,8 +27,11 @@ extern "C" { #[wasm_bindgen(method, getter = "channelCountMode")] pub fn get_channel_count_mode(this: &GainOptions) -> Option; #[cfg(feature = "ChannelCountMode")] + #[doc = "Change the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `GainOptions`*"] #[wasm_bindgen(method, setter = "channelCountMode")] - fn set_channel_count_mode(this: &GainOptions, val: ChannelCountMode); + pub fn set_channel_count_mode(this: &GainOptions, val: ChannelCountMode); #[cfg(feature = "ChannelInterpretation")] #[doc = "Get the `channelInterpretation` field of this object."] #[doc = ""] @@ -33,15 +39,21 @@ extern "C" { #[wasm_bindgen(method, getter = "channelInterpretation")] pub fn get_channel_interpretation(this: &GainOptions) -> Option; #[cfg(feature = "ChannelInterpretation")] + #[doc = "Change the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `GainOptions`*"] #[wasm_bindgen(method, setter = "channelInterpretation")] - fn set_channel_interpretation(this: &GainOptions, val: ChannelInterpretation); + pub fn set_channel_interpretation(this: &GainOptions, val: ChannelInterpretation); #[doc = "Get the `gain` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `GainOptions`*"] #[wasm_bindgen(method, getter = "gain")] pub fn get_gain(this: &GainOptions) -> Option; + #[doc = "Change the `gain` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GainOptions`*"] #[wasm_bindgen(method, setter = "gain")] - fn set_gain(this: &GainOptions, val: f32); + pub fn set_gain(this: &GainOptions, val: f32); } impl GainOptions { #[doc = "Construct a new `GainOptions`."] @@ -52,32 +64,24 @@ impl GainOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `channelCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GainOptions`*"] + #[deprecated = "Use `set_channel_count()` instead."] pub fn channel_count(&mut self, val: u32) -> &mut Self { self.set_channel_count(val); self } #[cfg(feature = "ChannelCountMode")] - #[doc = "Change the `channelCountMode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `GainOptions`*"] + #[deprecated = "Use `set_channel_count_mode()` instead."] pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self { self.set_channel_count_mode(val); self } #[cfg(feature = "ChannelInterpretation")] - #[doc = "Change the `channelInterpretation` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `GainOptions`*"] + #[deprecated = "Use `set_channel_interpretation()` instead."] pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self { self.set_channel_interpretation(val); self } - #[doc = "Change the `gain` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GainOptions`*"] + #[deprecated = "Use `set_gain()` instead."] pub fn gain(&mut self, val: f32) -> &mut Self { self.set_gain(val); self diff --git a/crates/web-sys/src/features/gen_GamepadAxisMoveEventInit.rs b/crates/web-sys/src/features/gen_GamepadAxisMoveEventInit.rs index 90a320326950..885cee25eca3 100644 --- a/crates/web-sys/src/features/gen_GamepadAxisMoveEventInit.rs +++ b/crates/web-sys/src/features/gen_GamepadAxisMoveEventInit.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `GamepadAxisMoveEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &GamepadAxisMoveEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GamepadAxisMoveEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &GamepadAxisMoveEventInit, val: bool); + pub fn set_bubbles(this: &GamepadAxisMoveEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `GamepadAxisMoveEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &GamepadAxisMoveEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GamepadAxisMoveEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &GamepadAxisMoveEventInit, val: bool); + pub fn set_cancelable(this: &GamepadAxisMoveEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `GamepadAxisMoveEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &GamepadAxisMoveEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GamepadAxisMoveEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &GamepadAxisMoveEventInit, val: bool); + pub fn set_composed(this: &GamepadAxisMoveEventInit, val: bool); #[cfg(feature = "Gamepad")] #[doc = "Get the `gamepad` field of this object."] #[doc = ""] @@ -38,22 +47,31 @@ extern "C" { #[wasm_bindgen(method, getter = "gamepad")] pub fn get_gamepad(this: &GamepadAxisMoveEventInit) -> Option; #[cfg(feature = "Gamepad")] + #[doc = "Change the `gamepad` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Gamepad`, `GamepadAxisMoveEventInit`*"] #[wasm_bindgen(method, setter = "gamepad")] - fn set_gamepad(this: &GamepadAxisMoveEventInit, val: Option<&Gamepad>); + pub fn set_gamepad(this: &GamepadAxisMoveEventInit, val: Option<&Gamepad>); #[doc = "Get the `axis` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `GamepadAxisMoveEventInit`*"] #[wasm_bindgen(method, getter = "axis")] pub fn get_axis(this: &GamepadAxisMoveEventInit) -> Option; + #[doc = "Change the `axis` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GamepadAxisMoveEventInit`*"] #[wasm_bindgen(method, setter = "axis")] - fn set_axis(this: &GamepadAxisMoveEventInit, val: u32); + pub fn set_axis(this: &GamepadAxisMoveEventInit, val: u32); #[doc = "Get the `value` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `GamepadAxisMoveEventInit`*"] #[wasm_bindgen(method, getter = "value")] pub fn get_value(this: &GamepadAxisMoveEventInit) -> Option; + #[doc = "Change the `value` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GamepadAxisMoveEventInit`*"] #[wasm_bindgen(method, setter = "value")] - fn set_value(this: &GamepadAxisMoveEventInit, val: f64); + pub fn set_value(this: &GamepadAxisMoveEventInit, val: f64); } impl GamepadAxisMoveEventInit { #[doc = "Construct a new `GamepadAxisMoveEventInit`."] @@ -64,45 +82,33 @@ impl GamepadAxisMoveEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GamepadAxisMoveEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GamepadAxisMoveEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GamepadAxisMoveEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } #[cfg(feature = "Gamepad")] - #[doc = "Change the `gamepad` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `Gamepad`, `GamepadAxisMoveEventInit`*"] + #[deprecated = "Use `set_gamepad()` instead."] pub fn gamepad(&mut self, val: Option<&Gamepad>) -> &mut Self { self.set_gamepad(val); self } - #[doc = "Change the `axis` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GamepadAxisMoveEventInit`*"] + #[deprecated = "Use `set_axis()` instead."] pub fn axis(&mut self, val: u32) -> &mut Self { self.set_axis(val); self } - #[doc = "Change the `value` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GamepadAxisMoveEventInit`*"] + #[deprecated = "Use `set_value()` instead."] pub fn value(&mut self, val: f64) -> &mut Self { self.set_value(val); self diff --git a/crates/web-sys/src/features/gen_GamepadButtonEventInit.rs b/crates/web-sys/src/features/gen_GamepadButtonEventInit.rs index 62d44a59d170..9cd13854ed98 100644 --- a/crates/web-sys/src/features/gen_GamepadButtonEventInit.rs +++ b/crates/web-sys/src/features/gen_GamepadButtonEventInit.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `GamepadButtonEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &GamepadButtonEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GamepadButtonEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &GamepadButtonEventInit, val: bool); + pub fn set_bubbles(this: &GamepadButtonEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `GamepadButtonEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &GamepadButtonEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GamepadButtonEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &GamepadButtonEventInit, val: bool); + pub fn set_cancelable(this: &GamepadButtonEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `GamepadButtonEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &GamepadButtonEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GamepadButtonEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &GamepadButtonEventInit, val: bool); + pub fn set_composed(this: &GamepadButtonEventInit, val: bool); #[cfg(feature = "Gamepad")] #[doc = "Get the `gamepad` field of this object."] #[doc = ""] @@ -38,15 +47,21 @@ extern "C" { #[wasm_bindgen(method, getter = "gamepad")] pub fn get_gamepad(this: &GamepadButtonEventInit) -> Option; #[cfg(feature = "Gamepad")] + #[doc = "Change the `gamepad` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Gamepad`, `GamepadButtonEventInit`*"] #[wasm_bindgen(method, setter = "gamepad")] - fn set_gamepad(this: &GamepadButtonEventInit, val: Option<&Gamepad>); + pub fn set_gamepad(this: &GamepadButtonEventInit, val: Option<&Gamepad>); #[doc = "Get the `button` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `GamepadButtonEventInit`*"] #[wasm_bindgen(method, getter = "button")] pub fn get_button(this: &GamepadButtonEventInit) -> Option; + #[doc = "Change the `button` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GamepadButtonEventInit`*"] #[wasm_bindgen(method, setter = "button")] - fn set_button(this: &GamepadButtonEventInit, val: u32); + pub fn set_button(this: &GamepadButtonEventInit, val: u32); } impl GamepadButtonEventInit { #[doc = "Construct a new `GamepadButtonEventInit`."] @@ -57,38 +72,28 @@ impl GamepadButtonEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GamepadButtonEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GamepadButtonEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GamepadButtonEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } #[cfg(feature = "Gamepad")] - #[doc = "Change the `gamepad` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `Gamepad`, `GamepadButtonEventInit`*"] + #[deprecated = "Use `set_gamepad()` instead."] pub fn gamepad(&mut self, val: Option<&Gamepad>) -> &mut Self { self.set_gamepad(val); self } - #[doc = "Change the `button` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GamepadButtonEventInit`*"] + #[deprecated = "Use `set_button()` instead."] pub fn button(&mut self, val: u32) -> &mut Self { self.set_button(val); self diff --git a/crates/web-sys/src/features/gen_GamepadEventInit.rs b/crates/web-sys/src/features/gen_GamepadEventInit.rs index 72f6714fca09..de166b1d7350 100644 --- a/crates/web-sys/src/features/gen_GamepadEventInit.rs +++ b/crates/web-sys/src/features/gen_GamepadEventInit.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `GamepadEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &GamepadEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GamepadEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &GamepadEventInit, val: bool); + pub fn set_bubbles(this: &GamepadEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `GamepadEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &GamepadEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GamepadEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &GamepadEventInit, val: bool); + pub fn set_cancelable(this: &GamepadEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `GamepadEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &GamepadEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GamepadEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &GamepadEventInit, val: bool); + pub fn set_composed(this: &GamepadEventInit, val: bool); #[cfg(feature = "Gamepad")] #[doc = "Get the `gamepad` field of this object."] #[doc = ""] @@ -38,8 +47,11 @@ extern "C" { #[wasm_bindgen(method, getter = "gamepad")] pub fn get_gamepad(this: &GamepadEventInit) -> Option; #[cfg(feature = "Gamepad")] + #[doc = "Change the `gamepad` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Gamepad`, `GamepadEventInit`*"] #[wasm_bindgen(method, setter = "gamepad")] - fn set_gamepad(this: &GamepadEventInit, val: Option<&Gamepad>); + pub fn set_gamepad(this: &GamepadEventInit, val: Option<&Gamepad>); } impl GamepadEventInit { #[doc = "Construct a new `GamepadEventInit`."] @@ -50,31 +62,23 @@ impl GamepadEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GamepadEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GamepadEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GamepadEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } #[cfg(feature = "Gamepad")] - #[doc = "Change the `gamepad` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `Gamepad`, `GamepadEventInit`*"] + #[deprecated = "Use `set_gamepad()` instead."] pub fn gamepad(&mut self, val: Option<&Gamepad>) -> &mut Self { self.set_gamepad(val); self diff --git a/crates/web-sys/src/features/gen_GetAnimationsOptions.rs b/crates/web-sys/src/features/gen_GetAnimationsOptions.rs index 6f1a90e5c38a..3781d6ebc90e 100644 --- a/crates/web-sys/src/features/gen_GetAnimationsOptions.rs +++ b/crates/web-sys/src/features/gen_GetAnimationsOptions.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "subtree")] pub fn get_subtree(this: &GetAnimationsOptions) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `subtree` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GetAnimationsOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "subtree")] - fn set_subtree(this: &GetAnimationsOptions, val: bool); + pub fn set_subtree(this: &GetAnimationsOptions, val: bool); } #[cfg(web_sys_unstable_apis)] impl GetAnimationsOptions { @@ -40,12 +47,7 @@ impl GetAnimationsOptions { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `subtree` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GetAnimationsOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_subtree()` instead."] pub fn subtree(&mut self, val: bool) -> &mut Self { self.set_subtree(val); self diff --git a/crates/web-sys/src/features/gen_GetRootNodeOptions.rs b/crates/web-sys/src/features/gen_GetRootNodeOptions.rs index 11421e0cf54e..616cfaa611eb 100644 --- a/crates/web-sys/src/features/gen_GetRootNodeOptions.rs +++ b/crates/web-sys/src/features/gen_GetRootNodeOptions.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `GetRootNodeOptions`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &GetRootNodeOptions) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GetRootNodeOptions`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &GetRootNodeOptions, val: bool); + pub fn set_composed(this: &GetRootNodeOptions, val: bool); } impl GetRootNodeOptions { #[doc = "Construct a new `GetRootNodeOptions`."] @@ -27,9 +30,7 @@ impl GetRootNodeOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GetRootNodeOptions`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self diff --git a/crates/web-sys/src/features/gen_GpuBindGroupDescriptor.rs b/crates/web-sys/src/features/gen_GpuBindGroupDescriptor.rs index 7b9e366687c0..9f1ad18daf3d 100644 --- a/crates/web-sys/src/features/gen_GpuBindGroupDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuBindGroupDescriptor.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "label")] pub fn get_label(this: &GpuBindGroupDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "label")] - fn set_label(this: &GpuBindGroupDescriptor, val: &str); + pub fn set_label(this: &GpuBindGroupDescriptor, val: &str); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `entries` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "entries")] pub fn get_entries(this: &GpuBindGroupDescriptor) -> ::js_sys::Array; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `entries` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "entries")] - fn set_entries(this: &GpuBindGroupDescriptor, val: &::wasm_bindgen::JsValue); + pub fn set_entries(this: &GpuBindGroupDescriptor, val: &::wasm_bindgen::JsValue); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuBindGroupLayout")] #[doc = "Get the `layout` field of this object."] @@ -46,9 +60,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "layout")] pub fn get_layout(this: &GpuBindGroupDescriptor) -> GpuBindGroupLayout; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuBindGroupLayout")] + #[doc = "Change the `layout` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupDescriptor`, `GpuBindGroupLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "layout")] - fn set_layout(this: &GpuBindGroupDescriptor, val: &GpuBindGroupLayout); + pub fn set_layout(this: &GpuBindGroupDescriptor, val: &GpuBindGroupLayout); } #[cfg(web_sys_unstable_apis)] impl GpuBindGroupDescriptor { @@ -67,35 +88,20 @@ impl GpuBindGroupDescriptor { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `label` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_label()` instead."] pub fn label(&mut self, val: &str) -> &mut Self { self.set_label(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `entries` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_entries()` instead."] pub fn entries(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_entries(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuBindGroupLayout")] - #[doc = "Change the `layout` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupDescriptor`, `GpuBindGroupLayout`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_layout()` instead."] pub fn layout(&mut self, val: &GpuBindGroupLayout) -> &mut Self { self.set_layout(val); self diff --git a/crates/web-sys/src/features/gen_GpuBindGroupEntry.rs b/crates/web-sys/src/features/gen_GpuBindGroupEntry.rs index a073fb73dcf5..dff398857180 100644 --- a/crates/web-sys/src/features/gen_GpuBindGroupEntry.rs +++ b/crates/web-sys/src/features/gen_GpuBindGroupEntry.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "binding")] pub fn get_binding(this: &GpuBindGroupEntry) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `binding` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupEntry`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "binding")] - fn set_binding(this: &GpuBindGroupEntry, val: u32); + pub fn set_binding(this: &GpuBindGroupEntry, val: u32); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `resource` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "resource")] pub fn get_resource(this: &GpuBindGroupEntry) -> ::wasm_bindgen::JsValue; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `resource` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupEntry`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "resource")] - fn set_resource(this: &GpuBindGroupEntry, val: &::wasm_bindgen::JsValue); + pub fn set_resource(this: &GpuBindGroupEntry, val: &::wasm_bindgen::JsValue); } #[cfg(web_sys_unstable_apis)] impl GpuBindGroupEntry { @@ -53,23 +67,13 @@ impl GpuBindGroupEntry { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `binding` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupEntry`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_binding()` instead."] pub fn binding(&mut self, val: u32) -> &mut Self { self.set_binding(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `resource` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupEntry`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_resource()` instead."] pub fn resource(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_resource(val); self diff --git a/crates/web-sys/src/features/gen_GpuBindGroupLayoutDescriptor.rs b/crates/web-sys/src/features/gen_GpuBindGroupLayoutDescriptor.rs index 340265d3f19a..b7747d5d7567 100644 --- a/crates/web-sys/src/features/gen_GpuBindGroupLayoutDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuBindGroupLayoutDescriptor.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "label")] pub fn get_label(this: &GpuBindGroupLayoutDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "label")] - fn set_label(this: &GpuBindGroupLayoutDescriptor, val: &str); + pub fn set_label(this: &GpuBindGroupLayoutDescriptor, val: &str); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `entries` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "entries")] pub fn get_entries(this: &GpuBindGroupLayoutDescriptor) -> ::js_sys::Array; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `entries` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "entries")] - fn set_entries(this: &GpuBindGroupLayoutDescriptor, val: &::wasm_bindgen::JsValue); + pub fn set_entries(this: &GpuBindGroupLayoutDescriptor, val: &::wasm_bindgen::JsValue); } #[cfg(web_sys_unstable_apis)] impl GpuBindGroupLayoutDescriptor { @@ -52,23 +66,13 @@ impl GpuBindGroupLayoutDescriptor { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `label` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_label()` instead."] pub fn label(&mut self, val: &str) -> &mut Self { self.set_label(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `entries` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_entries()` instead."] pub fn entries(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_entries(val); self diff --git a/crates/web-sys/src/features/gen_GpuBindGroupLayoutEntry.rs b/crates/web-sys/src/features/gen_GpuBindGroupLayoutEntry.rs index abf3ad4d4820..6472b43a32e7 100644 --- a/crates/web-sys/src/features/gen_GpuBindGroupLayoutEntry.rs +++ b/crates/web-sys/src/features/gen_GpuBindGroupLayoutEntry.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "binding")] pub fn get_binding(this: &GpuBindGroupLayoutEntry) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `binding` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "binding")] - fn set_binding(this: &GpuBindGroupLayoutEntry, val: u32); + pub fn set_binding(this: &GpuBindGroupLayoutEntry, val: u32); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuBufferBindingLayout")] #[doc = "Get the `buffer` field of this object."] @@ -35,9 +42,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "buffer")] pub fn get_buffer(this: &GpuBindGroupLayoutEntry) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuBufferBindingLayout")] + #[doc = "Change the `buffer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`, `GpuBufferBindingLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "buffer")] - fn set_buffer(this: &GpuBindGroupLayoutEntry, val: &GpuBufferBindingLayout); + pub fn set_buffer(this: &GpuBindGroupLayoutEntry, val: &GpuBufferBindingLayout); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuExternalTextureBindingLayout")] #[doc = "Get the `externalTexture` field of this object."] @@ -50,9 +64,19 @@ extern "C" { pub fn get_external_texture( this: &GpuBindGroupLayoutEntry, ) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuExternalTextureBindingLayout")] + #[doc = "Change the `externalTexture` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`, `GpuExternalTextureBindingLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "externalTexture")] - fn set_external_texture(this: &GpuBindGroupLayoutEntry, val: &GpuExternalTextureBindingLayout); + pub fn set_external_texture( + this: &GpuBindGroupLayoutEntry, + val: &GpuExternalTextureBindingLayout, + ); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuSamplerBindingLayout")] #[doc = "Get the `sampler` field of this object."] @@ -63,9 +87,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "sampler")] pub fn get_sampler(this: &GpuBindGroupLayoutEntry) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuSamplerBindingLayout")] + #[doc = "Change the `sampler` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`, `GpuSamplerBindingLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "sampler")] - fn set_sampler(this: &GpuBindGroupLayoutEntry, val: &GpuSamplerBindingLayout); + pub fn set_sampler(this: &GpuBindGroupLayoutEntry, val: &GpuSamplerBindingLayout); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuStorageTextureBindingLayout")] #[doc = "Get the `storageTexture` field of this object."] @@ -78,9 +109,19 @@ extern "C" { pub fn get_storage_texture( this: &GpuBindGroupLayoutEntry, ) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuStorageTextureBindingLayout")] + #[doc = "Change the `storageTexture` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`, `GpuStorageTextureBindingLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "storageTexture")] - fn set_storage_texture(this: &GpuBindGroupLayoutEntry, val: &GpuStorageTextureBindingLayout); + pub fn set_storage_texture( + this: &GpuBindGroupLayoutEntry, + val: &GpuStorageTextureBindingLayout, + ); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureBindingLayout")] #[doc = "Get the `texture` field of this object."] @@ -91,9 +132,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "texture")] pub fn get_texture(this: &GpuBindGroupLayoutEntry) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureBindingLayout")] + #[doc = "Change the `texture` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`, `GpuTextureBindingLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "texture")] - fn set_texture(this: &GpuBindGroupLayoutEntry, val: &GpuTextureBindingLayout); + pub fn set_texture(this: &GpuBindGroupLayoutEntry, val: &GpuTextureBindingLayout); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `visibility` field of this object."] #[doc = ""] @@ -103,8 +151,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "visibility")] pub fn get_visibility(this: &GpuBindGroupLayoutEntry) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `visibility` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "visibility")] - fn set_visibility(this: &GpuBindGroupLayoutEntry, val: u32); + pub fn set_visibility(this: &GpuBindGroupLayoutEntry, val: u32); } #[cfg(web_sys_unstable_apis)] impl GpuBindGroupLayoutEntry { @@ -122,83 +177,48 @@ impl GpuBindGroupLayoutEntry { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `binding` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_binding()` instead."] pub fn binding(&mut self, val: u32) -> &mut Self { self.set_binding(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuBufferBindingLayout")] - #[doc = "Change the `buffer` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`, `GpuBufferBindingLayout`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_buffer()` instead."] pub fn buffer(&mut self, val: &GpuBufferBindingLayout) -> &mut Self { self.set_buffer(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuExternalTextureBindingLayout")] - #[doc = "Change the `externalTexture` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`, `GpuExternalTextureBindingLayout`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_external_texture()` instead."] pub fn external_texture(&mut self, val: &GpuExternalTextureBindingLayout) -> &mut Self { self.set_external_texture(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuSamplerBindingLayout")] - #[doc = "Change the `sampler` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`, `GpuSamplerBindingLayout`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_sampler()` instead."] pub fn sampler(&mut self, val: &GpuSamplerBindingLayout) -> &mut Self { self.set_sampler(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuStorageTextureBindingLayout")] - #[doc = "Change the `storageTexture` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`, `GpuStorageTextureBindingLayout`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_storage_texture()` instead."] pub fn storage_texture(&mut self, val: &GpuStorageTextureBindingLayout) -> &mut Self { self.set_storage_texture(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureBindingLayout")] - #[doc = "Change the `texture` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`, `GpuTextureBindingLayout`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_texture()` instead."] pub fn texture(&mut self, val: &GpuTextureBindingLayout) -> &mut Self { self.set_texture(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `visibility` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_visibility()` instead."] pub fn visibility(&mut self, val: u32) -> &mut Self { self.set_visibility(val); self diff --git a/crates/web-sys/src/features/gen_GpuBlendComponent.rs b/crates/web-sys/src/features/gen_GpuBlendComponent.rs index 883d8e36bcba..10f53d345f4b 100644 --- a/crates/web-sys/src/features/gen_GpuBlendComponent.rs +++ b/crates/web-sys/src/features/gen_GpuBlendComponent.rs @@ -24,9 +24,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "dstFactor")] pub fn get_dst_factor(this: &GpuBlendComponent) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuBlendFactor")] + #[doc = "Change the `dstFactor` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBlendComponent`, `GpuBlendFactor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "dstFactor")] - fn set_dst_factor(this: &GpuBlendComponent, val: GpuBlendFactor); + pub fn set_dst_factor(this: &GpuBlendComponent, val: GpuBlendFactor); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuBlendOperation")] #[doc = "Get the `operation` field of this object."] @@ -37,9 +44,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "operation")] pub fn get_operation(this: &GpuBlendComponent) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuBlendOperation")] + #[doc = "Change the `operation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBlendComponent`, `GpuBlendOperation`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "operation")] - fn set_operation(this: &GpuBlendComponent, val: GpuBlendOperation); + pub fn set_operation(this: &GpuBlendComponent, val: GpuBlendOperation); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuBlendFactor")] #[doc = "Get the `srcFactor` field of this object."] @@ -50,9 +64,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "srcFactor")] pub fn get_src_factor(this: &GpuBlendComponent) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuBlendFactor")] + #[doc = "Change the `srcFactor` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBlendComponent`, `GpuBlendFactor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "srcFactor")] - fn set_src_factor(this: &GpuBlendComponent, val: GpuBlendFactor); + pub fn set_src_factor(this: &GpuBlendComponent, val: GpuBlendFactor); } #[cfg(web_sys_unstable_apis)] impl GpuBlendComponent { @@ -69,36 +90,21 @@ impl GpuBlendComponent { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuBlendFactor")] - #[doc = "Change the `dstFactor` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBlendComponent`, `GpuBlendFactor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_dst_factor()` instead."] pub fn dst_factor(&mut self, val: GpuBlendFactor) -> &mut Self { self.set_dst_factor(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuBlendOperation")] - #[doc = "Change the `operation` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBlendComponent`, `GpuBlendOperation`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_operation()` instead."] pub fn operation(&mut self, val: GpuBlendOperation) -> &mut Self { self.set_operation(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuBlendFactor")] - #[doc = "Change the `srcFactor` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBlendComponent`, `GpuBlendFactor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_src_factor()` instead."] pub fn src_factor(&mut self, val: GpuBlendFactor) -> &mut Self { self.set_src_factor(val); self diff --git a/crates/web-sys/src/features/gen_GpuBlendState.rs b/crates/web-sys/src/features/gen_GpuBlendState.rs index 586ff759b712..cdb7dc9f043c 100644 --- a/crates/web-sys/src/features/gen_GpuBlendState.rs +++ b/crates/web-sys/src/features/gen_GpuBlendState.rs @@ -24,9 +24,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "alpha")] pub fn get_alpha(this: &GpuBlendState) -> GpuBlendComponent; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuBlendComponent")] + #[doc = "Change the `alpha` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBlendComponent`, `GpuBlendState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "alpha")] - fn set_alpha(this: &GpuBlendState, val: &GpuBlendComponent); + pub fn set_alpha(this: &GpuBlendState, val: &GpuBlendComponent); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuBlendComponent")] #[doc = "Get the `color` field of this object."] @@ -37,9 +44,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "color")] pub fn get_color(this: &GpuBlendState) -> GpuBlendComponent; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuBlendComponent")] + #[doc = "Change the `color` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBlendComponent`, `GpuBlendState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "color")] - fn set_color(this: &GpuBlendState, val: &GpuBlendComponent); + pub fn set_color(this: &GpuBlendState, val: &GpuBlendComponent); } #[cfg(web_sys_unstable_apis)] impl GpuBlendState { @@ -59,24 +73,14 @@ impl GpuBlendState { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuBlendComponent")] - #[doc = "Change the `alpha` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBlendComponent`, `GpuBlendState`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_alpha()` instead."] pub fn alpha(&mut self, val: &GpuBlendComponent) -> &mut Self { self.set_alpha(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuBlendComponent")] - #[doc = "Change the `color` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBlendComponent`, `GpuBlendState`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_color()` instead."] pub fn color(&mut self, val: &GpuBlendComponent) -> &mut Self { self.set_color(val); self diff --git a/crates/web-sys/src/features/gen_GpuBufferBinding.rs b/crates/web-sys/src/features/gen_GpuBufferBinding.rs index 1144b650da65..312055ad44f3 100644 --- a/crates/web-sys/src/features/gen_GpuBufferBinding.rs +++ b/crates/web-sys/src/features/gen_GpuBufferBinding.rs @@ -24,9 +24,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "buffer")] pub fn get_buffer(this: &GpuBufferBinding) -> GpuBuffer; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuBuffer")] + #[doc = "Change the `buffer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBuffer`, `GpuBufferBinding`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "buffer")] - fn set_buffer(this: &GpuBufferBinding, val: &GpuBuffer); + pub fn set_buffer(this: &GpuBufferBinding, val: &GpuBuffer); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `offset` field of this object."] #[doc = ""] @@ -36,8 +43,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "offset")] pub fn get_offset(this: &GpuBufferBinding) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `offset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBufferBinding`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "offset")] - fn set_offset(this: &GpuBufferBinding, val: f64); + pub fn set_offset(this: &GpuBufferBinding, val: f64); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `size` field of this object."] #[doc = ""] @@ -47,8 +61,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "size")] pub fn get_size(this: &GpuBufferBinding) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `size` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBufferBinding`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "size")] - fn set_size(this: &GpuBufferBinding, val: f64); + pub fn set_size(this: &GpuBufferBinding, val: f64); } #[cfg(web_sys_unstable_apis)] impl GpuBufferBinding { @@ -67,34 +88,19 @@ impl GpuBufferBinding { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuBuffer")] - #[doc = "Change the `buffer` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBuffer`, `GpuBufferBinding`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_buffer()` instead."] pub fn buffer(&mut self, val: &GpuBuffer) -> &mut Self { self.set_buffer(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `offset` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBufferBinding`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_offset()` instead."] pub fn offset(&mut self, val: f64) -> &mut Self { self.set_offset(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `size` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBufferBinding`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_size()` instead."] pub fn size(&mut self, val: f64) -> &mut Self { self.set_size(val); self diff --git a/crates/web-sys/src/features/gen_GpuBufferBindingLayout.rs b/crates/web-sys/src/features/gen_GpuBufferBindingLayout.rs index beb685708c22..47def45064ba 100644 --- a/crates/web-sys/src/features/gen_GpuBufferBindingLayout.rs +++ b/crates/web-sys/src/features/gen_GpuBufferBindingLayout.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "hasDynamicOffset")] pub fn get_has_dynamic_offset(this: &GpuBufferBindingLayout) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `hasDynamicOffset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBufferBindingLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "hasDynamicOffset")] - fn set_has_dynamic_offset(this: &GpuBufferBindingLayout, val: bool); + pub fn set_has_dynamic_offset(this: &GpuBufferBindingLayout, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `minBindingSize` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "minBindingSize")] pub fn get_min_binding_size(this: &GpuBufferBindingLayout) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `minBindingSize` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBufferBindingLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "minBindingSize")] - fn set_min_binding_size(this: &GpuBufferBindingLayout, val: f64); + pub fn set_min_binding_size(this: &GpuBufferBindingLayout, val: f64); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuBufferBindingType")] #[doc = "Get the `type` field of this object."] @@ -46,9 +60,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "type")] pub fn get_type(this: &GpuBufferBindingLayout) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuBufferBindingType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBufferBindingLayout`, `GpuBufferBindingType`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "type")] - fn set_type(this: &GpuBufferBindingLayout, val: GpuBufferBindingType); + pub fn set_type(this: &GpuBufferBindingLayout, val: GpuBufferBindingType); } #[cfg(web_sys_unstable_apis)] impl GpuBufferBindingLayout { @@ -64,35 +85,20 @@ impl GpuBufferBindingLayout { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `hasDynamicOffset` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBufferBindingLayout`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_has_dynamic_offset()` instead."] pub fn has_dynamic_offset(&mut self, val: bool) -> &mut Self { self.set_has_dynamic_offset(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `minBindingSize` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBufferBindingLayout`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_min_binding_size()` instead."] pub fn min_binding_size(&mut self, val: f64) -> &mut Self { self.set_min_binding_size(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuBufferBindingType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBufferBindingLayout`, `GpuBufferBindingType`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: GpuBufferBindingType) -> &mut Self { self.set_type(val); self diff --git a/crates/web-sys/src/features/gen_GpuBufferDescriptor.rs b/crates/web-sys/src/features/gen_GpuBufferDescriptor.rs index 922b6b2ddeff..536aa9c409da 100644 --- a/crates/web-sys/src/features/gen_GpuBufferDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuBufferDescriptor.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "label")] pub fn get_label(this: &GpuBufferDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBufferDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "label")] - fn set_label(this: &GpuBufferDescriptor, val: &str); + pub fn set_label(this: &GpuBufferDescriptor, val: &str); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `mappedAtCreation` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "mappedAtCreation")] pub fn get_mapped_at_creation(this: &GpuBufferDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `mappedAtCreation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBufferDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "mappedAtCreation")] - fn set_mapped_at_creation(this: &GpuBufferDescriptor, val: bool); + pub fn set_mapped_at_creation(this: &GpuBufferDescriptor, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `size` field of this object."] #[doc = ""] @@ -45,8 +59,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "size")] pub fn get_size(this: &GpuBufferDescriptor) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `size` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBufferDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "size")] - fn set_size(this: &GpuBufferDescriptor, val: f64); + pub fn set_size(this: &GpuBufferDescriptor, val: f64); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `usage` field of this object."] #[doc = ""] @@ -56,8 +77,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "usage")] pub fn get_usage(this: &GpuBufferDescriptor) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `usage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBufferDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "usage")] - fn set_usage(this: &GpuBufferDescriptor, val: u32); + pub fn set_usage(this: &GpuBufferDescriptor, val: u32); } #[cfg(web_sys_unstable_apis)] impl GpuBufferDescriptor { @@ -75,45 +103,25 @@ impl GpuBufferDescriptor { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `label` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBufferDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_label()` instead."] pub fn label(&mut self, val: &str) -> &mut Self { self.set_label(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `mappedAtCreation` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBufferDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_mapped_at_creation()` instead."] pub fn mapped_at_creation(&mut self, val: bool) -> &mut Self { self.set_mapped_at_creation(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `size` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBufferDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_size()` instead."] pub fn size(&mut self, val: f64) -> &mut Self { self.set_size(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `usage` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBufferDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_usage()` instead."] pub fn usage(&mut self, val: u32) -> &mut Self { self.set_usage(val); self diff --git a/crates/web-sys/src/features/gen_GpuCanvasConfiguration.rs b/crates/web-sys/src/features/gen_GpuCanvasConfiguration.rs index a1c686301e83..220fcebe4d7f 100644 --- a/crates/web-sys/src/features/gen_GpuCanvasConfiguration.rs +++ b/crates/web-sys/src/features/gen_GpuCanvasConfiguration.rs @@ -24,9 +24,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "alphaMode")] pub fn get_alpha_mode(this: &GpuCanvasConfiguration) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuCanvasAlphaMode")] + #[doc = "Change the `alphaMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuCanvasAlphaMode`, `GpuCanvasConfiguration`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "alphaMode")] - fn set_alpha_mode(this: &GpuCanvasConfiguration, val: GpuCanvasAlphaMode); + pub fn set_alpha_mode(this: &GpuCanvasConfiguration, val: GpuCanvasAlphaMode); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuDevice")] #[doc = "Get the `device` field of this object."] @@ -37,9 +44,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "device")] pub fn get_device(this: &GpuCanvasConfiguration) -> GpuDevice; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuDevice")] + #[doc = "Change the `device` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuCanvasConfiguration`, `GpuDevice`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "device")] - fn set_device(this: &GpuCanvasConfiguration, val: &GpuDevice); + pub fn set_device(this: &GpuCanvasConfiguration, val: &GpuDevice); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureFormat")] #[doc = "Get the `format` field of this object."] @@ -50,9 +64,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "format")] pub fn get_format(this: &GpuCanvasConfiguration) -> GpuTextureFormat; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureFormat")] + #[doc = "Change the `format` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuCanvasConfiguration`, `GpuTextureFormat`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "format")] - fn set_format(this: &GpuCanvasConfiguration, val: GpuTextureFormat); + pub fn set_format(this: &GpuCanvasConfiguration, val: GpuTextureFormat); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `usage` field of this object."] #[doc = ""] @@ -62,8 +83,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "usage")] pub fn get_usage(this: &GpuCanvasConfiguration) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `usage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuCanvasConfiguration`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "usage")] - fn set_usage(this: &GpuCanvasConfiguration, val: u32); + pub fn set_usage(this: &GpuCanvasConfiguration, val: u32); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `viewFormats` field of this object."] #[doc = ""] @@ -73,8 +101,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "viewFormats")] pub fn get_view_formats(this: &GpuCanvasConfiguration) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `viewFormats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuCanvasConfiguration`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "viewFormats")] - fn set_view_formats(this: &GpuCanvasConfiguration, val: &::wasm_bindgen::JsValue); + pub fn set_view_formats(this: &GpuCanvasConfiguration, val: &::wasm_bindgen::JsValue); } #[cfg(web_sys_unstable_apis)] impl GpuCanvasConfiguration { @@ -94,58 +129,33 @@ impl GpuCanvasConfiguration { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuCanvasAlphaMode")] - #[doc = "Change the `alphaMode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuCanvasAlphaMode`, `GpuCanvasConfiguration`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_alpha_mode()` instead."] pub fn alpha_mode(&mut self, val: GpuCanvasAlphaMode) -> &mut Self { self.set_alpha_mode(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuDevice")] - #[doc = "Change the `device` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuCanvasConfiguration`, `GpuDevice`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_device()` instead."] pub fn device(&mut self, val: &GpuDevice) -> &mut Self { self.set_device(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureFormat")] - #[doc = "Change the `format` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuCanvasConfiguration`, `GpuTextureFormat`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_format()` instead."] pub fn format(&mut self, val: GpuTextureFormat) -> &mut Self { self.set_format(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `usage` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuCanvasConfiguration`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_usage()` instead."] pub fn usage(&mut self, val: u32) -> &mut Self { self.set_usage(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `viewFormats` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuCanvasConfiguration`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_view_formats()` instead."] pub fn view_formats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_view_formats(val); self diff --git a/crates/web-sys/src/features/gen_GpuColorDict.rs b/crates/web-sys/src/features/gen_GpuColorDict.rs index d20c778b3c35..38af75d3cb3c 100644 --- a/crates/web-sys/src/features/gen_GpuColorDict.rs +++ b/crates/web-sys/src/features/gen_GpuColorDict.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "a")] pub fn get_a(this: &GpuColorDict) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `a` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuColorDict`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "a")] - fn set_a(this: &GpuColorDict, val: f64); + pub fn set_a(this: &GpuColorDict, val: f64); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `b` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "b")] pub fn get_b(this: &GpuColorDict) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `b` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuColorDict`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "b")] - fn set_b(this: &GpuColorDict, val: f64); + pub fn set_b(this: &GpuColorDict, val: f64); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `g` field of this object."] #[doc = ""] @@ -45,8 +59,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "g")] pub fn get_g(this: &GpuColorDict) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `g` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuColorDict`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "g")] - fn set_g(this: &GpuColorDict, val: f64); + pub fn set_g(this: &GpuColorDict, val: f64); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `r` field of this object."] #[doc = ""] @@ -56,8 +77,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "r")] pub fn get_r(this: &GpuColorDict) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `r` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuColorDict`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "r")] - fn set_r(this: &GpuColorDict, val: f64); + pub fn set_r(this: &GpuColorDict, val: f64); } #[cfg(web_sys_unstable_apis)] impl GpuColorDict { @@ -77,45 +105,25 @@ impl GpuColorDict { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `a` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuColorDict`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_a()` instead."] pub fn a(&mut self, val: f64) -> &mut Self { self.set_a(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `b` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuColorDict`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_b()` instead."] pub fn b(&mut self, val: f64) -> &mut Self { self.set_b(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `g` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuColorDict`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_g()` instead."] pub fn g(&mut self, val: f64) -> &mut Self { self.set_g(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `r` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuColorDict`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_r()` instead."] pub fn r(&mut self, val: f64) -> &mut Self { self.set_r(val); self diff --git a/crates/web-sys/src/features/gen_GpuColorTargetState.rs b/crates/web-sys/src/features/gen_GpuColorTargetState.rs index b16a0c7f3923..e4b651285fdd 100644 --- a/crates/web-sys/src/features/gen_GpuColorTargetState.rs +++ b/crates/web-sys/src/features/gen_GpuColorTargetState.rs @@ -24,9 +24,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "blend")] pub fn get_blend(this: &GpuColorTargetState) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuBlendState")] + #[doc = "Change the `blend` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBlendState`, `GpuColorTargetState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "blend")] - fn set_blend(this: &GpuColorTargetState, val: &GpuBlendState); + pub fn set_blend(this: &GpuColorTargetState, val: &GpuBlendState); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureFormat")] #[doc = "Get the `format` field of this object."] @@ -37,9 +44,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "format")] pub fn get_format(this: &GpuColorTargetState) -> GpuTextureFormat; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureFormat")] + #[doc = "Change the `format` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuColorTargetState`, `GpuTextureFormat`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "format")] - fn set_format(this: &GpuColorTargetState, val: GpuTextureFormat); + pub fn set_format(this: &GpuColorTargetState, val: GpuTextureFormat); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `writeMask` field of this object."] #[doc = ""] @@ -49,8 +63,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "writeMask")] pub fn get_write_mask(this: &GpuColorTargetState) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `writeMask` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuColorTargetState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "writeMask")] - fn set_write_mask(this: &GpuColorTargetState, val: u32); + pub fn set_write_mask(this: &GpuColorTargetState, val: u32); } #[cfg(web_sys_unstable_apis)] impl GpuColorTargetState { @@ -69,35 +90,20 @@ impl GpuColorTargetState { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuBlendState")] - #[doc = "Change the `blend` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBlendState`, `GpuColorTargetState`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_blend()` instead."] pub fn blend(&mut self, val: &GpuBlendState) -> &mut Self { self.set_blend(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureFormat")] - #[doc = "Change the `format` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuColorTargetState`, `GpuTextureFormat`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_format()` instead."] pub fn format(&mut self, val: GpuTextureFormat) -> &mut Self { self.set_format(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `writeMask` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuColorTargetState`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_write_mask()` instead."] pub fn write_mask(&mut self, val: u32) -> &mut Self { self.set_write_mask(val); self diff --git a/crates/web-sys/src/features/gen_GpuCommandBufferDescriptor.rs b/crates/web-sys/src/features/gen_GpuCommandBufferDescriptor.rs index 7195ead711bf..af0d4b1455b9 100644 --- a/crates/web-sys/src/features/gen_GpuCommandBufferDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuCommandBufferDescriptor.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "label")] pub fn get_label(this: &GpuCommandBufferDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuCommandBufferDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "label")] - fn set_label(this: &GpuCommandBufferDescriptor, val: &str); + pub fn set_label(this: &GpuCommandBufferDescriptor, val: &str); } #[cfg(web_sys_unstable_apis)] impl GpuCommandBufferDescriptor { @@ -40,12 +47,7 @@ impl GpuCommandBufferDescriptor { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `label` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuCommandBufferDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_label()` instead."] pub fn label(&mut self, val: &str) -> &mut Self { self.set_label(val); self diff --git a/crates/web-sys/src/features/gen_GpuCommandEncoderDescriptor.rs b/crates/web-sys/src/features/gen_GpuCommandEncoderDescriptor.rs index abeaea27cd8e..e883bd9c31e1 100644 --- a/crates/web-sys/src/features/gen_GpuCommandEncoderDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuCommandEncoderDescriptor.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "label")] pub fn get_label(this: &GpuCommandEncoderDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuCommandEncoderDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "label")] - fn set_label(this: &GpuCommandEncoderDescriptor, val: &str); + pub fn set_label(this: &GpuCommandEncoderDescriptor, val: &str); } #[cfg(web_sys_unstable_apis)] impl GpuCommandEncoderDescriptor { @@ -40,12 +47,7 @@ impl GpuCommandEncoderDescriptor { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `label` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuCommandEncoderDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_label()` instead."] pub fn label(&mut self, val: &str) -> &mut Self { self.set_label(val); self diff --git a/crates/web-sys/src/features/gen_GpuComputePassDescriptor.rs b/crates/web-sys/src/features/gen_GpuComputePassDescriptor.rs index 18e41307b2e7..0da84742aa89 100644 --- a/crates/web-sys/src/features/gen_GpuComputePassDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuComputePassDescriptor.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "label")] pub fn get_label(this: &GpuComputePassDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuComputePassDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "label")] - fn set_label(this: &GpuComputePassDescriptor, val: &str); + pub fn set_label(this: &GpuComputePassDescriptor, val: &str); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuComputePassTimestampWrites")] #[doc = "Get the `timestampWrites` field of this object."] @@ -37,9 +44,19 @@ extern "C" { pub fn get_timestamp_writes( this: &GpuComputePassDescriptor, ) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuComputePassTimestampWrites")] + #[doc = "Change the `timestampWrites` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuComputePassDescriptor`, `GpuComputePassTimestampWrites`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "timestampWrites")] - fn set_timestamp_writes(this: &GpuComputePassDescriptor, val: &GpuComputePassTimestampWrites); + pub fn set_timestamp_writes( + this: &GpuComputePassDescriptor, + val: &GpuComputePassTimestampWrites, + ); } #[cfg(web_sys_unstable_apis)] impl GpuComputePassDescriptor { @@ -55,24 +72,14 @@ impl GpuComputePassDescriptor { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `label` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuComputePassDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_label()` instead."] pub fn label(&mut self, val: &str) -> &mut Self { self.set_label(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuComputePassTimestampWrites")] - #[doc = "Change the `timestampWrites` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuComputePassDescriptor`, `GpuComputePassTimestampWrites`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_timestamp_writes()` instead."] pub fn timestamp_writes(&mut self, val: &GpuComputePassTimestampWrites) -> &mut Self { self.set_timestamp_writes(val); self diff --git a/crates/web-sys/src/features/gen_GpuComputePassTimestampWrites.rs b/crates/web-sys/src/features/gen_GpuComputePassTimestampWrites.rs index 14b3d771835a..5ff73d7fd3c1 100644 --- a/crates/web-sys/src/features/gen_GpuComputePassTimestampWrites.rs +++ b/crates/web-sys/src/features/gen_GpuComputePassTimestampWrites.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "beginningOfPassWriteIndex")] pub fn get_beginning_of_pass_write_index(this: &GpuComputePassTimestampWrites) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `beginningOfPassWriteIndex` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuComputePassTimestampWrites`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "beginningOfPassWriteIndex")] - fn set_beginning_of_pass_write_index(this: &GpuComputePassTimestampWrites, val: u32); + pub fn set_beginning_of_pass_write_index(this: &GpuComputePassTimestampWrites, val: u32); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `endOfPassWriteIndex` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "endOfPassWriteIndex")] pub fn get_end_of_pass_write_index(this: &GpuComputePassTimestampWrites) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `endOfPassWriteIndex` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuComputePassTimestampWrites`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "endOfPassWriteIndex")] - fn set_end_of_pass_write_index(this: &GpuComputePassTimestampWrites, val: u32); + pub fn set_end_of_pass_write_index(this: &GpuComputePassTimestampWrites, val: u32); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuQuerySet")] #[doc = "Get the `querySet` field of this object."] @@ -46,9 +60,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "querySet")] pub fn get_query_set(this: &GpuComputePassTimestampWrites) -> GpuQuerySet; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuQuerySet")] + #[doc = "Change the `querySet` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuComputePassTimestampWrites`, `GpuQuerySet`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "querySet")] - fn set_query_set(this: &GpuComputePassTimestampWrites, val: &GpuQuerySet); + pub fn set_query_set(this: &GpuComputePassTimestampWrites, val: &GpuQuerySet); } #[cfg(web_sys_unstable_apis)] impl GpuComputePassTimestampWrites { @@ -66,35 +87,20 @@ impl GpuComputePassTimestampWrites { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `beginningOfPassWriteIndex` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuComputePassTimestampWrites`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_beginning_of_pass_write_index()` instead."] pub fn beginning_of_pass_write_index(&mut self, val: u32) -> &mut Self { self.set_beginning_of_pass_write_index(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `endOfPassWriteIndex` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuComputePassTimestampWrites`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_end_of_pass_write_index()` instead."] pub fn end_of_pass_write_index(&mut self, val: u32) -> &mut Self { self.set_end_of_pass_write_index(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuQuerySet")] - #[doc = "Change the `querySet` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuComputePassTimestampWrites`, `GpuQuerySet`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_query_set()` instead."] pub fn query_set(&mut self, val: &GpuQuerySet) -> &mut Self { self.set_query_set(val); self diff --git a/crates/web-sys/src/features/gen_GpuComputePipelineDescriptor.rs b/crates/web-sys/src/features/gen_GpuComputePipelineDescriptor.rs index 66d897c6e3d3..0dc1e1a04232 100644 --- a/crates/web-sys/src/features/gen_GpuComputePipelineDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuComputePipelineDescriptor.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "label")] pub fn get_label(this: &GpuComputePipelineDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuComputePipelineDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "label")] - fn set_label(this: &GpuComputePipelineDescriptor, val: &str); + pub fn set_label(this: &GpuComputePipelineDescriptor, val: &str); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `layout` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "layout")] pub fn get_layout(this: &GpuComputePipelineDescriptor) -> ::wasm_bindgen::JsValue; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `layout` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuComputePipelineDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "layout")] - fn set_layout(this: &GpuComputePipelineDescriptor, val: &::wasm_bindgen::JsValue); + pub fn set_layout(this: &GpuComputePipelineDescriptor, val: &::wasm_bindgen::JsValue); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuProgrammableStage")] #[doc = "Get the `compute` field of this object."] @@ -46,9 +60,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "compute")] pub fn get_compute(this: &GpuComputePipelineDescriptor) -> GpuProgrammableStage; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuProgrammableStage")] + #[doc = "Change the `compute` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuComputePipelineDescriptor`, `GpuProgrammableStage`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "compute")] - fn set_compute(this: &GpuComputePipelineDescriptor, val: &GpuProgrammableStage); + pub fn set_compute(this: &GpuComputePipelineDescriptor, val: &GpuProgrammableStage); } #[cfg(web_sys_unstable_apis)] impl GpuComputePipelineDescriptor { @@ -67,35 +88,20 @@ impl GpuComputePipelineDescriptor { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `label` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuComputePipelineDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_label()` instead."] pub fn label(&mut self, val: &str) -> &mut Self { self.set_label(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `layout` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuComputePipelineDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_layout()` instead."] pub fn layout(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_layout(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuProgrammableStage")] - #[doc = "Change the `compute` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuComputePipelineDescriptor`, `GpuProgrammableStage`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_compute()` instead."] pub fn compute(&mut self, val: &GpuProgrammableStage) -> &mut Self { self.set_compute(val); self diff --git a/crates/web-sys/src/features/gen_GpuDepthStencilState.rs b/crates/web-sys/src/features/gen_GpuDepthStencilState.rs index 0fde34a4c19d..0c9a964b7f20 100644 --- a/crates/web-sys/src/features/gen_GpuDepthStencilState.rs +++ b/crates/web-sys/src/features/gen_GpuDepthStencilState.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "depthBias")] pub fn get_depth_bias(this: &GpuDepthStencilState) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `depthBias` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuDepthStencilState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "depthBias")] - fn set_depth_bias(this: &GpuDepthStencilState, val: i32); + pub fn set_depth_bias(this: &GpuDepthStencilState, val: i32); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `depthBiasClamp` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "depthBiasClamp")] pub fn get_depth_bias_clamp(this: &GpuDepthStencilState) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `depthBiasClamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuDepthStencilState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "depthBiasClamp")] - fn set_depth_bias_clamp(this: &GpuDepthStencilState, val: f32); + pub fn set_depth_bias_clamp(this: &GpuDepthStencilState, val: f32); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `depthBiasSlopeScale` field of this object."] #[doc = ""] @@ -45,8 +59,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "depthBiasSlopeScale")] pub fn get_depth_bias_slope_scale(this: &GpuDepthStencilState) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `depthBiasSlopeScale` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuDepthStencilState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "depthBiasSlopeScale")] - fn set_depth_bias_slope_scale(this: &GpuDepthStencilState, val: f32); + pub fn set_depth_bias_slope_scale(this: &GpuDepthStencilState, val: f32); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuCompareFunction")] #[doc = "Get the `depthCompare` field of this object."] @@ -57,9 +78,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "depthCompare")] pub fn get_depth_compare(this: &GpuDepthStencilState) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuCompareFunction")] + #[doc = "Change the `depthCompare` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuCompareFunction`, `GpuDepthStencilState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "depthCompare")] - fn set_depth_compare(this: &GpuDepthStencilState, val: GpuCompareFunction); + pub fn set_depth_compare(this: &GpuDepthStencilState, val: GpuCompareFunction); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `depthWriteEnabled` field of this object."] #[doc = ""] @@ -69,8 +97,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "depthWriteEnabled")] pub fn get_depth_write_enabled(this: &GpuDepthStencilState) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `depthWriteEnabled` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuDepthStencilState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "depthWriteEnabled")] - fn set_depth_write_enabled(this: &GpuDepthStencilState, val: bool); + pub fn set_depth_write_enabled(this: &GpuDepthStencilState, val: bool); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureFormat")] #[doc = "Get the `format` field of this object."] @@ -81,9 +116,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "format")] pub fn get_format(this: &GpuDepthStencilState) -> GpuTextureFormat; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureFormat")] + #[doc = "Change the `format` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuDepthStencilState`, `GpuTextureFormat`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "format")] - fn set_format(this: &GpuDepthStencilState, val: GpuTextureFormat); + pub fn set_format(this: &GpuDepthStencilState, val: GpuTextureFormat); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuStencilFaceState")] #[doc = "Get the `stencilBack` field of this object."] @@ -94,9 +136,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "stencilBack")] pub fn get_stencil_back(this: &GpuDepthStencilState) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuStencilFaceState")] + #[doc = "Change the `stencilBack` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuDepthStencilState`, `GpuStencilFaceState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "stencilBack")] - fn set_stencil_back(this: &GpuDepthStencilState, val: &GpuStencilFaceState); + pub fn set_stencil_back(this: &GpuDepthStencilState, val: &GpuStencilFaceState); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuStencilFaceState")] #[doc = "Get the `stencilFront` field of this object."] @@ -107,9 +156,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "stencilFront")] pub fn get_stencil_front(this: &GpuDepthStencilState) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuStencilFaceState")] + #[doc = "Change the `stencilFront` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuDepthStencilState`, `GpuStencilFaceState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "stencilFront")] - fn set_stencil_front(this: &GpuDepthStencilState, val: &GpuStencilFaceState); + pub fn set_stencil_front(this: &GpuDepthStencilState, val: &GpuStencilFaceState); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `stencilReadMask` field of this object."] #[doc = ""] @@ -119,8 +175,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "stencilReadMask")] pub fn get_stencil_read_mask(this: &GpuDepthStencilState) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `stencilReadMask` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuDepthStencilState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "stencilReadMask")] - fn set_stencil_read_mask(this: &GpuDepthStencilState, val: u32); + pub fn set_stencil_read_mask(this: &GpuDepthStencilState, val: u32); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `stencilWriteMask` field of this object."] #[doc = ""] @@ -130,8 +193,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "stencilWriteMask")] pub fn get_stencil_write_mask(this: &GpuDepthStencilState) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `stencilWriteMask` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuDepthStencilState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "stencilWriteMask")] - fn set_stencil_write_mask(this: &GpuDepthStencilState, val: u32); + pub fn set_stencil_write_mask(this: &GpuDepthStencilState, val: u32); } #[cfg(web_sys_unstable_apis)] impl GpuDepthStencilState { @@ -149,115 +219,65 @@ impl GpuDepthStencilState { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `depthBias` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuDepthStencilState`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_depth_bias()` instead."] pub fn depth_bias(&mut self, val: i32) -> &mut Self { self.set_depth_bias(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `depthBiasClamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuDepthStencilState`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_depth_bias_clamp()` instead."] pub fn depth_bias_clamp(&mut self, val: f32) -> &mut Self { self.set_depth_bias_clamp(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `depthBiasSlopeScale` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuDepthStencilState`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_depth_bias_slope_scale()` instead."] pub fn depth_bias_slope_scale(&mut self, val: f32) -> &mut Self { self.set_depth_bias_slope_scale(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuCompareFunction")] - #[doc = "Change the `depthCompare` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuCompareFunction`, `GpuDepthStencilState`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_depth_compare()` instead."] pub fn depth_compare(&mut self, val: GpuCompareFunction) -> &mut Self { self.set_depth_compare(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `depthWriteEnabled` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuDepthStencilState`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_depth_write_enabled()` instead."] pub fn depth_write_enabled(&mut self, val: bool) -> &mut Self { self.set_depth_write_enabled(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureFormat")] - #[doc = "Change the `format` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuDepthStencilState`, `GpuTextureFormat`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_format()` instead."] pub fn format(&mut self, val: GpuTextureFormat) -> &mut Self { self.set_format(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuStencilFaceState")] - #[doc = "Change the `stencilBack` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuDepthStencilState`, `GpuStencilFaceState`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_stencil_back()` instead."] pub fn stencil_back(&mut self, val: &GpuStencilFaceState) -> &mut Self { self.set_stencil_back(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuStencilFaceState")] - #[doc = "Change the `stencilFront` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuDepthStencilState`, `GpuStencilFaceState`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_stencil_front()` instead."] pub fn stencil_front(&mut self, val: &GpuStencilFaceState) -> &mut Self { self.set_stencil_front(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `stencilReadMask` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuDepthStencilState`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_stencil_read_mask()` instead."] pub fn stencil_read_mask(&mut self, val: u32) -> &mut Self { self.set_stencil_read_mask(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `stencilWriteMask` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuDepthStencilState`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_stencil_write_mask()` instead."] pub fn stencil_write_mask(&mut self, val: u32) -> &mut Self { self.set_stencil_write_mask(val); self diff --git a/crates/web-sys/src/features/gen_GpuDeviceDescriptor.rs b/crates/web-sys/src/features/gen_GpuDeviceDescriptor.rs index 69301173a508..02166f68a81a 100644 --- a/crates/web-sys/src/features/gen_GpuDeviceDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuDeviceDescriptor.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "label")] pub fn get_label(this: &GpuDeviceDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuDeviceDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "label")] - fn set_label(this: &GpuDeviceDescriptor, val: &str); + pub fn set_label(this: &GpuDeviceDescriptor, val: &str); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuQueueDescriptor")] #[doc = "Get the `defaultQueue` field of this object."] @@ -35,9 +42,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "defaultQueue")] pub fn get_default_queue(this: &GpuDeviceDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuQueueDescriptor")] + #[doc = "Change the `defaultQueue` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuDeviceDescriptor`, `GpuQueueDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "defaultQueue")] - fn set_default_queue(this: &GpuDeviceDescriptor, val: &GpuQueueDescriptor); + pub fn set_default_queue(this: &GpuDeviceDescriptor, val: &GpuQueueDescriptor); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `requiredFeatures` field of this object."] #[doc = ""] @@ -47,8 +61,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "requiredFeatures")] pub fn get_required_features(this: &GpuDeviceDescriptor) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `requiredFeatures` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuDeviceDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "requiredFeatures")] - fn set_required_features(this: &GpuDeviceDescriptor, val: &::wasm_bindgen::JsValue); + pub fn set_required_features(this: &GpuDeviceDescriptor, val: &::wasm_bindgen::JsValue); } #[cfg(web_sys_unstable_apis)] impl GpuDeviceDescriptor { @@ -64,35 +85,20 @@ impl GpuDeviceDescriptor { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `label` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuDeviceDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_label()` instead."] pub fn label(&mut self, val: &str) -> &mut Self { self.set_label(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuQueueDescriptor")] - #[doc = "Change the `defaultQueue` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuDeviceDescriptor`, `GpuQueueDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_default_queue()` instead."] pub fn default_queue(&mut self, val: &GpuQueueDescriptor) -> &mut Self { self.set_default_queue(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `requiredFeatures` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuDeviceDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_required_features()` instead."] pub fn required_features(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_required_features(val); self diff --git a/crates/web-sys/src/features/gen_GpuExtent3dDict.rs b/crates/web-sys/src/features/gen_GpuExtent3dDict.rs index 4e9e82442514..afe482f277c7 100644 --- a/crates/web-sys/src/features/gen_GpuExtent3dDict.rs +++ b/crates/web-sys/src/features/gen_GpuExtent3dDict.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "depthOrArrayLayers")] pub fn get_depth_or_array_layers(this: &GpuExtent3dDict) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `depthOrArrayLayers` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuExtent3dDict`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "depthOrArrayLayers")] - fn set_depth_or_array_layers(this: &GpuExtent3dDict, val: u32); + pub fn set_depth_or_array_layers(this: &GpuExtent3dDict, val: u32); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `height` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "height")] pub fn get_height(this: &GpuExtent3dDict) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `height` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuExtent3dDict`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "height")] - fn set_height(this: &GpuExtent3dDict, val: u32); + pub fn set_height(this: &GpuExtent3dDict, val: u32); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `width` field of this object."] #[doc = ""] @@ -45,8 +59,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "width")] pub fn get_width(this: &GpuExtent3dDict) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `width` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuExtent3dDict`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "width")] - fn set_width(this: &GpuExtent3dDict, val: u32); + pub fn set_width(this: &GpuExtent3dDict, val: u32); } #[cfg(web_sys_unstable_apis)] impl GpuExtent3dDict { @@ -63,34 +84,19 @@ impl GpuExtent3dDict { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `depthOrArrayLayers` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuExtent3dDict`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_depth_or_array_layers()` instead."] pub fn depth_or_array_layers(&mut self, val: u32) -> &mut Self { self.set_depth_or_array_layers(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `height` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuExtent3dDict`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_height()` instead."] pub fn height(&mut self, val: u32) -> &mut Self { self.set_height(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `width` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuExtent3dDict`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_width()` instead."] pub fn width(&mut self, val: u32) -> &mut Self { self.set_width(val); self diff --git a/crates/web-sys/src/features/gen_GpuExternalTextureDescriptor.rs b/crates/web-sys/src/features/gen_GpuExternalTextureDescriptor.rs index 5b5c57317804..913093af5c6f 100644 --- a/crates/web-sys/src/features/gen_GpuExternalTextureDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuExternalTextureDescriptor.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "label")] pub fn get_label(this: &GpuExternalTextureDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuExternalTextureDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "label")] - fn set_label(this: &GpuExternalTextureDescriptor, val: &str); + pub fn set_label(this: &GpuExternalTextureDescriptor, val: &str); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `source` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "source")] pub fn get_source(this: &GpuExternalTextureDescriptor) -> ::js_sys::Object; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `source` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuExternalTextureDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "source")] - fn set_source(this: &GpuExternalTextureDescriptor, val: &::js_sys::Object); + pub fn set_source(this: &GpuExternalTextureDescriptor, val: &::js_sys::Object); } #[cfg(web_sys_unstable_apis)] impl GpuExternalTextureDescriptor { @@ -52,23 +66,13 @@ impl GpuExternalTextureDescriptor { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `label` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuExternalTextureDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_label()` instead."] pub fn label(&mut self, val: &str) -> &mut Self { self.set_label(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `source` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuExternalTextureDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_source()` instead."] pub fn source(&mut self, val: &::js_sys::Object) -> &mut Self { self.set_source(val); self diff --git a/crates/web-sys/src/features/gen_GpuFragmentState.rs b/crates/web-sys/src/features/gen_GpuFragmentState.rs index 91cde4ef5dd2..33c1059e5849 100644 --- a/crates/web-sys/src/features/gen_GpuFragmentState.rs +++ b/crates/web-sys/src/features/gen_GpuFragmentState.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "entryPoint")] pub fn get_entry_point(this: &GpuFragmentState) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `entryPoint` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuFragmentState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "entryPoint")] - fn set_entry_point(this: &GpuFragmentState, val: &str); + pub fn set_entry_point(this: &GpuFragmentState, val: &str); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuShaderModule")] #[doc = "Get the `module` field of this object."] @@ -35,9 +42,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "module")] pub fn get_module(this: &GpuFragmentState) -> GpuShaderModule; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuShaderModule")] + #[doc = "Change the `module` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuFragmentState`, `GpuShaderModule`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "module")] - fn set_module(this: &GpuFragmentState, val: &GpuShaderModule); + pub fn set_module(this: &GpuFragmentState, val: &GpuShaderModule); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `targets` field of this object."] #[doc = ""] @@ -47,8 +61,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "targets")] pub fn get_targets(this: &GpuFragmentState) -> ::js_sys::Array; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `targets` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuFragmentState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "targets")] - fn set_targets(this: &GpuFragmentState, val: &::wasm_bindgen::JsValue); + pub fn set_targets(this: &GpuFragmentState, val: &::wasm_bindgen::JsValue); } #[cfg(web_sys_unstable_apis)] impl GpuFragmentState { @@ -67,35 +88,20 @@ impl GpuFragmentState { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `entryPoint` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuFragmentState`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_entry_point()` instead."] pub fn entry_point(&mut self, val: &str) -> &mut Self { self.set_entry_point(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuShaderModule")] - #[doc = "Change the `module` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuFragmentState`, `GpuShaderModule`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_module()` instead."] pub fn module(&mut self, val: &GpuShaderModule) -> &mut Self { self.set_module(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `targets` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuFragmentState`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_targets()` instead."] pub fn targets(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_targets(val); self diff --git a/crates/web-sys/src/features/gen_GpuImageCopyBuffer.rs b/crates/web-sys/src/features/gen_GpuImageCopyBuffer.rs index 858ea9c21432..153b4004980e 100644 --- a/crates/web-sys/src/features/gen_GpuImageCopyBuffer.rs +++ b/crates/web-sys/src/features/gen_GpuImageCopyBuffer.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "bytesPerRow")] pub fn get_bytes_per_row(this: &GpuImageCopyBuffer) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `bytesPerRow` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyBuffer`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "bytesPerRow")] - fn set_bytes_per_row(this: &GpuImageCopyBuffer, val: u32); + pub fn set_bytes_per_row(this: &GpuImageCopyBuffer, val: u32); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `offset` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "offset")] pub fn get_offset(this: &GpuImageCopyBuffer) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `offset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyBuffer`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "offset")] - fn set_offset(this: &GpuImageCopyBuffer, val: f64); + pub fn set_offset(this: &GpuImageCopyBuffer, val: f64); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `rowsPerImage` field of this object."] #[doc = ""] @@ -45,8 +59,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "rowsPerImage")] pub fn get_rows_per_image(this: &GpuImageCopyBuffer) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `rowsPerImage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyBuffer`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "rowsPerImage")] - fn set_rows_per_image(this: &GpuImageCopyBuffer, val: u32); + pub fn set_rows_per_image(this: &GpuImageCopyBuffer, val: u32); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuBuffer")] #[doc = "Get the `buffer` field of this object."] @@ -57,9 +78,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "buffer")] pub fn get_buffer(this: &GpuImageCopyBuffer) -> GpuBuffer; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuBuffer")] + #[doc = "Change the `buffer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBuffer`, `GpuImageCopyBuffer`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "buffer")] - fn set_buffer(this: &GpuImageCopyBuffer, val: &GpuBuffer); + pub fn set_buffer(this: &GpuImageCopyBuffer, val: &GpuBuffer); } #[cfg(web_sys_unstable_apis)] impl GpuImageCopyBuffer { @@ -77,46 +105,26 @@ impl GpuImageCopyBuffer { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `bytesPerRow` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyBuffer`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_bytes_per_row()` instead."] pub fn bytes_per_row(&mut self, val: u32) -> &mut Self { self.set_bytes_per_row(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `offset` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyBuffer`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_offset()` instead."] pub fn offset(&mut self, val: f64) -> &mut Self { self.set_offset(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `rowsPerImage` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyBuffer`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_rows_per_image()` instead."] pub fn rows_per_image(&mut self, val: u32) -> &mut Self { self.set_rows_per_image(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuBuffer")] - #[doc = "Change the `buffer` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBuffer`, `GpuImageCopyBuffer`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_buffer()` instead."] pub fn buffer(&mut self, val: &GpuBuffer) -> &mut Self { self.set_buffer(val); self diff --git a/crates/web-sys/src/features/gen_GpuImageCopyExternalImage.rs b/crates/web-sys/src/features/gen_GpuImageCopyExternalImage.rs index 8896dde24524..c471c1547578 100644 --- a/crates/web-sys/src/features/gen_GpuImageCopyExternalImage.rs +++ b/crates/web-sys/src/features/gen_GpuImageCopyExternalImage.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "flipY")] pub fn get_flip_y(this: &GpuImageCopyExternalImage) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `flipY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyExternalImage`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "flipY")] - fn set_flip_y(this: &GpuImageCopyExternalImage, val: bool); + pub fn set_flip_y(this: &GpuImageCopyExternalImage, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `origin` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "origin")] pub fn get_origin(this: &GpuImageCopyExternalImage) -> ::wasm_bindgen::JsValue; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `origin` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyExternalImage`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "origin")] - fn set_origin(this: &GpuImageCopyExternalImage, val: &::wasm_bindgen::JsValue); + pub fn set_origin(this: &GpuImageCopyExternalImage, val: &::wasm_bindgen::JsValue); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `source` field of this object."] #[doc = ""] @@ -45,8 +59,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "source")] pub fn get_source(this: &GpuImageCopyExternalImage) -> ::js_sys::Object; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `source` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyExternalImage`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "source")] - fn set_source(this: &GpuImageCopyExternalImage, val: &::js_sys::Object); + pub fn set_source(this: &GpuImageCopyExternalImage, val: &::js_sys::Object); } #[cfg(web_sys_unstable_apis)] impl GpuImageCopyExternalImage { @@ -63,34 +84,19 @@ impl GpuImageCopyExternalImage { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `flipY` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyExternalImage`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_flip_y()` instead."] pub fn flip_y(&mut self, val: bool) -> &mut Self { self.set_flip_y(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `origin` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyExternalImage`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_origin()` instead."] pub fn origin(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_origin(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `source` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyExternalImage`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_source()` instead."] pub fn source(&mut self, val: &::js_sys::Object) -> &mut Self { self.set_source(val); self diff --git a/crates/web-sys/src/features/gen_GpuImageCopyTexture.rs b/crates/web-sys/src/features/gen_GpuImageCopyTexture.rs index f4d9206f87ce..96b81683bf30 100644 --- a/crates/web-sys/src/features/gen_GpuImageCopyTexture.rs +++ b/crates/web-sys/src/features/gen_GpuImageCopyTexture.rs @@ -24,9 +24,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "aspect")] pub fn get_aspect(this: &GpuImageCopyTexture) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureAspect")] + #[doc = "Change the `aspect` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTexture`, `GpuTextureAspect`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "aspect")] - fn set_aspect(this: &GpuImageCopyTexture, val: GpuTextureAspect); + pub fn set_aspect(this: &GpuImageCopyTexture, val: GpuTextureAspect); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `mipLevel` field of this object."] #[doc = ""] @@ -36,8 +43,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "mipLevel")] pub fn get_mip_level(this: &GpuImageCopyTexture) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `mipLevel` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTexture`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "mipLevel")] - fn set_mip_level(this: &GpuImageCopyTexture, val: u32); + pub fn set_mip_level(this: &GpuImageCopyTexture, val: u32); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `origin` field of this object."] #[doc = ""] @@ -47,8 +61,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "origin")] pub fn get_origin(this: &GpuImageCopyTexture) -> ::wasm_bindgen::JsValue; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `origin` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTexture`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "origin")] - fn set_origin(this: &GpuImageCopyTexture, val: &::wasm_bindgen::JsValue); + pub fn set_origin(this: &GpuImageCopyTexture, val: &::wasm_bindgen::JsValue); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTexture")] #[doc = "Get the `texture` field of this object."] @@ -59,9 +80,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "texture")] pub fn get_texture(this: &GpuImageCopyTexture) -> GpuTexture; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTexture")] + #[doc = "Change the `texture` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTexture`, `GpuTexture`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "texture")] - fn set_texture(this: &GpuImageCopyTexture, val: &GpuTexture); + pub fn set_texture(this: &GpuImageCopyTexture, val: &GpuTexture); } #[cfg(web_sys_unstable_apis)] impl GpuImageCopyTexture { @@ -80,46 +108,26 @@ impl GpuImageCopyTexture { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureAspect")] - #[doc = "Change the `aspect` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTexture`, `GpuTextureAspect`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_aspect()` instead."] pub fn aspect(&mut self, val: GpuTextureAspect) -> &mut Self { self.set_aspect(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `mipLevel` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTexture`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_mip_level()` instead."] pub fn mip_level(&mut self, val: u32) -> &mut Self { self.set_mip_level(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `origin` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTexture`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_origin()` instead."] pub fn origin(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_origin(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTexture")] - #[doc = "Change the `texture` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTexture`, `GpuTexture`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_texture()` instead."] pub fn texture(&mut self, val: &GpuTexture) -> &mut Self { self.set_texture(val); self diff --git a/crates/web-sys/src/features/gen_GpuImageCopyTextureTagged.rs b/crates/web-sys/src/features/gen_GpuImageCopyTextureTagged.rs index 186622f41c10..d0cc4179b3b8 100644 --- a/crates/web-sys/src/features/gen_GpuImageCopyTextureTagged.rs +++ b/crates/web-sys/src/features/gen_GpuImageCopyTextureTagged.rs @@ -24,9 +24,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "aspect")] pub fn get_aspect(this: &GpuImageCopyTextureTagged) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureAspect")] + #[doc = "Change the `aspect` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTextureTagged`, `GpuTextureAspect`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "aspect")] - fn set_aspect(this: &GpuImageCopyTextureTagged, val: GpuTextureAspect); + pub fn set_aspect(this: &GpuImageCopyTextureTagged, val: GpuTextureAspect); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `mipLevel` field of this object."] #[doc = ""] @@ -36,8 +43,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "mipLevel")] pub fn get_mip_level(this: &GpuImageCopyTextureTagged) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `mipLevel` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTextureTagged`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "mipLevel")] - fn set_mip_level(this: &GpuImageCopyTextureTagged, val: u32); + pub fn set_mip_level(this: &GpuImageCopyTextureTagged, val: u32); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `origin` field of this object."] #[doc = ""] @@ -47,8 +61,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "origin")] pub fn get_origin(this: &GpuImageCopyTextureTagged) -> ::wasm_bindgen::JsValue; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `origin` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTextureTagged`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "origin")] - fn set_origin(this: &GpuImageCopyTextureTagged, val: &::wasm_bindgen::JsValue); + pub fn set_origin(this: &GpuImageCopyTextureTagged, val: &::wasm_bindgen::JsValue); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTexture")] #[doc = "Get the `texture` field of this object."] @@ -59,9 +80,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "texture")] pub fn get_texture(this: &GpuImageCopyTextureTagged) -> GpuTexture; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTexture")] + #[doc = "Change the `texture` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTextureTagged`, `GpuTexture`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "texture")] - fn set_texture(this: &GpuImageCopyTextureTagged, val: &GpuTexture); + pub fn set_texture(this: &GpuImageCopyTextureTagged, val: &GpuTexture); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `premultipliedAlpha` field of this object."] #[doc = ""] @@ -71,8 +99,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "premultipliedAlpha")] pub fn get_premultiplied_alpha(this: &GpuImageCopyTextureTagged) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `premultipliedAlpha` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTextureTagged`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "premultipliedAlpha")] - fn set_premultiplied_alpha(this: &GpuImageCopyTextureTagged, val: bool); + pub fn set_premultiplied_alpha(this: &GpuImageCopyTextureTagged, val: bool); } #[cfg(web_sys_unstable_apis)] impl GpuImageCopyTextureTagged { @@ -91,57 +126,32 @@ impl GpuImageCopyTextureTagged { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureAspect")] - #[doc = "Change the `aspect` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTextureTagged`, `GpuTextureAspect`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_aspect()` instead."] pub fn aspect(&mut self, val: GpuTextureAspect) -> &mut Self { self.set_aspect(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `mipLevel` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTextureTagged`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_mip_level()` instead."] pub fn mip_level(&mut self, val: u32) -> &mut Self { self.set_mip_level(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `origin` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTextureTagged`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_origin()` instead."] pub fn origin(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_origin(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTexture")] - #[doc = "Change the `texture` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTextureTagged`, `GpuTexture`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_texture()` instead."] pub fn texture(&mut self, val: &GpuTexture) -> &mut Self { self.set_texture(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `premultipliedAlpha` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTextureTagged`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_premultiplied_alpha()` instead."] pub fn premultiplied_alpha(&mut self, val: bool) -> &mut Self { self.set_premultiplied_alpha(val); self diff --git a/crates/web-sys/src/features/gen_GpuImageDataLayout.rs b/crates/web-sys/src/features/gen_GpuImageDataLayout.rs index 1a7d98723fe6..c0ecc7018354 100644 --- a/crates/web-sys/src/features/gen_GpuImageDataLayout.rs +++ b/crates/web-sys/src/features/gen_GpuImageDataLayout.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "bytesPerRow")] pub fn get_bytes_per_row(this: &GpuImageDataLayout) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `bytesPerRow` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageDataLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "bytesPerRow")] - fn set_bytes_per_row(this: &GpuImageDataLayout, val: u32); + pub fn set_bytes_per_row(this: &GpuImageDataLayout, val: u32); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `offset` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "offset")] pub fn get_offset(this: &GpuImageDataLayout) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `offset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageDataLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "offset")] - fn set_offset(this: &GpuImageDataLayout, val: f64); + pub fn set_offset(this: &GpuImageDataLayout, val: f64); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `rowsPerImage` field of this object."] #[doc = ""] @@ -45,8 +59,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "rowsPerImage")] pub fn get_rows_per_image(this: &GpuImageDataLayout) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `rowsPerImage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageDataLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "rowsPerImage")] - fn set_rows_per_image(this: &GpuImageDataLayout, val: u32); + pub fn set_rows_per_image(this: &GpuImageDataLayout, val: u32); } #[cfg(web_sys_unstable_apis)] impl GpuImageDataLayout { @@ -62,34 +83,19 @@ impl GpuImageDataLayout { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `bytesPerRow` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuImageDataLayout`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_bytes_per_row()` instead."] pub fn bytes_per_row(&mut self, val: u32) -> &mut Self { self.set_bytes_per_row(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `offset` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuImageDataLayout`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_offset()` instead."] pub fn offset(&mut self, val: f64) -> &mut Self { self.set_offset(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `rowsPerImage` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuImageDataLayout`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_rows_per_image()` instead."] pub fn rows_per_image(&mut self, val: u32) -> &mut Self { self.set_rows_per_image(val); self diff --git a/crates/web-sys/src/features/gen_GpuMultisampleState.rs b/crates/web-sys/src/features/gen_GpuMultisampleState.rs index e0528c3d366d..7c969efbd9e2 100644 --- a/crates/web-sys/src/features/gen_GpuMultisampleState.rs +++ b/crates/web-sys/src/features/gen_GpuMultisampleState.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "alphaToCoverageEnabled")] pub fn get_alpha_to_coverage_enabled(this: &GpuMultisampleState) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `alphaToCoverageEnabled` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuMultisampleState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "alphaToCoverageEnabled")] - fn set_alpha_to_coverage_enabled(this: &GpuMultisampleState, val: bool); + pub fn set_alpha_to_coverage_enabled(this: &GpuMultisampleState, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `count` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "count")] pub fn get_count(this: &GpuMultisampleState) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `count` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuMultisampleState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "count")] - fn set_count(this: &GpuMultisampleState, val: u32); + pub fn set_count(this: &GpuMultisampleState, val: u32); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `mask` field of this object."] #[doc = ""] @@ -45,8 +59,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "mask")] pub fn get_mask(this: &GpuMultisampleState) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `mask` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuMultisampleState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "mask")] - fn set_mask(this: &GpuMultisampleState, val: u32); + pub fn set_mask(this: &GpuMultisampleState, val: u32); } #[cfg(web_sys_unstable_apis)] impl GpuMultisampleState { @@ -62,34 +83,19 @@ impl GpuMultisampleState { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `alphaToCoverageEnabled` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuMultisampleState`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_alpha_to_coverage_enabled()` instead."] pub fn alpha_to_coverage_enabled(&mut self, val: bool) -> &mut Self { self.set_alpha_to_coverage_enabled(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `count` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuMultisampleState`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_count()` instead."] pub fn count(&mut self, val: u32) -> &mut Self { self.set_count(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `mask` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuMultisampleState`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_mask()` instead."] pub fn mask(&mut self, val: u32) -> &mut Self { self.set_mask(val); self diff --git a/crates/web-sys/src/features/gen_GpuObjectDescriptorBase.rs b/crates/web-sys/src/features/gen_GpuObjectDescriptorBase.rs index 267d37c04f2e..37e3d9fa7b03 100644 --- a/crates/web-sys/src/features/gen_GpuObjectDescriptorBase.rs +++ b/crates/web-sys/src/features/gen_GpuObjectDescriptorBase.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "label")] pub fn get_label(this: &GpuObjectDescriptorBase) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuObjectDescriptorBase`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "label")] - fn set_label(this: &GpuObjectDescriptorBase, val: &str); + pub fn set_label(this: &GpuObjectDescriptorBase, val: &str); } #[cfg(web_sys_unstable_apis)] impl GpuObjectDescriptorBase { @@ -40,12 +47,7 @@ impl GpuObjectDescriptorBase { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `label` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuObjectDescriptorBase`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_label()` instead."] pub fn label(&mut self, val: &str) -> &mut Self { self.set_label(val); self diff --git a/crates/web-sys/src/features/gen_GpuOrigin2dDict.rs b/crates/web-sys/src/features/gen_GpuOrigin2dDict.rs index 515fb3742152..a0732ec3fb60 100644 --- a/crates/web-sys/src/features/gen_GpuOrigin2dDict.rs +++ b/crates/web-sys/src/features/gen_GpuOrigin2dDict.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "x")] pub fn get_x(this: &GpuOrigin2dDict) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `x` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuOrigin2dDict`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "x")] - fn set_x(this: &GpuOrigin2dDict, val: u32); + pub fn set_x(this: &GpuOrigin2dDict, val: u32); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `y` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "y")] pub fn get_y(this: &GpuOrigin2dDict) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `y` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuOrigin2dDict`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "y")] - fn set_y(this: &GpuOrigin2dDict, val: u32); + pub fn set_y(this: &GpuOrigin2dDict, val: u32); } #[cfg(web_sys_unstable_apis)] impl GpuOrigin2dDict { @@ -51,23 +65,13 @@ impl GpuOrigin2dDict { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `x` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuOrigin2dDict`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_x()` instead."] pub fn x(&mut self, val: u32) -> &mut Self { self.set_x(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `y` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuOrigin2dDict`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_y()` instead."] pub fn y(&mut self, val: u32) -> &mut Self { self.set_y(val); self diff --git a/crates/web-sys/src/features/gen_GpuOrigin3dDict.rs b/crates/web-sys/src/features/gen_GpuOrigin3dDict.rs index 216e4d52159b..a14679d2d605 100644 --- a/crates/web-sys/src/features/gen_GpuOrigin3dDict.rs +++ b/crates/web-sys/src/features/gen_GpuOrigin3dDict.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "x")] pub fn get_x(this: &GpuOrigin3dDict) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `x` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuOrigin3dDict`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "x")] - fn set_x(this: &GpuOrigin3dDict, val: u32); + pub fn set_x(this: &GpuOrigin3dDict, val: u32); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `y` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "y")] pub fn get_y(this: &GpuOrigin3dDict) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `y` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuOrigin3dDict`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "y")] - fn set_y(this: &GpuOrigin3dDict, val: u32); + pub fn set_y(this: &GpuOrigin3dDict, val: u32); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `z` field of this object."] #[doc = ""] @@ -45,8 +59,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "z")] pub fn get_z(this: &GpuOrigin3dDict) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `z` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuOrigin3dDict`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "z")] - fn set_z(this: &GpuOrigin3dDict, val: u32); + pub fn set_z(this: &GpuOrigin3dDict, val: u32); } #[cfg(web_sys_unstable_apis)] impl GpuOrigin3dDict { @@ -62,34 +83,19 @@ impl GpuOrigin3dDict { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `x` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuOrigin3dDict`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_x()` instead."] pub fn x(&mut self, val: u32) -> &mut Self { self.set_x(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `y` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuOrigin3dDict`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_y()` instead."] pub fn y(&mut self, val: u32) -> &mut Self { self.set_y(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `z` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuOrigin3dDict`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_z()` instead."] pub fn z(&mut self, val: u32) -> &mut Self { self.set_z(val); self diff --git a/crates/web-sys/src/features/gen_GpuPipelineDescriptorBase.rs b/crates/web-sys/src/features/gen_GpuPipelineDescriptorBase.rs index ebb39ebe2f1c..05a2206a33ca 100644 --- a/crates/web-sys/src/features/gen_GpuPipelineDescriptorBase.rs +++ b/crates/web-sys/src/features/gen_GpuPipelineDescriptorBase.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "label")] pub fn get_label(this: &GpuPipelineDescriptorBase) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuPipelineDescriptorBase`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "label")] - fn set_label(this: &GpuPipelineDescriptorBase, val: &str); + pub fn set_label(this: &GpuPipelineDescriptorBase, val: &str); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `layout` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "layout")] pub fn get_layout(this: &GpuPipelineDescriptorBase) -> ::wasm_bindgen::JsValue; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `layout` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuPipelineDescriptorBase`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "layout")] - fn set_layout(this: &GpuPipelineDescriptorBase, val: &::wasm_bindgen::JsValue); + pub fn set_layout(this: &GpuPipelineDescriptorBase, val: &::wasm_bindgen::JsValue); } #[cfg(web_sys_unstable_apis)] impl GpuPipelineDescriptorBase { @@ -52,23 +66,13 @@ impl GpuPipelineDescriptorBase { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `label` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuPipelineDescriptorBase`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_label()` instead."] pub fn label(&mut self, val: &str) -> &mut Self { self.set_label(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `layout` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuPipelineDescriptorBase`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_layout()` instead."] pub fn layout(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_layout(val); self diff --git a/crates/web-sys/src/features/gen_GpuPipelineErrorInit.rs b/crates/web-sys/src/features/gen_GpuPipelineErrorInit.rs index 734ba66c4b96..cc70a2d13867 100644 --- a/crates/web-sys/src/features/gen_GpuPipelineErrorInit.rs +++ b/crates/web-sys/src/features/gen_GpuPipelineErrorInit.rs @@ -24,9 +24,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "reason")] pub fn get_reason(this: &GpuPipelineErrorInit) -> GpuPipelineErrorReason; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuPipelineErrorReason")] + #[doc = "Change the `reason` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuPipelineErrorInit`, `GpuPipelineErrorReason`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "reason")] - fn set_reason(this: &GpuPipelineErrorInit, val: GpuPipelineErrorReason); + pub fn set_reason(this: &GpuPipelineErrorInit, val: GpuPipelineErrorReason); } #[cfg(web_sys_unstable_apis)] impl GpuPipelineErrorInit { @@ -45,12 +52,7 @@ impl GpuPipelineErrorInit { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuPipelineErrorReason")] - #[doc = "Change the `reason` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuPipelineErrorInit`, `GpuPipelineErrorReason`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_reason()` instead."] pub fn reason(&mut self, val: GpuPipelineErrorReason) -> &mut Self { self.set_reason(val); self diff --git a/crates/web-sys/src/features/gen_GpuPipelineLayoutDescriptor.rs b/crates/web-sys/src/features/gen_GpuPipelineLayoutDescriptor.rs index 0a2db3c87ecb..cff6b220139d 100644 --- a/crates/web-sys/src/features/gen_GpuPipelineLayoutDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuPipelineLayoutDescriptor.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "label")] pub fn get_label(this: &GpuPipelineLayoutDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuPipelineLayoutDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "label")] - fn set_label(this: &GpuPipelineLayoutDescriptor, val: &str); + pub fn set_label(this: &GpuPipelineLayoutDescriptor, val: &str); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `bindGroupLayouts` field of this object."] #[doc = ""] @@ -34,8 +41,18 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "bindGroupLayouts")] pub fn get_bind_group_layouts(this: &GpuPipelineLayoutDescriptor) -> ::js_sys::Array; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `bindGroupLayouts` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuPipelineLayoutDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "bindGroupLayouts")] - fn set_bind_group_layouts(this: &GpuPipelineLayoutDescriptor, val: &::wasm_bindgen::JsValue); + pub fn set_bind_group_layouts( + this: &GpuPipelineLayoutDescriptor, + val: &::wasm_bindgen::JsValue, + ); } #[cfg(web_sys_unstable_apis)] impl GpuPipelineLayoutDescriptor { @@ -52,23 +69,13 @@ impl GpuPipelineLayoutDescriptor { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `label` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuPipelineLayoutDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_label()` instead."] pub fn label(&mut self, val: &str) -> &mut Self { self.set_label(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `bindGroupLayouts` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuPipelineLayoutDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_bind_group_layouts()` instead."] pub fn bind_group_layouts(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_bind_group_layouts(val); self diff --git a/crates/web-sys/src/features/gen_GpuPrimitiveState.rs b/crates/web-sys/src/features/gen_GpuPrimitiveState.rs index 0d0ec3b97271..aae66b1cde7d 100644 --- a/crates/web-sys/src/features/gen_GpuPrimitiveState.rs +++ b/crates/web-sys/src/features/gen_GpuPrimitiveState.rs @@ -24,9 +24,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "cullMode")] pub fn get_cull_mode(this: &GpuPrimitiveState) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuCullMode")] + #[doc = "Change the `cullMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuCullMode`, `GpuPrimitiveState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "cullMode")] - fn set_cull_mode(this: &GpuPrimitiveState, val: GpuCullMode); + pub fn set_cull_mode(this: &GpuPrimitiveState, val: GpuCullMode); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuFrontFace")] #[doc = "Get the `frontFace` field of this object."] @@ -37,9 +44,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "frontFace")] pub fn get_front_face(this: &GpuPrimitiveState) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuFrontFace")] + #[doc = "Change the `frontFace` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuFrontFace`, `GpuPrimitiveState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "frontFace")] - fn set_front_face(this: &GpuPrimitiveState, val: GpuFrontFace); + pub fn set_front_face(this: &GpuPrimitiveState, val: GpuFrontFace); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuIndexFormat")] #[doc = "Get the `stripIndexFormat` field of this object."] @@ -50,9 +64,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "stripIndexFormat")] pub fn get_strip_index_format(this: &GpuPrimitiveState) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuIndexFormat")] + #[doc = "Change the `stripIndexFormat` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuIndexFormat`, `GpuPrimitiveState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "stripIndexFormat")] - fn set_strip_index_format(this: &GpuPrimitiveState, val: GpuIndexFormat); + pub fn set_strip_index_format(this: &GpuPrimitiveState, val: GpuIndexFormat); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuPrimitiveTopology")] #[doc = "Get the `topology` field of this object."] @@ -63,9 +84,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "topology")] pub fn get_topology(this: &GpuPrimitiveState) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuPrimitiveTopology")] + #[doc = "Change the `topology` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuPrimitiveState`, `GpuPrimitiveTopology`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "topology")] - fn set_topology(this: &GpuPrimitiveState, val: GpuPrimitiveTopology); + pub fn set_topology(this: &GpuPrimitiveState, val: GpuPrimitiveTopology); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `unclippedDepth` field of this object."] #[doc = ""] @@ -75,8 +103,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "unclippedDepth")] pub fn get_unclipped_depth(this: &GpuPrimitiveState) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `unclippedDepth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuPrimitiveState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "unclippedDepth")] - fn set_unclipped_depth(this: &GpuPrimitiveState, val: bool); + pub fn set_unclipped_depth(this: &GpuPrimitiveState, val: bool); } #[cfg(web_sys_unstable_apis)] impl GpuPrimitiveState { @@ -93,59 +128,34 @@ impl GpuPrimitiveState { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuCullMode")] - #[doc = "Change the `cullMode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuCullMode`, `GpuPrimitiveState`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_cull_mode()` instead."] pub fn cull_mode(&mut self, val: GpuCullMode) -> &mut Self { self.set_cull_mode(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuFrontFace")] - #[doc = "Change the `frontFace` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuFrontFace`, `GpuPrimitiveState`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_front_face()` instead."] pub fn front_face(&mut self, val: GpuFrontFace) -> &mut Self { self.set_front_face(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuIndexFormat")] - #[doc = "Change the `stripIndexFormat` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuIndexFormat`, `GpuPrimitiveState`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_strip_index_format()` instead."] pub fn strip_index_format(&mut self, val: GpuIndexFormat) -> &mut Self { self.set_strip_index_format(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuPrimitiveTopology")] - #[doc = "Change the `topology` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuPrimitiveState`, `GpuPrimitiveTopology`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_topology()` instead."] pub fn topology(&mut self, val: GpuPrimitiveTopology) -> &mut Self { self.set_topology(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `unclippedDepth` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuPrimitiveState`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_unclipped_depth()` instead."] pub fn unclipped_depth(&mut self, val: bool) -> &mut Self { self.set_unclipped_depth(val); self diff --git a/crates/web-sys/src/features/gen_GpuProgrammableStage.rs b/crates/web-sys/src/features/gen_GpuProgrammableStage.rs index 357ac42289da..3f9292647646 100644 --- a/crates/web-sys/src/features/gen_GpuProgrammableStage.rs +++ b/crates/web-sys/src/features/gen_GpuProgrammableStage.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "entryPoint")] pub fn get_entry_point(this: &GpuProgrammableStage) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `entryPoint` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuProgrammableStage`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "entryPoint")] - fn set_entry_point(this: &GpuProgrammableStage, val: &str); + pub fn set_entry_point(this: &GpuProgrammableStage, val: &str); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuShaderModule")] #[doc = "Get the `module` field of this object."] @@ -35,9 +42,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "module")] pub fn get_module(this: &GpuProgrammableStage) -> GpuShaderModule; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuShaderModule")] + #[doc = "Change the `module` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuProgrammableStage`, `GpuShaderModule`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "module")] - fn set_module(this: &GpuProgrammableStage, val: &GpuShaderModule); + pub fn set_module(this: &GpuProgrammableStage, val: &GpuShaderModule); } #[cfg(web_sys_unstable_apis)] impl GpuProgrammableStage { @@ -55,24 +69,14 @@ impl GpuProgrammableStage { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `entryPoint` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuProgrammableStage`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_entry_point()` instead."] pub fn entry_point(&mut self, val: &str) -> &mut Self { self.set_entry_point(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuShaderModule")] - #[doc = "Change the `module` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuProgrammableStage`, `GpuShaderModule`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_module()` instead."] pub fn module(&mut self, val: &GpuShaderModule) -> &mut Self { self.set_module(val); self diff --git a/crates/web-sys/src/features/gen_GpuQuerySetDescriptor.rs b/crates/web-sys/src/features/gen_GpuQuerySetDescriptor.rs index c2a07378bd9e..36f3383a7e88 100644 --- a/crates/web-sys/src/features/gen_GpuQuerySetDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuQuerySetDescriptor.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "label")] pub fn get_label(this: &GpuQuerySetDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuQuerySetDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "label")] - fn set_label(this: &GpuQuerySetDescriptor, val: &str); + pub fn set_label(this: &GpuQuerySetDescriptor, val: &str); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `count` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "count")] pub fn get_count(this: &GpuQuerySetDescriptor) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `count` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuQuerySetDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "count")] - fn set_count(this: &GpuQuerySetDescriptor, val: u32); + pub fn set_count(this: &GpuQuerySetDescriptor, val: u32); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuQueryType")] #[doc = "Get the `type` field of this object."] @@ -46,9 +60,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "type")] pub fn get_type(this: &GpuQuerySetDescriptor) -> GpuQueryType; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuQueryType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuQuerySetDescriptor`, `GpuQueryType`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "type")] - fn set_type(this: &GpuQuerySetDescriptor, val: GpuQueryType); + pub fn set_type(this: &GpuQuerySetDescriptor, val: GpuQueryType); } #[cfg(web_sys_unstable_apis)] impl GpuQuerySetDescriptor { @@ -67,35 +88,20 @@ impl GpuQuerySetDescriptor { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `label` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuQuerySetDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_label()` instead."] pub fn label(&mut self, val: &str) -> &mut Self { self.set_label(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `count` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuQuerySetDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_count()` instead."] pub fn count(&mut self, val: u32) -> &mut Self { self.set_count(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuQueryType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuQuerySetDescriptor`, `GpuQueryType`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: GpuQueryType) -> &mut Self { self.set_type(val); self diff --git a/crates/web-sys/src/features/gen_GpuQueueDescriptor.rs b/crates/web-sys/src/features/gen_GpuQueueDescriptor.rs index 17353b2aa1e4..e07e624f8a55 100644 --- a/crates/web-sys/src/features/gen_GpuQueueDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuQueueDescriptor.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "label")] pub fn get_label(this: &GpuQueueDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuQueueDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "label")] - fn set_label(this: &GpuQueueDescriptor, val: &str); + pub fn set_label(this: &GpuQueueDescriptor, val: &str); } #[cfg(web_sys_unstable_apis)] impl GpuQueueDescriptor { @@ -40,12 +47,7 @@ impl GpuQueueDescriptor { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `label` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuQueueDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_label()` instead."] pub fn label(&mut self, val: &str) -> &mut Self { self.set_label(val); self diff --git a/crates/web-sys/src/features/gen_GpuRenderBundleDescriptor.rs b/crates/web-sys/src/features/gen_GpuRenderBundleDescriptor.rs index bb8d895f506b..a250f0fe19ff 100644 --- a/crates/web-sys/src/features/gen_GpuRenderBundleDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuRenderBundleDescriptor.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "label")] pub fn get_label(this: &GpuRenderBundleDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "label")] - fn set_label(this: &GpuRenderBundleDescriptor, val: &str); + pub fn set_label(this: &GpuRenderBundleDescriptor, val: &str); } #[cfg(web_sys_unstable_apis)] impl GpuRenderBundleDescriptor { @@ -40,12 +47,7 @@ impl GpuRenderBundleDescriptor { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `label` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_label()` instead."] pub fn label(&mut self, val: &str) -> &mut Self { self.set_label(val); self diff --git a/crates/web-sys/src/features/gen_GpuRenderBundleEncoderDescriptor.rs b/crates/web-sys/src/features/gen_GpuRenderBundleEncoderDescriptor.rs index a87e6eb5ac16..895ff703e514 100644 --- a/crates/web-sys/src/features/gen_GpuRenderBundleEncoderDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuRenderBundleEncoderDescriptor.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "label")] pub fn get_label(this: &GpuRenderBundleEncoderDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "label")] - fn set_label(this: &GpuRenderBundleEncoderDescriptor, val: &str); + pub fn set_label(this: &GpuRenderBundleEncoderDescriptor, val: &str); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `colorFormats` field of this object."] #[doc = ""] @@ -34,8 +41,18 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "colorFormats")] pub fn get_color_formats(this: &GpuRenderBundleEncoderDescriptor) -> ::js_sys::Array; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `colorFormats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "colorFormats")] - fn set_color_formats(this: &GpuRenderBundleEncoderDescriptor, val: &::wasm_bindgen::JsValue); + pub fn set_color_formats( + this: &GpuRenderBundleEncoderDescriptor, + val: &::wasm_bindgen::JsValue, + ); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureFormat")] #[doc = "Get the `depthStencilFormat` field of this object."] @@ -48,9 +65,16 @@ extern "C" { pub fn get_depth_stencil_format( this: &GpuRenderBundleEncoderDescriptor, ) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureFormat")] + #[doc = "Change the `depthStencilFormat` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`, `GpuTextureFormat`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "depthStencilFormat")] - fn set_depth_stencil_format(this: &GpuRenderBundleEncoderDescriptor, val: GpuTextureFormat); + pub fn set_depth_stencil_format(this: &GpuRenderBundleEncoderDescriptor, val: GpuTextureFormat); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `sampleCount` field of this object."] #[doc = ""] @@ -60,8 +84,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "sampleCount")] pub fn get_sample_count(this: &GpuRenderBundleEncoderDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `sampleCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "sampleCount")] - fn set_sample_count(this: &GpuRenderBundleEncoderDescriptor, val: u32); + pub fn set_sample_count(this: &GpuRenderBundleEncoderDescriptor, val: u32); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `depthReadOnly` field of this object."] #[doc = ""] @@ -71,8 +102,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "depthReadOnly")] pub fn get_depth_read_only(this: &GpuRenderBundleEncoderDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `depthReadOnly` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "depthReadOnly")] - fn set_depth_read_only(this: &GpuRenderBundleEncoderDescriptor, val: bool); + pub fn set_depth_read_only(this: &GpuRenderBundleEncoderDescriptor, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `stencilReadOnly` field of this object."] #[doc = ""] @@ -82,8 +120,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "stencilReadOnly")] pub fn get_stencil_read_only(this: &GpuRenderBundleEncoderDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `stencilReadOnly` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "stencilReadOnly")] - fn set_stencil_read_only(this: &GpuRenderBundleEncoderDescriptor, val: bool); + pub fn set_stencil_read_only(this: &GpuRenderBundleEncoderDescriptor, val: bool); } #[cfg(web_sys_unstable_apis)] impl GpuRenderBundleEncoderDescriptor { @@ -100,68 +145,38 @@ impl GpuRenderBundleEncoderDescriptor { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `label` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_label()` instead."] pub fn label(&mut self, val: &str) -> &mut Self { self.set_label(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `colorFormats` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_color_formats()` instead."] pub fn color_formats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_color_formats(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureFormat")] - #[doc = "Change the `depthStencilFormat` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`, `GpuTextureFormat`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_depth_stencil_format()` instead."] pub fn depth_stencil_format(&mut self, val: GpuTextureFormat) -> &mut Self { self.set_depth_stencil_format(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `sampleCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_sample_count()` instead."] pub fn sample_count(&mut self, val: u32) -> &mut Self { self.set_sample_count(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `depthReadOnly` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_depth_read_only()` instead."] pub fn depth_read_only(&mut self, val: bool) -> &mut Self { self.set_depth_read_only(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `stencilReadOnly` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_stencil_read_only()` instead."] pub fn stencil_read_only(&mut self, val: bool) -> &mut Self { self.set_stencil_read_only(val); self diff --git a/crates/web-sys/src/features/gen_GpuRenderPassColorAttachment.rs b/crates/web-sys/src/features/gen_GpuRenderPassColorAttachment.rs index 3f7d48d9ce4c..7df6be14024c 100644 --- a/crates/web-sys/src/features/gen_GpuRenderPassColorAttachment.rs +++ b/crates/web-sys/src/features/gen_GpuRenderPassColorAttachment.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "clearValue")] pub fn get_clear_value(this: &GpuRenderPassColorAttachment) -> ::wasm_bindgen::JsValue; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `clearValue` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassColorAttachment`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "clearValue")] - fn set_clear_value(this: &GpuRenderPassColorAttachment, val: &::wasm_bindgen::JsValue); + pub fn set_clear_value(this: &GpuRenderPassColorAttachment, val: &::wasm_bindgen::JsValue); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `depthSlice` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "depthSlice")] pub fn get_depth_slice(this: &GpuRenderPassColorAttachment) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `depthSlice` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassColorAttachment`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "depthSlice")] - fn set_depth_slice(this: &GpuRenderPassColorAttachment, val: u32); + pub fn set_depth_slice(this: &GpuRenderPassColorAttachment, val: u32); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuLoadOp")] #[doc = "Get the `loadOp` field of this object."] @@ -46,9 +60,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "loadOp")] pub fn get_load_op(this: &GpuRenderPassColorAttachment) -> GpuLoadOp; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuLoadOp")] + #[doc = "Change the `loadOp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuLoadOp`, `GpuRenderPassColorAttachment`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "loadOp")] - fn set_load_op(this: &GpuRenderPassColorAttachment, val: GpuLoadOp); + pub fn set_load_op(this: &GpuRenderPassColorAttachment, val: GpuLoadOp); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureView")] #[doc = "Get the `resolveTarget` field of this object."] @@ -59,9 +80,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "resolveTarget")] pub fn get_resolve_target(this: &GpuRenderPassColorAttachment) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureView")] + #[doc = "Change the `resolveTarget` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassColorAttachment`, `GpuTextureView`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "resolveTarget")] - fn set_resolve_target(this: &GpuRenderPassColorAttachment, val: &GpuTextureView); + pub fn set_resolve_target(this: &GpuRenderPassColorAttachment, val: &GpuTextureView); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuStoreOp")] #[doc = "Get the `storeOp` field of this object."] @@ -72,9 +100,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "storeOp")] pub fn get_store_op(this: &GpuRenderPassColorAttachment) -> GpuStoreOp; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuStoreOp")] + #[doc = "Change the `storeOp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassColorAttachment`, `GpuStoreOp`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "storeOp")] - fn set_store_op(this: &GpuRenderPassColorAttachment, val: GpuStoreOp); + pub fn set_store_op(this: &GpuRenderPassColorAttachment, val: GpuStoreOp); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureView")] #[doc = "Get the `view` field of this object."] @@ -85,9 +120,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "view")] pub fn get_view(this: &GpuRenderPassColorAttachment) -> GpuTextureView; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureView")] + #[doc = "Change the `view` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassColorAttachment`, `GpuTextureView`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "view")] - fn set_view(this: &GpuRenderPassColorAttachment, val: &GpuTextureView); + pub fn set_view(this: &GpuRenderPassColorAttachment, val: &GpuTextureView); } #[cfg(web_sys_unstable_apis)] impl GpuRenderPassColorAttachment { @@ -111,71 +153,41 @@ impl GpuRenderPassColorAttachment { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `clearValue` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassColorAttachment`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_clear_value()` instead."] pub fn clear_value(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_clear_value(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `depthSlice` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassColorAttachment`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_depth_slice()` instead."] pub fn depth_slice(&mut self, val: u32) -> &mut Self { self.set_depth_slice(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuLoadOp")] - #[doc = "Change the `loadOp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuLoadOp`, `GpuRenderPassColorAttachment`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_load_op()` instead."] pub fn load_op(&mut self, val: GpuLoadOp) -> &mut Self { self.set_load_op(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureView")] - #[doc = "Change the `resolveTarget` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassColorAttachment`, `GpuTextureView`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_resolve_target()` instead."] pub fn resolve_target(&mut self, val: &GpuTextureView) -> &mut Self { self.set_resolve_target(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuStoreOp")] - #[doc = "Change the `storeOp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassColorAttachment`, `GpuStoreOp`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_store_op()` instead."] pub fn store_op(&mut self, val: GpuStoreOp) -> &mut Self { self.set_store_op(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureView")] - #[doc = "Change the `view` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassColorAttachment`, `GpuTextureView`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_view()` instead."] pub fn view(&mut self, val: &GpuTextureView) -> &mut Self { self.set_view(val); self diff --git a/crates/web-sys/src/features/gen_GpuRenderPassDepthStencilAttachment.rs b/crates/web-sys/src/features/gen_GpuRenderPassDepthStencilAttachment.rs index f2fa6e329786..b7748828b22d 100644 --- a/crates/web-sys/src/features/gen_GpuRenderPassDepthStencilAttachment.rs +++ b/crates/web-sys/src/features/gen_GpuRenderPassDepthStencilAttachment.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "depthClearValue")] pub fn get_depth_clear_value(this: &GpuRenderPassDepthStencilAttachment) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `depthClearValue` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "depthClearValue")] - fn set_depth_clear_value(this: &GpuRenderPassDepthStencilAttachment, val: f32); + pub fn set_depth_clear_value(this: &GpuRenderPassDepthStencilAttachment, val: f32); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuLoadOp")] #[doc = "Get the `depthLoadOp` field of this object."] @@ -35,9 +42,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "depthLoadOp")] pub fn get_depth_load_op(this: &GpuRenderPassDepthStencilAttachment) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuLoadOp")] + #[doc = "Change the `depthLoadOp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuLoadOp`, `GpuRenderPassDepthStencilAttachment`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "depthLoadOp")] - fn set_depth_load_op(this: &GpuRenderPassDepthStencilAttachment, val: GpuLoadOp); + pub fn set_depth_load_op(this: &GpuRenderPassDepthStencilAttachment, val: GpuLoadOp); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `depthReadOnly` field of this object."] #[doc = ""] @@ -47,8 +61,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "depthReadOnly")] pub fn get_depth_read_only(this: &GpuRenderPassDepthStencilAttachment) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `depthReadOnly` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "depthReadOnly")] - fn set_depth_read_only(this: &GpuRenderPassDepthStencilAttachment, val: bool); + pub fn set_depth_read_only(this: &GpuRenderPassDepthStencilAttachment, val: bool); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuStoreOp")] #[doc = "Get the `depthStoreOp` field of this object."] @@ -59,9 +80,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "depthStoreOp")] pub fn get_depth_store_op(this: &GpuRenderPassDepthStencilAttachment) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuStoreOp")] + #[doc = "Change the `depthStoreOp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`, `GpuStoreOp`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "depthStoreOp")] - fn set_depth_store_op(this: &GpuRenderPassDepthStencilAttachment, val: GpuStoreOp); + pub fn set_depth_store_op(this: &GpuRenderPassDepthStencilAttachment, val: GpuStoreOp); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `stencilClearValue` field of this object."] #[doc = ""] @@ -71,8 +99,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "stencilClearValue")] pub fn get_stencil_clear_value(this: &GpuRenderPassDepthStencilAttachment) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `stencilClearValue` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "stencilClearValue")] - fn set_stencil_clear_value(this: &GpuRenderPassDepthStencilAttachment, val: u32); + pub fn set_stencil_clear_value(this: &GpuRenderPassDepthStencilAttachment, val: u32); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuLoadOp")] #[doc = "Get the `stencilLoadOp` field of this object."] @@ -83,9 +118,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "stencilLoadOp")] pub fn get_stencil_load_op(this: &GpuRenderPassDepthStencilAttachment) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuLoadOp")] + #[doc = "Change the `stencilLoadOp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuLoadOp`, `GpuRenderPassDepthStencilAttachment`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "stencilLoadOp")] - fn set_stencil_load_op(this: &GpuRenderPassDepthStencilAttachment, val: GpuLoadOp); + pub fn set_stencil_load_op(this: &GpuRenderPassDepthStencilAttachment, val: GpuLoadOp); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `stencilReadOnly` field of this object."] #[doc = ""] @@ -95,8 +137,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "stencilReadOnly")] pub fn get_stencil_read_only(this: &GpuRenderPassDepthStencilAttachment) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `stencilReadOnly` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "stencilReadOnly")] - fn set_stencil_read_only(this: &GpuRenderPassDepthStencilAttachment, val: bool); + pub fn set_stencil_read_only(this: &GpuRenderPassDepthStencilAttachment, val: bool); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuStoreOp")] #[doc = "Get the `stencilStoreOp` field of this object."] @@ -107,9 +156,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "stencilStoreOp")] pub fn get_stencil_store_op(this: &GpuRenderPassDepthStencilAttachment) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuStoreOp")] + #[doc = "Change the `stencilStoreOp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`, `GpuStoreOp`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "stencilStoreOp")] - fn set_stencil_store_op(this: &GpuRenderPassDepthStencilAttachment, val: GpuStoreOp); + pub fn set_stencil_store_op(this: &GpuRenderPassDepthStencilAttachment, val: GpuStoreOp); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureView")] #[doc = "Get the `view` field of this object."] @@ -120,9 +176,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "view")] pub fn get_view(this: &GpuRenderPassDepthStencilAttachment) -> GpuTextureView; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureView")] + #[doc = "Change the `view` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`, `GpuTextureView`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "view")] - fn set_view(this: &GpuRenderPassDepthStencilAttachment, val: &GpuTextureView); + pub fn set_view(this: &GpuRenderPassDepthStencilAttachment, val: &GpuTextureView); } #[cfg(web_sys_unstable_apis)] impl GpuRenderPassDepthStencilAttachment { @@ -140,105 +203,60 @@ impl GpuRenderPassDepthStencilAttachment { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `depthClearValue` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_depth_clear_value()` instead."] pub fn depth_clear_value(&mut self, val: f32) -> &mut Self { self.set_depth_clear_value(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuLoadOp")] - #[doc = "Change the `depthLoadOp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuLoadOp`, `GpuRenderPassDepthStencilAttachment`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_depth_load_op()` instead."] pub fn depth_load_op(&mut self, val: GpuLoadOp) -> &mut Self { self.set_depth_load_op(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `depthReadOnly` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_depth_read_only()` instead."] pub fn depth_read_only(&mut self, val: bool) -> &mut Self { self.set_depth_read_only(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuStoreOp")] - #[doc = "Change the `depthStoreOp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`, `GpuStoreOp`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_depth_store_op()` instead."] pub fn depth_store_op(&mut self, val: GpuStoreOp) -> &mut Self { self.set_depth_store_op(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `stencilClearValue` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_stencil_clear_value()` instead."] pub fn stencil_clear_value(&mut self, val: u32) -> &mut Self { self.set_stencil_clear_value(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuLoadOp")] - #[doc = "Change the `stencilLoadOp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuLoadOp`, `GpuRenderPassDepthStencilAttachment`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_stencil_load_op()` instead."] pub fn stencil_load_op(&mut self, val: GpuLoadOp) -> &mut Self { self.set_stencil_load_op(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `stencilReadOnly` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_stencil_read_only()` instead."] pub fn stencil_read_only(&mut self, val: bool) -> &mut Self { self.set_stencil_read_only(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuStoreOp")] - #[doc = "Change the `stencilStoreOp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`, `GpuStoreOp`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_stencil_store_op()` instead."] pub fn stencil_store_op(&mut self, val: GpuStoreOp) -> &mut Self { self.set_stencil_store_op(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureView")] - #[doc = "Change the `view` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`, `GpuTextureView`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_view()` instead."] pub fn view(&mut self, val: &GpuTextureView) -> &mut Self { self.set_view(val); self diff --git a/crates/web-sys/src/features/gen_GpuRenderPassDescriptor.rs b/crates/web-sys/src/features/gen_GpuRenderPassDescriptor.rs index 4df282b3b841..4d388ca356e7 100644 --- a/crates/web-sys/src/features/gen_GpuRenderPassDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuRenderPassDescriptor.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "label")] pub fn get_label(this: &GpuRenderPassDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "label")] - fn set_label(this: &GpuRenderPassDescriptor, val: &str); + pub fn set_label(this: &GpuRenderPassDescriptor, val: &str); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `colorAttachments` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "colorAttachments")] pub fn get_color_attachments(this: &GpuRenderPassDescriptor) -> ::js_sys::Array; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `colorAttachments` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "colorAttachments")] - fn set_color_attachments(this: &GpuRenderPassDescriptor, val: &::wasm_bindgen::JsValue); + pub fn set_color_attachments(this: &GpuRenderPassDescriptor, val: &::wasm_bindgen::JsValue); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuRenderPassDepthStencilAttachment")] #[doc = "Get the `depthStencilAttachment` field of this object."] @@ -48,9 +62,16 @@ extern "C" { pub fn get_depth_stencil_attachment( this: &GpuRenderPassDescriptor, ) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuRenderPassDepthStencilAttachment")] + #[doc = "Change the `depthStencilAttachment` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`, `GpuRenderPassDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "depthStencilAttachment")] - fn set_depth_stencil_attachment( + pub fn set_depth_stencil_attachment( this: &GpuRenderPassDescriptor, val: &GpuRenderPassDepthStencilAttachment, ); @@ -63,8 +84,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "maxDrawCount")] pub fn get_max_draw_count(this: &GpuRenderPassDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `maxDrawCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "maxDrawCount")] - fn set_max_draw_count(this: &GpuRenderPassDescriptor, val: f64); + pub fn set_max_draw_count(this: &GpuRenderPassDescriptor, val: f64); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuQuerySet")] #[doc = "Get the `occlusionQuerySet` field of this object."] @@ -75,9 +103,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "occlusionQuerySet")] pub fn get_occlusion_query_set(this: &GpuRenderPassDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuQuerySet")] + #[doc = "Change the `occlusionQuerySet` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuQuerySet`, `GpuRenderPassDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "occlusionQuerySet")] - fn set_occlusion_query_set(this: &GpuRenderPassDescriptor, val: &GpuQuerySet); + pub fn set_occlusion_query_set(this: &GpuRenderPassDescriptor, val: &GpuQuerySet); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuRenderPassTimestampWrites")] #[doc = "Get the `timestampWrites` field of this object."] @@ -90,9 +125,16 @@ extern "C" { pub fn get_timestamp_writes( this: &GpuRenderPassDescriptor, ) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuRenderPassTimestampWrites")] + #[doc = "Change the `timestampWrites` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDescriptor`, `GpuRenderPassTimestampWrites`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "timestampWrites")] - fn set_timestamp_writes(this: &GpuRenderPassDescriptor, val: &GpuRenderPassTimestampWrites); + pub fn set_timestamp_writes(this: &GpuRenderPassDescriptor, val: &GpuRenderPassTimestampWrites); } #[cfg(web_sys_unstable_apis)] impl GpuRenderPassDescriptor { @@ -109,35 +151,20 @@ impl GpuRenderPassDescriptor { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `label` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_label()` instead."] pub fn label(&mut self, val: &str) -> &mut Self { self.set_label(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `colorAttachments` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_color_attachments()` instead."] pub fn color_attachments(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_color_attachments(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuRenderPassDepthStencilAttachment")] - #[doc = "Change the `depthStencilAttachment` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`, `GpuRenderPassDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_depth_stencil_attachment()` instead."] pub fn depth_stencil_attachment( &mut self, val: &GpuRenderPassDepthStencilAttachment, @@ -146,36 +173,21 @@ impl GpuRenderPassDescriptor { self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `maxDrawCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_max_draw_count()` instead."] pub fn max_draw_count(&mut self, val: f64) -> &mut Self { self.set_max_draw_count(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuQuerySet")] - #[doc = "Change the `occlusionQuerySet` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuQuerySet`, `GpuRenderPassDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_occlusion_query_set()` instead."] pub fn occlusion_query_set(&mut self, val: &GpuQuerySet) -> &mut Self { self.set_occlusion_query_set(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuRenderPassTimestampWrites")] - #[doc = "Change the `timestampWrites` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDescriptor`, `GpuRenderPassTimestampWrites`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_timestamp_writes()` instead."] pub fn timestamp_writes(&mut self, val: &GpuRenderPassTimestampWrites) -> &mut Self { self.set_timestamp_writes(val); self diff --git a/crates/web-sys/src/features/gen_GpuRenderPassLayout.rs b/crates/web-sys/src/features/gen_GpuRenderPassLayout.rs index 2be6f42567ab..7977ece02ea5 100644 --- a/crates/web-sys/src/features/gen_GpuRenderPassLayout.rs +++ b/crates/web-sys/src/features/gen_GpuRenderPassLayout.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "label")] pub fn get_label(this: &GpuRenderPassLayout) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "label")] - fn set_label(this: &GpuRenderPassLayout, val: &str); + pub fn set_label(this: &GpuRenderPassLayout, val: &str); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `colorFormats` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "colorFormats")] pub fn get_color_formats(this: &GpuRenderPassLayout) -> ::js_sys::Array; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `colorFormats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "colorFormats")] - fn set_color_formats(this: &GpuRenderPassLayout, val: &::wasm_bindgen::JsValue); + pub fn set_color_formats(this: &GpuRenderPassLayout, val: &::wasm_bindgen::JsValue); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureFormat")] #[doc = "Get the `depthStencilFormat` field of this object."] @@ -46,9 +60,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "depthStencilFormat")] pub fn get_depth_stencil_format(this: &GpuRenderPassLayout) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureFormat")] + #[doc = "Change the `depthStencilFormat` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassLayout`, `GpuTextureFormat`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "depthStencilFormat")] - fn set_depth_stencil_format(this: &GpuRenderPassLayout, val: GpuTextureFormat); + pub fn set_depth_stencil_format(this: &GpuRenderPassLayout, val: GpuTextureFormat); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `sampleCount` field of this object."] #[doc = ""] @@ -58,8 +79,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "sampleCount")] pub fn get_sample_count(this: &GpuRenderPassLayout) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `sampleCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "sampleCount")] - fn set_sample_count(this: &GpuRenderPassLayout, val: u32); + pub fn set_sample_count(this: &GpuRenderPassLayout, val: u32); } #[cfg(web_sys_unstable_apis)] impl GpuRenderPassLayout { @@ -76,46 +104,26 @@ impl GpuRenderPassLayout { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `label` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassLayout`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_label()` instead."] pub fn label(&mut self, val: &str) -> &mut Self { self.set_label(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `colorFormats` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassLayout`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_color_formats()` instead."] pub fn color_formats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_color_formats(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureFormat")] - #[doc = "Change the `depthStencilFormat` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassLayout`, `GpuTextureFormat`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_depth_stencil_format()` instead."] pub fn depth_stencil_format(&mut self, val: GpuTextureFormat) -> &mut Self { self.set_depth_stencil_format(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `sampleCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassLayout`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_sample_count()` instead."] pub fn sample_count(&mut self, val: u32) -> &mut Self { self.set_sample_count(val); self diff --git a/crates/web-sys/src/features/gen_GpuRenderPassTimestampWrites.rs b/crates/web-sys/src/features/gen_GpuRenderPassTimestampWrites.rs index 48d62b84985c..20f9342c4984 100644 --- a/crates/web-sys/src/features/gen_GpuRenderPassTimestampWrites.rs +++ b/crates/web-sys/src/features/gen_GpuRenderPassTimestampWrites.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "beginningOfPassWriteIndex")] pub fn get_beginning_of_pass_write_index(this: &GpuRenderPassTimestampWrites) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `beginningOfPassWriteIndex` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassTimestampWrites`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "beginningOfPassWriteIndex")] - fn set_beginning_of_pass_write_index(this: &GpuRenderPassTimestampWrites, val: u32); + pub fn set_beginning_of_pass_write_index(this: &GpuRenderPassTimestampWrites, val: u32); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `endOfPassWriteIndex` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "endOfPassWriteIndex")] pub fn get_end_of_pass_write_index(this: &GpuRenderPassTimestampWrites) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `endOfPassWriteIndex` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassTimestampWrites`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "endOfPassWriteIndex")] - fn set_end_of_pass_write_index(this: &GpuRenderPassTimestampWrites, val: u32); + pub fn set_end_of_pass_write_index(this: &GpuRenderPassTimestampWrites, val: u32); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuQuerySet")] #[doc = "Get the `querySet` field of this object."] @@ -46,9 +60,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "querySet")] pub fn get_query_set(this: &GpuRenderPassTimestampWrites) -> GpuQuerySet; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuQuerySet")] + #[doc = "Change the `querySet` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuQuerySet`, `GpuRenderPassTimestampWrites`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "querySet")] - fn set_query_set(this: &GpuRenderPassTimestampWrites, val: &GpuQuerySet); + pub fn set_query_set(this: &GpuRenderPassTimestampWrites, val: &GpuQuerySet); } #[cfg(web_sys_unstable_apis)] impl GpuRenderPassTimestampWrites { @@ -66,35 +87,20 @@ impl GpuRenderPassTimestampWrites { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `beginningOfPassWriteIndex` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassTimestampWrites`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_beginning_of_pass_write_index()` instead."] pub fn beginning_of_pass_write_index(&mut self, val: u32) -> &mut Self { self.set_beginning_of_pass_write_index(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `endOfPassWriteIndex` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassTimestampWrites`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_end_of_pass_write_index()` instead."] pub fn end_of_pass_write_index(&mut self, val: u32) -> &mut Self { self.set_end_of_pass_write_index(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuQuerySet")] - #[doc = "Change the `querySet` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuQuerySet`, `GpuRenderPassTimestampWrites`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_query_set()` instead."] pub fn query_set(&mut self, val: &GpuQuerySet) -> &mut Self { self.set_query_set(val); self diff --git a/crates/web-sys/src/features/gen_GpuRenderPipelineDescriptor.rs b/crates/web-sys/src/features/gen_GpuRenderPipelineDescriptor.rs index e7d60a841998..5db5163d669d 100644 --- a/crates/web-sys/src/features/gen_GpuRenderPipelineDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuRenderPipelineDescriptor.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "label")] pub fn get_label(this: &GpuRenderPipelineDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPipelineDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "label")] - fn set_label(this: &GpuRenderPipelineDescriptor, val: &str); + pub fn set_label(this: &GpuRenderPipelineDescriptor, val: &str); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `layout` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "layout")] pub fn get_layout(this: &GpuRenderPipelineDescriptor) -> ::wasm_bindgen::JsValue; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `layout` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPipelineDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "layout")] - fn set_layout(this: &GpuRenderPipelineDescriptor, val: &::wasm_bindgen::JsValue); + pub fn set_layout(this: &GpuRenderPipelineDescriptor, val: &::wasm_bindgen::JsValue); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuDepthStencilState")] #[doc = "Get the `depthStencil` field of this object."] @@ -46,9 +60,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "depthStencil")] pub fn get_depth_stencil(this: &GpuRenderPipelineDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuDepthStencilState")] + #[doc = "Change the `depthStencil` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuDepthStencilState`, `GpuRenderPipelineDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "depthStencil")] - fn set_depth_stencil(this: &GpuRenderPipelineDescriptor, val: &GpuDepthStencilState); + pub fn set_depth_stencil(this: &GpuRenderPipelineDescriptor, val: &GpuDepthStencilState); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuFragmentState")] #[doc = "Get the `fragment` field of this object."] @@ -59,9 +80,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "fragment")] pub fn get_fragment(this: &GpuRenderPipelineDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuFragmentState")] + #[doc = "Change the `fragment` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuFragmentState`, `GpuRenderPipelineDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "fragment")] - fn set_fragment(this: &GpuRenderPipelineDescriptor, val: &GpuFragmentState); + pub fn set_fragment(this: &GpuRenderPipelineDescriptor, val: &GpuFragmentState); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuMultisampleState")] #[doc = "Get the `multisample` field of this object."] @@ -72,9 +100,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "multisample")] pub fn get_multisample(this: &GpuRenderPipelineDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuMultisampleState")] + #[doc = "Change the `multisample` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuMultisampleState`, `GpuRenderPipelineDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "multisample")] - fn set_multisample(this: &GpuRenderPipelineDescriptor, val: &GpuMultisampleState); + pub fn set_multisample(this: &GpuRenderPipelineDescriptor, val: &GpuMultisampleState); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuPrimitiveState")] #[doc = "Get the `primitive` field of this object."] @@ -85,9 +120,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "primitive")] pub fn get_primitive(this: &GpuRenderPipelineDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuPrimitiveState")] + #[doc = "Change the `primitive` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuPrimitiveState`, `GpuRenderPipelineDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "primitive")] - fn set_primitive(this: &GpuRenderPipelineDescriptor, val: &GpuPrimitiveState); + pub fn set_primitive(this: &GpuRenderPipelineDescriptor, val: &GpuPrimitiveState); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuVertexState")] #[doc = "Get the `vertex` field of this object."] @@ -98,9 +140,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "vertex")] pub fn get_vertex(this: &GpuRenderPipelineDescriptor) -> GpuVertexState; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuVertexState")] + #[doc = "Change the `vertex` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPipelineDescriptor`, `GpuVertexState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "vertex")] - fn set_vertex(this: &GpuRenderPipelineDescriptor, val: &GpuVertexState); + pub fn set_vertex(this: &GpuRenderPipelineDescriptor, val: &GpuVertexState); } #[cfg(web_sys_unstable_apis)] impl GpuRenderPipelineDescriptor { @@ -119,83 +168,48 @@ impl GpuRenderPipelineDescriptor { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `label` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderPipelineDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_label()` instead."] pub fn label(&mut self, val: &str) -> &mut Self { self.set_label(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `layout` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderPipelineDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_layout()` instead."] pub fn layout(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_layout(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuDepthStencilState")] - #[doc = "Change the `depthStencil` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuDepthStencilState`, `GpuRenderPipelineDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_depth_stencil()` instead."] pub fn depth_stencil(&mut self, val: &GpuDepthStencilState) -> &mut Self { self.set_depth_stencil(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuFragmentState")] - #[doc = "Change the `fragment` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuFragmentState`, `GpuRenderPipelineDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_fragment()` instead."] pub fn fragment(&mut self, val: &GpuFragmentState) -> &mut Self { self.set_fragment(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuMultisampleState")] - #[doc = "Change the `multisample` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuMultisampleState`, `GpuRenderPipelineDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_multisample()` instead."] pub fn multisample(&mut self, val: &GpuMultisampleState) -> &mut Self { self.set_multisample(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuPrimitiveState")] - #[doc = "Change the `primitive` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuPrimitiveState`, `GpuRenderPipelineDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_primitive()` instead."] pub fn primitive(&mut self, val: &GpuPrimitiveState) -> &mut Self { self.set_primitive(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuVertexState")] - #[doc = "Change the `vertex` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderPipelineDescriptor`, `GpuVertexState`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_vertex()` instead."] pub fn vertex(&mut self, val: &GpuVertexState) -> &mut Self { self.set_vertex(val); self diff --git a/crates/web-sys/src/features/gen_GpuRequestAdapterOptions.rs b/crates/web-sys/src/features/gen_GpuRequestAdapterOptions.rs index a202bad85fa8..6fe27f97fb82 100644 --- a/crates/web-sys/src/features/gen_GpuRequestAdapterOptions.rs +++ b/crates/web-sys/src/features/gen_GpuRequestAdapterOptions.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "forceFallbackAdapter")] pub fn get_force_fallback_adapter(this: &GpuRequestAdapterOptions) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `forceFallbackAdapter` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRequestAdapterOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "forceFallbackAdapter")] - fn set_force_fallback_adapter(this: &GpuRequestAdapterOptions, val: bool); + pub fn set_force_fallback_adapter(this: &GpuRequestAdapterOptions, val: bool); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuPowerPreference")] #[doc = "Get the `powerPreference` field of this object."] @@ -35,9 +42,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "powerPreference")] pub fn get_power_preference(this: &GpuRequestAdapterOptions) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuPowerPreference")] + #[doc = "Change the `powerPreference` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuPowerPreference`, `GpuRequestAdapterOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "powerPreference")] - fn set_power_preference(this: &GpuRequestAdapterOptions, val: GpuPowerPreference); + pub fn set_power_preference(this: &GpuRequestAdapterOptions, val: GpuPowerPreference); } #[cfg(web_sys_unstable_apis)] impl GpuRequestAdapterOptions { @@ -53,24 +67,14 @@ impl GpuRequestAdapterOptions { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `forceFallbackAdapter` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRequestAdapterOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_force_fallback_adapter()` instead."] pub fn force_fallback_adapter(&mut self, val: bool) -> &mut Self { self.set_force_fallback_adapter(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuPowerPreference")] - #[doc = "Change the `powerPreference` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuPowerPreference`, `GpuRequestAdapterOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_power_preference()` instead."] pub fn power_preference(&mut self, val: GpuPowerPreference) -> &mut Self { self.set_power_preference(val); self diff --git a/crates/web-sys/src/features/gen_GpuSamplerBindingLayout.rs b/crates/web-sys/src/features/gen_GpuSamplerBindingLayout.rs index d1df34a6d934..bfce5d945eeb 100644 --- a/crates/web-sys/src/features/gen_GpuSamplerBindingLayout.rs +++ b/crates/web-sys/src/features/gen_GpuSamplerBindingLayout.rs @@ -24,9 +24,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "type")] pub fn get_type(this: &GpuSamplerBindingLayout) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuSamplerBindingType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuSamplerBindingLayout`, `GpuSamplerBindingType`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "type")] - fn set_type(this: &GpuSamplerBindingLayout, val: GpuSamplerBindingType); + pub fn set_type(this: &GpuSamplerBindingLayout, val: GpuSamplerBindingType); } #[cfg(web_sys_unstable_apis)] impl GpuSamplerBindingLayout { @@ -43,12 +50,7 @@ impl GpuSamplerBindingLayout { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuSamplerBindingType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuSamplerBindingLayout`, `GpuSamplerBindingType`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: GpuSamplerBindingType) -> &mut Self { self.set_type(val); self diff --git a/crates/web-sys/src/features/gen_GpuSamplerDescriptor.rs b/crates/web-sys/src/features/gen_GpuSamplerDescriptor.rs index 446306391676..c8dcfc7f50fc 100644 --- a/crates/web-sys/src/features/gen_GpuSamplerDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuSamplerDescriptor.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "label")] pub fn get_label(this: &GpuSamplerDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuSamplerDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "label")] - fn set_label(this: &GpuSamplerDescriptor, val: &str); + pub fn set_label(this: &GpuSamplerDescriptor, val: &str); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuAddressMode")] #[doc = "Get the `addressModeU` field of this object."] @@ -35,9 +42,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "addressModeU")] pub fn get_address_mode_u(this: &GpuSamplerDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuAddressMode")] + #[doc = "Change the `addressModeU` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuAddressMode`, `GpuSamplerDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "addressModeU")] - fn set_address_mode_u(this: &GpuSamplerDescriptor, val: GpuAddressMode); + pub fn set_address_mode_u(this: &GpuSamplerDescriptor, val: GpuAddressMode); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuAddressMode")] #[doc = "Get the `addressModeV` field of this object."] @@ -48,9 +62,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "addressModeV")] pub fn get_address_mode_v(this: &GpuSamplerDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuAddressMode")] + #[doc = "Change the `addressModeV` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuAddressMode`, `GpuSamplerDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "addressModeV")] - fn set_address_mode_v(this: &GpuSamplerDescriptor, val: GpuAddressMode); + pub fn set_address_mode_v(this: &GpuSamplerDescriptor, val: GpuAddressMode); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuAddressMode")] #[doc = "Get the `addressModeW` field of this object."] @@ -61,9 +82,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "addressModeW")] pub fn get_address_mode_w(this: &GpuSamplerDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuAddressMode")] + #[doc = "Change the `addressModeW` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuAddressMode`, `GpuSamplerDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "addressModeW")] - fn set_address_mode_w(this: &GpuSamplerDescriptor, val: GpuAddressMode); + pub fn set_address_mode_w(this: &GpuSamplerDescriptor, val: GpuAddressMode); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuCompareFunction")] #[doc = "Get the `compare` field of this object."] @@ -74,9 +102,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "compare")] pub fn get_compare(this: &GpuSamplerDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuCompareFunction")] + #[doc = "Change the `compare` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuCompareFunction`, `GpuSamplerDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "compare")] - fn set_compare(this: &GpuSamplerDescriptor, val: GpuCompareFunction); + pub fn set_compare(this: &GpuSamplerDescriptor, val: GpuCompareFunction); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `lodMaxClamp` field of this object."] #[doc = ""] @@ -86,8 +121,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "lodMaxClamp")] pub fn get_lod_max_clamp(this: &GpuSamplerDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `lodMaxClamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuSamplerDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "lodMaxClamp")] - fn set_lod_max_clamp(this: &GpuSamplerDescriptor, val: f32); + pub fn set_lod_max_clamp(this: &GpuSamplerDescriptor, val: f32); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `lodMinClamp` field of this object."] #[doc = ""] @@ -97,8 +139,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "lodMinClamp")] pub fn get_lod_min_clamp(this: &GpuSamplerDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `lodMinClamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuSamplerDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "lodMinClamp")] - fn set_lod_min_clamp(this: &GpuSamplerDescriptor, val: f32); + pub fn set_lod_min_clamp(this: &GpuSamplerDescriptor, val: f32); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuFilterMode")] #[doc = "Get the `magFilter` field of this object."] @@ -109,9 +158,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "magFilter")] pub fn get_mag_filter(this: &GpuSamplerDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuFilterMode")] + #[doc = "Change the `magFilter` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuFilterMode`, `GpuSamplerDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "magFilter")] - fn set_mag_filter(this: &GpuSamplerDescriptor, val: GpuFilterMode); + pub fn set_mag_filter(this: &GpuSamplerDescriptor, val: GpuFilterMode); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `maxAnisotropy` field of this object."] #[doc = ""] @@ -121,8 +177,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "maxAnisotropy")] pub fn get_max_anisotropy(this: &GpuSamplerDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `maxAnisotropy` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuSamplerDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "maxAnisotropy")] - fn set_max_anisotropy(this: &GpuSamplerDescriptor, val: u16); + pub fn set_max_anisotropy(this: &GpuSamplerDescriptor, val: u16); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuFilterMode")] #[doc = "Get the `minFilter` field of this object."] @@ -133,9 +196,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "minFilter")] pub fn get_min_filter(this: &GpuSamplerDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuFilterMode")] + #[doc = "Change the `minFilter` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuFilterMode`, `GpuSamplerDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "minFilter")] - fn set_min_filter(this: &GpuSamplerDescriptor, val: GpuFilterMode); + pub fn set_min_filter(this: &GpuSamplerDescriptor, val: GpuFilterMode); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuMipmapFilterMode")] #[doc = "Get the `mipmapFilter` field of this object."] @@ -146,9 +216,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "mipmapFilter")] pub fn get_mipmap_filter(this: &GpuSamplerDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuMipmapFilterMode")] + #[doc = "Change the `mipmapFilter` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuMipmapFilterMode`, `GpuSamplerDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "mipmapFilter")] - fn set_mipmap_filter(this: &GpuSamplerDescriptor, val: GpuMipmapFilterMode); + pub fn set_mipmap_filter(this: &GpuSamplerDescriptor, val: GpuMipmapFilterMode); } #[cfg(web_sys_unstable_apis)] impl GpuSamplerDescriptor { @@ -164,129 +241,74 @@ impl GpuSamplerDescriptor { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `label` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuSamplerDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_label()` instead."] pub fn label(&mut self, val: &str) -> &mut Self { self.set_label(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuAddressMode")] - #[doc = "Change the `addressModeU` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuAddressMode`, `GpuSamplerDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_address_mode_u()` instead."] pub fn address_mode_u(&mut self, val: GpuAddressMode) -> &mut Self { self.set_address_mode_u(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuAddressMode")] - #[doc = "Change the `addressModeV` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuAddressMode`, `GpuSamplerDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_address_mode_v()` instead."] pub fn address_mode_v(&mut self, val: GpuAddressMode) -> &mut Self { self.set_address_mode_v(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuAddressMode")] - #[doc = "Change the `addressModeW` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuAddressMode`, `GpuSamplerDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_address_mode_w()` instead."] pub fn address_mode_w(&mut self, val: GpuAddressMode) -> &mut Self { self.set_address_mode_w(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuCompareFunction")] - #[doc = "Change the `compare` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuCompareFunction`, `GpuSamplerDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_compare()` instead."] pub fn compare(&mut self, val: GpuCompareFunction) -> &mut Self { self.set_compare(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `lodMaxClamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuSamplerDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_lod_max_clamp()` instead."] pub fn lod_max_clamp(&mut self, val: f32) -> &mut Self { self.set_lod_max_clamp(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `lodMinClamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuSamplerDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_lod_min_clamp()` instead."] pub fn lod_min_clamp(&mut self, val: f32) -> &mut Self { self.set_lod_min_clamp(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuFilterMode")] - #[doc = "Change the `magFilter` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuFilterMode`, `GpuSamplerDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_mag_filter()` instead."] pub fn mag_filter(&mut self, val: GpuFilterMode) -> &mut Self { self.set_mag_filter(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `maxAnisotropy` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuSamplerDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_max_anisotropy()` instead."] pub fn max_anisotropy(&mut self, val: u16) -> &mut Self { self.set_max_anisotropy(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuFilterMode")] - #[doc = "Change the `minFilter` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuFilterMode`, `GpuSamplerDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_min_filter()` instead."] pub fn min_filter(&mut self, val: GpuFilterMode) -> &mut Self { self.set_min_filter(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuMipmapFilterMode")] - #[doc = "Change the `mipmapFilter` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuMipmapFilterMode`, `GpuSamplerDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_mipmap_filter()` instead."] pub fn mipmap_filter(&mut self, val: GpuMipmapFilterMode) -> &mut Self { self.set_mipmap_filter(val); self diff --git a/crates/web-sys/src/features/gen_GpuShaderModuleCompilationHint.rs b/crates/web-sys/src/features/gen_GpuShaderModuleCompilationHint.rs index fab27c53d0e1..f2c1369207ee 100644 --- a/crates/web-sys/src/features/gen_GpuShaderModuleCompilationHint.rs +++ b/crates/web-sys/src/features/gen_GpuShaderModuleCompilationHint.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "entryPoint")] pub fn get_entry_point(this: &GpuShaderModuleCompilationHint) -> String; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `entryPoint` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuShaderModuleCompilationHint`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "entryPoint")] - fn set_entry_point(this: &GpuShaderModuleCompilationHint, val: &str); + pub fn set_entry_point(this: &GpuShaderModuleCompilationHint, val: &str); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `layout` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "layout")] pub fn get_layout(this: &GpuShaderModuleCompilationHint) -> ::wasm_bindgen::JsValue; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `layout` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuShaderModuleCompilationHint`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "layout")] - fn set_layout(this: &GpuShaderModuleCompilationHint, val: &::wasm_bindgen::JsValue); + pub fn set_layout(this: &GpuShaderModuleCompilationHint, val: &::wasm_bindgen::JsValue); } #[cfg(web_sys_unstable_apis)] impl GpuShaderModuleCompilationHint { @@ -52,23 +66,13 @@ impl GpuShaderModuleCompilationHint { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `entryPoint` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuShaderModuleCompilationHint`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_entry_point()` instead."] pub fn entry_point(&mut self, val: &str) -> &mut Self { self.set_entry_point(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `layout` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuShaderModuleCompilationHint`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_layout()` instead."] pub fn layout(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_layout(val); self diff --git a/crates/web-sys/src/features/gen_GpuShaderModuleDescriptor.rs b/crates/web-sys/src/features/gen_GpuShaderModuleDescriptor.rs index 090a5b9d397b..69c2204e7a99 100644 --- a/crates/web-sys/src/features/gen_GpuShaderModuleDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuShaderModuleDescriptor.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "label")] pub fn get_label(this: &GpuShaderModuleDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuShaderModuleDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "label")] - fn set_label(this: &GpuShaderModuleDescriptor, val: &str); + pub fn set_label(this: &GpuShaderModuleDescriptor, val: &str); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `code` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "code")] pub fn get_code(this: &GpuShaderModuleDescriptor) -> String; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `code` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuShaderModuleDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "code")] - fn set_code(this: &GpuShaderModuleDescriptor, val: &str); + pub fn set_code(this: &GpuShaderModuleDescriptor, val: &str); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `compilationHints` field of this object."] #[doc = ""] @@ -45,8 +59,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "compilationHints")] pub fn get_compilation_hints(this: &GpuShaderModuleDescriptor) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `compilationHints` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuShaderModuleDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "compilationHints")] - fn set_compilation_hints(this: &GpuShaderModuleDescriptor, val: &::wasm_bindgen::JsValue); + pub fn set_compilation_hints(this: &GpuShaderModuleDescriptor, val: &::wasm_bindgen::JsValue); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `sourceMap` field of this object."] #[doc = ""] @@ -56,8 +77,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "sourceMap")] pub fn get_source_map(this: &GpuShaderModuleDescriptor) -> Option<::js_sys::Object>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `sourceMap` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuShaderModuleDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "sourceMap")] - fn set_source_map(this: &GpuShaderModuleDescriptor, val: &::js_sys::Object); + pub fn set_source_map(this: &GpuShaderModuleDescriptor, val: &::js_sys::Object); } #[cfg(web_sys_unstable_apis)] impl GpuShaderModuleDescriptor { @@ -74,45 +102,25 @@ impl GpuShaderModuleDescriptor { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `label` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuShaderModuleDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_label()` instead."] pub fn label(&mut self, val: &str) -> &mut Self { self.set_label(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `code` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuShaderModuleDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_code()` instead."] pub fn code(&mut self, val: &str) -> &mut Self { self.set_code(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `compilationHints` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuShaderModuleDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_compilation_hints()` instead."] pub fn compilation_hints(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_compilation_hints(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `sourceMap` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuShaderModuleDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_source_map()` instead."] pub fn source_map(&mut self, val: &::js_sys::Object) -> &mut Self { self.set_source_map(val); self diff --git a/crates/web-sys/src/features/gen_GpuStencilFaceState.rs b/crates/web-sys/src/features/gen_GpuStencilFaceState.rs index 428924ec3d30..8aba11bb319d 100644 --- a/crates/web-sys/src/features/gen_GpuStencilFaceState.rs +++ b/crates/web-sys/src/features/gen_GpuStencilFaceState.rs @@ -24,9 +24,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "compare")] pub fn get_compare(this: &GpuStencilFaceState) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuCompareFunction")] + #[doc = "Change the `compare` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuCompareFunction`, `GpuStencilFaceState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "compare")] - fn set_compare(this: &GpuStencilFaceState, val: GpuCompareFunction); + pub fn set_compare(this: &GpuStencilFaceState, val: GpuCompareFunction); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuStencilOperation")] #[doc = "Get the `depthFailOp` field of this object."] @@ -37,9 +44,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "depthFailOp")] pub fn get_depth_fail_op(this: &GpuStencilFaceState) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuStencilOperation")] + #[doc = "Change the `depthFailOp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuStencilFaceState`, `GpuStencilOperation`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "depthFailOp")] - fn set_depth_fail_op(this: &GpuStencilFaceState, val: GpuStencilOperation); + pub fn set_depth_fail_op(this: &GpuStencilFaceState, val: GpuStencilOperation); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuStencilOperation")] #[doc = "Get the `failOp` field of this object."] @@ -50,9 +64,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "failOp")] pub fn get_fail_op(this: &GpuStencilFaceState) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuStencilOperation")] + #[doc = "Change the `failOp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuStencilFaceState`, `GpuStencilOperation`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "failOp")] - fn set_fail_op(this: &GpuStencilFaceState, val: GpuStencilOperation); + pub fn set_fail_op(this: &GpuStencilFaceState, val: GpuStencilOperation); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuStencilOperation")] #[doc = "Get the `passOp` field of this object."] @@ -63,9 +84,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "passOp")] pub fn get_pass_op(this: &GpuStencilFaceState) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuStencilOperation")] + #[doc = "Change the `passOp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuStencilFaceState`, `GpuStencilOperation`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "passOp")] - fn set_pass_op(this: &GpuStencilFaceState, val: GpuStencilOperation); + pub fn set_pass_op(this: &GpuStencilFaceState, val: GpuStencilOperation); } #[cfg(web_sys_unstable_apis)] impl GpuStencilFaceState { @@ -82,48 +110,28 @@ impl GpuStencilFaceState { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuCompareFunction")] - #[doc = "Change the `compare` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuCompareFunction`, `GpuStencilFaceState`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_compare()` instead."] pub fn compare(&mut self, val: GpuCompareFunction) -> &mut Self { self.set_compare(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuStencilOperation")] - #[doc = "Change the `depthFailOp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuStencilFaceState`, `GpuStencilOperation`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_depth_fail_op()` instead."] pub fn depth_fail_op(&mut self, val: GpuStencilOperation) -> &mut Self { self.set_depth_fail_op(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuStencilOperation")] - #[doc = "Change the `failOp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuStencilFaceState`, `GpuStencilOperation`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_fail_op()` instead."] pub fn fail_op(&mut self, val: GpuStencilOperation) -> &mut Self { self.set_fail_op(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuStencilOperation")] - #[doc = "Change the `passOp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuStencilFaceState`, `GpuStencilOperation`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_pass_op()` instead."] pub fn pass_op(&mut self, val: GpuStencilOperation) -> &mut Self { self.set_pass_op(val); self diff --git a/crates/web-sys/src/features/gen_GpuStorageTextureBindingLayout.rs b/crates/web-sys/src/features/gen_GpuStorageTextureBindingLayout.rs index 53c5ef7c7e06..dfba66d770f4 100644 --- a/crates/web-sys/src/features/gen_GpuStorageTextureBindingLayout.rs +++ b/crates/web-sys/src/features/gen_GpuStorageTextureBindingLayout.rs @@ -24,9 +24,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "access")] pub fn get_access(this: &GpuStorageTextureBindingLayout) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuStorageTextureAccess")] + #[doc = "Change the `access` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuStorageTextureAccess`, `GpuStorageTextureBindingLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "access")] - fn set_access(this: &GpuStorageTextureBindingLayout, val: GpuStorageTextureAccess); + pub fn set_access(this: &GpuStorageTextureBindingLayout, val: GpuStorageTextureAccess); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureFormat")] #[doc = "Get the `format` field of this object."] @@ -37,9 +44,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "format")] pub fn get_format(this: &GpuStorageTextureBindingLayout) -> GpuTextureFormat; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureFormat")] + #[doc = "Change the `format` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuStorageTextureBindingLayout`, `GpuTextureFormat`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "format")] - fn set_format(this: &GpuStorageTextureBindingLayout, val: GpuTextureFormat); + pub fn set_format(this: &GpuStorageTextureBindingLayout, val: GpuTextureFormat); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureViewDimension")] #[doc = "Get the `viewDimension` field of this object."] @@ -52,9 +66,16 @@ extern "C" { pub fn get_view_dimension( this: &GpuStorageTextureBindingLayout, ) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureViewDimension")] + #[doc = "Change the `viewDimension` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuStorageTextureBindingLayout`, `GpuTextureViewDimension`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "viewDimension")] - fn set_view_dimension(this: &GpuStorageTextureBindingLayout, val: GpuTextureViewDimension); + pub fn set_view_dimension(this: &GpuStorageTextureBindingLayout, val: GpuTextureViewDimension); } #[cfg(web_sys_unstable_apis)] impl GpuStorageTextureBindingLayout { @@ -73,36 +94,21 @@ impl GpuStorageTextureBindingLayout { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuStorageTextureAccess")] - #[doc = "Change the `access` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuStorageTextureAccess`, `GpuStorageTextureBindingLayout`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_access()` instead."] pub fn access(&mut self, val: GpuStorageTextureAccess) -> &mut Self { self.set_access(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureFormat")] - #[doc = "Change the `format` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuStorageTextureBindingLayout`, `GpuTextureFormat`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_format()` instead."] pub fn format(&mut self, val: GpuTextureFormat) -> &mut Self { self.set_format(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureViewDimension")] - #[doc = "Change the `viewDimension` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuStorageTextureBindingLayout`, `GpuTextureViewDimension`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_view_dimension()` instead."] pub fn view_dimension(&mut self, val: GpuTextureViewDimension) -> &mut Self { self.set_view_dimension(val); self diff --git a/crates/web-sys/src/features/gen_GpuTextureBindingLayout.rs b/crates/web-sys/src/features/gen_GpuTextureBindingLayout.rs index eac83cf2f408..1fd1ad710fb5 100644 --- a/crates/web-sys/src/features/gen_GpuTextureBindingLayout.rs +++ b/crates/web-sys/src/features/gen_GpuTextureBindingLayout.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "multisampled")] pub fn get_multisampled(this: &GpuTextureBindingLayout) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `multisampled` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureBindingLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "multisampled")] - fn set_multisampled(this: &GpuTextureBindingLayout, val: bool); + pub fn set_multisampled(this: &GpuTextureBindingLayout, val: bool); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureSampleType")] #[doc = "Get the `sampleType` field of this object."] @@ -35,9 +42,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "sampleType")] pub fn get_sample_type(this: &GpuTextureBindingLayout) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureSampleType")] + #[doc = "Change the `sampleType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureBindingLayout`, `GpuTextureSampleType`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "sampleType")] - fn set_sample_type(this: &GpuTextureBindingLayout, val: GpuTextureSampleType); + pub fn set_sample_type(this: &GpuTextureBindingLayout, val: GpuTextureSampleType); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureViewDimension")] #[doc = "Get the `viewDimension` field of this object."] @@ -48,9 +62,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "viewDimension")] pub fn get_view_dimension(this: &GpuTextureBindingLayout) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureViewDimension")] + #[doc = "Change the `viewDimension` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureBindingLayout`, `GpuTextureViewDimension`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "viewDimension")] - fn set_view_dimension(this: &GpuTextureBindingLayout, val: GpuTextureViewDimension); + pub fn set_view_dimension(this: &GpuTextureBindingLayout, val: GpuTextureViewDimension); } #[cfg(web_sys_unstable_apis)] impl GpuTextureBindingLayout { @@ -66,36 +87,21 @@ impl GpuTextureBindingLayout { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `multisampled` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuTextureBindingLayout`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_multisampled()` instead."] pub fn multisampled(&mut self, val: bool) -> &mut Self { self.set_multisampled(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureSampleType")] - #[doc = "Change the `sampleType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuTextureBindingLayout`, `GpuTextureSampleType`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_sample_type()` instead."] pub fn sample_type(&mut self, val: GpuTextureSampleType) -> &mut Self { self.set_sample_type(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureViewDimension")] - #[doc = "Change the `viewDimension` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuTextureBindingLayout`, `GpuTextureViewDimension`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_view_dimension()` instead."] pub fn view_dimension(&mut self, val: GpuTextureViewDimension) -> &mut Self { self.set_view_dimension(val); self diff --git a/crates/web-sys/src/features/gen_GpuTextureDescriptor.rs b/crates/web-sys/src/features/gen_GpuTextureDescriptor.rs index b1bdb29cec81..ff3a096540f5 100644 --- a/crates/web-sys/src/features/gen_GpuTextureDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuTextureDescriptor.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "label")] pub fn get_label(this: &GpuTextureDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "label")] - fn set_label(this: &GpuTextureDescriptor, val: &str); + pub fn set_label(this: &GpuTextureDescriptor, val: &str); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureDimension")] #[doc = "Get the `dimension` field of this object."] @@ -35,9 +42,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "dimension")] pub fn get_dimension(this: &GpuTextureDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureDimension")] + #[doc = "Change the `dimension` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureDescriptor`, `GpuTextureDimension`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "dimension")] - fn set_dimension(this: &GpuTextureDescriptor, val: GpuTextureDimension); + pub fn set_dimension(this: &GpuTextureDescriptor, val: GpuTextureDimension); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureFormat")] #[doc = "Get the `format` field of this object."] @@ -48,9 +62,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "format")] pub fn get_format(this: &GpuTextureDescriptor) -> GpuTextureFormat; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureFormat")] + #[doc = "Change the `format` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureDescriptor`, `GpuTextureFormat`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "format")] - fn set_format(this: &GpuTextureDescriptor, val: GpuTextureFormat); + pub fn set_format(this: &GpuTextureDescriptor, val: GpuTextureFormat); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `mipLevelCount` field of this object."] #[doc = ""] @@ -60,8 +81,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "mipLevelCount")] pub fn get_mip_level_count(this: &GpuTextureDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `mipLevelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "mipLevelCount")] - fn set_mip_level_count(this: &GpuTextureDescriptor, val: u32); + pub fn set_mip_level_count(this: &GpuTextureDescriptor, val: u32); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `sampleCount` field of this object."] #[doc = ""] @@ -71,8 +99,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "sampleCount")] pub fn get_sample_count(this: &GpuTextureDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `sampleCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "sampleCount")] - fn set_sample_count(this: &GpuTextureDescriptor, val: u32); + pub fn set_sample_count(this: &GpuTextureDescriptor, val: u32); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `size` field of this object."] #[doc = ""] @@ -82,8 +117,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "size")] pub fn get_size(this: &GpuTextureDescriptor) -> ::wasm_bindgen::JsValue; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `size` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "size")] - fn set_size(this: &GpuTextureDescriptor, val: &::wasm_bindgen::JsValue); + pub fn set_size(this: &GpuTextureDescriptor, val: &::wasm_bindgen::JsValue); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `usage` field of this object."] #[doc = ""] @@ -93,8 +135,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "usage")] pub fn get_usage(this: &GpuTextureDescriptor) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `usage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "usage")] - fn set_usage(this: &GpuTextureDescriptor, val: u32); + pub fn set_usage(this: &GpuTextureDescriptor, val: u32); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `viewFormats` field of this object."] #[doc = ""] @@ -104,8 +153,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "viewFormats")] pub fn get_view_formats(this: &GpuTextureDescriptor) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `viewFormats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "viewFormats")] - fn set_view_formats(this: &GpuTextureDescriptor, val: &::wasm_bindgen::JsValue); + pub fn set_view_formats(this: &GpuTextureDescriptor, val: &::wasm_bindgen::JsValue); } #[cfg(web_sys_unstable_apis)] impl GpuTextureDescriptor { @@ -125,91 +181,51 @@ impl GpuTextureDescriptor { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `label` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuTextureDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_label()` instead."] pub fn label(&mut self, val: &str) -> &mut Self { self.set_label(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureDimension")] - #[doc = "Change the `dimension` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuTextureDescriptor`, `GpuTextureDimension`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_dimension()` instead."] pub fn dimension(&mut self, val: GpuTextureDimension) -> &mut Self { self.set_dimension(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureFormat")] - #[doc = "Change the `format` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuTextureDescriptor`, `GpuTextureFormat`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_format()` instead."] pub fn format(&mut self, val: GpuTextureFormat) -> &mut Self { self.set_format(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `mipLevelCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuTextureDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_mip_level_count()` instead."] pub fn mip_level_count(&mut self, val: u32) -> &mut Self { self.set_mip_level_count(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `sampleCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuTextureDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_sample_count()` instead."] pub fn sample_count(&mut self, val: u32) -> &mut Self { self.set_sample_count(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `size` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuTextureDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_size()` instead."] pub fn size(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_size(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `usage` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuTextureDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_usage()` instead."] pub fn usage(&mut self, val: u32) -> &mut Self { self.set_usage(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `viewFormats` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuTextureDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_view_formats()` instead."] pub fn view_formats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_view_formats(val); self diff --git a/crates/web-sys/src/features/gen_GpuTextureViewDescriptor.rs b/crates/web-sys/src/features/gen_GpuTextureViewDescriptor.rs index 4796b2ed31fd..2a2b4014f45c 100644 --- a/crates/web-sys/src/features/gen_GpuTextureViewDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuTextureViewDescriptor.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "label")] pub fn get_label(this: &GpuTextureViewDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureViewDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "label")] - fn set_label(this: &GpuTextureViewDescriptor, val: &str); + pub fn set_label(this: &GpuTextureViewDescriptor, val: &str); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `arrayLayerCount` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "arrayLayerCount")] pub fn get_array_layer_count(this: &GpuTextureViewDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `arrayLayerCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureViewDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "arrayLayerCount")] - fn set_array_layer_count(this: &GpuTextureViewDescriptor, val: u32); + pub fn set_array_layer_count(this: &GpuTextureViewDescriptor, val: u32); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureAspect")] #[doc = "Get the `aspect` field of this object."] @@ -46,9 +60,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "aspect")] pub fn get_aspect(this: &GpuTextureViewDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureAspect")] + #[doc = "Change the `aspect` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureAspect`, `GpuTextureViewDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "aspect")] - fn set_aspect(this: &GpuTextureViewDescriptor, val: GpuTextureAspect); + pub fn set_aspect(this: &GpuTextureViewDescriptor, val: GpuTextureAspect); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `baseArrayLayer` field of this object."] #[doc = ""] @@ -58,8 +79,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "baseArrayLayer")] pub fn get_base_array_layer(this: &GpuTextureViewDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `baseArrayLayer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureViewDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "baseArrayLayer")] - fn set_base_array_layer(this: &GpuTextureViewDescriptor, val: u32); + pub fn set_base_array_layer(this: &GpuTextureViewDescriptor, val: u32); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `baseMipLevel` field of this object."] #[doc = ""] @@ -69,8 +97,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "baseMipLevel")] pub fn get_base_mip_level(this: &GpuTextureViewDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `baseMipLevel` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureViewDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "baseMipLevel")] - fn set_base_mip_level(this: &GpuTextureViewDescriptor, val: u32); + pub fn set_base_mip_level(this: &GpuTextureViewDescriptor, val: u32); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureViewDimension")] #[doc = "Get the `dimension` field of this object."] @@ -81,9 +116,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "dimension")] pub fn get_dimension(this: &GpuTextureViewDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureViewDimension")] + #[doc = "Change the `dimension` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureViewDescriptor`, `GpuTextureViewDimension`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "dimension")] - fn set_dimension(this: &GpuTextureViewDescriptor, val: GpuTextureViewDimension); + pub fn set_dimension(this: &GpuTextureViewDescriptor, val: GpuTextureViewDimension); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureFormat")] #[doc = "Get the `format` field of this object."] @@ -94,9 +136,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "format")] pub fn get_format(this: &GpuTextureViewDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureFormat")] + #[doc = "Change the `format` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureFormat`, `GpuTextureViewDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "format")] - fn set_format(this: &GpuTextureViewDescriptor, val: GpuTextureFormat); + pub fn set_format(this: &GpuTextureViewDescriptor, val: GpuTextureFormat); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `mipLevelCount` field of this object."] #[doc = ""] @@ -106,8 +155,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "mipLevelCount")] pub fn get_mip_level_count(this: &GpuTextureViewDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `mipLevelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureViewDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "mipLevelCount")] - fn set_mip_level_count(this: &GpuTextureViewDescriptor, val: u32); + pub fn set_mip_level_count(this: &GpuTextureViewDescriptor, val: u32); } #[cfg(web_sys_unstable_apis)] impl GpuTextureViewDescriptor { @@ -123,92 +179,52 @@ impl GpuTextureViewDescriptor { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `label` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuTextureViewDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_label()` instead."] pub fn label(&mut self, val: &str) -> &mut Self { self.set_label(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `arrayLayerCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuTextureViewDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_array_layer_count()` instead."] pub fn array_layer_count(&mut self, val: u32) -> &mut Self { self.set_array_layer_count(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureAspect")] - #[doc = "Change the `aspect` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuTextureAspect`, `GpuTextureViewDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_aspect()` instead."] pub fn aspect(&mut self, val: GpuTextureAspect) -> &mut Self { self.set_aspect(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `baseArrayLayer` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuTextureViewDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_base_array_layer()` instead."] pub fn base_array_layer(&mut self, val: u32) -> &mut Self { self.set_base_array_layer(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `baseMipLevel` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuTextureViewDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_base_mip_level()` instead."] pub fn base_mip_level(&mut self, val: u32) -> &mut Self { self.set_base_mip_level(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureViewDimension")] - #[doc = "Change the `dimension` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuTextureViewDescriptor`, `GpuTextureViewDimension`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_dimension()` instead."] pub fn dimension(&mut self, val: GpuTextureViewDimension) -> &mut Self { self.set_dimension(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureFormat")] - #[doc = "Change the `format` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuTextureFormat`, `GpuTextureViewDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_format()` instead."] pub fn format(&mut self, val: GpuTextureFormat) -> &mut Self { self.set_format(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `mipLevelCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuTextureViewDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_mip_level_count()` instead."] pub fn mip_level_count(&mut self, val: u32) -> &mut Self { self.set_mip_level_count(val); self diff --git a/crates/web-sys/src/features/gen_GpuUncapturedErrorEventInit.rs b/crates/web-sys/src/features/gen_GpuUncapturedErrorEventInit.rs index c84b1294b0a8..ad6aeef6943e 100644 --- a/crates/web-sys/src/features/gen_GpuUncapturedErrorEventInit.rs +++ b/crates/web-sys/src/features/gen_GpuUncapturedErrorEventInit.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &GpuUncapturedErrorEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuUncapturedErrorEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &GpuUncapturedErrorEventInit, val: bool); + pub fn set_bubbles(this: &GpuUncapturedErrorEventInit, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `cancelable` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &GpuUncapturedErrorEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuUncapturedErrorEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &GpuUncapturedErrorEventInit, val: bool); + pub fn set_cancelable(this: &GpuUncapturedErrorEventInit, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `composed` field of this object."] #[doc = ""] @@ -45,8 +59,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &GpuUncapturedErrorEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuUncapturedErrorEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &GpuUncapturedErrorEventInit, val: bool); + pub fn set_composed(this: &GpuUncapturedErrorEventInit, val: bool); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuError")] #[doc = "Get the `error` field of this object."] @@ -57,9 +78,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "error")] pub fn get_error(this: &GpuUncapturedErrorEventInit) -> GpuError; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuError")] + #[doc = "Change the `error` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuError`, `GpuUncapturedErrorEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "error")] - fn set_error(this: &GpuUncapturedErrorEventInit, val: &GpuError); + pub fn set_error(this: &GpuUncapturedErrorEventInit, val: &GpuError); } #[cfg(web_sys_unstable_apis)] impl GpuUncapturedErrorEventInit { @@ -77,46 +105,26 @@ impl GpuUncapturedErrorEventInit { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuUncapturedErrorEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuUncapturedErrorEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuUncapturedErrorEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuError")] - #[doc = "Change the `error` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuError`, `GpuUncapturedErrorEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_error()` instead."] pub fn error(&mut self, val: &GpuError) -> &mut Self { self.set_error(val); self diff --git a/crates/web-sys/src/features/gen_GpuVertexAttribute.rs b/crates/web-sys/src/features/gen_GpuVertexAttribute.rs index 5d64dec9a419..b2dba6dc8c47 100644 --- a/crates/web-sys/src/features/gen_GpuVertexAttribute.rs +++ b/crates/web-sys/src/features/gen_GpuVertexAttribute.rs @@ -24,9 +24,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "format")] pub fn get_format(this: &GpuVertexAttribute) -> GpuVertexFormat; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuVertexFormat")] + #[doc = "Change the `format` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuVertexAttribute`, `GpuVertexFormat`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "format")] - fn set_format(this: &GpuVertexAttribute, val: GpuVertexFormat); + pub fn set_format(this: &GpuVertexAttribute, val: GpuVertexFormat); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `offset` field of this object."] #[doc = ""] @@ -36,8 +43,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "offset")] pub fn get_offset(this: &GpuVertexAttribute) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `offset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuVertexAttribute`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "offset")] - fn set_offset(this: &GpuVertexAttribute, val: f64); + pub fn set_offset(this: &GpuVertexAttribute, val: f64); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `shaderLocation` field of this object."] #[doc = ""] @@ -47,8 +61,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "shaderLocation")] pub fn get_shader_location(this: &GpuVertexAttribute) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `shaderLocation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuVertexAttribute`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "shaderLocation")] - fn set_shader_location(this: &GpuVertexAttribute, val: u32); + pub fn set_shader_location(this: &GpuVertexAttribute, val: u32); } #[cfg(web_sys_unstable_apis)] impl GpuVertexAttribute { @@ -69,34 +90,19 @@ impl GpuVertexAttribute { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuVertexFormat")] - #[doc = "Change the `format` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuVertexAttribute`, `GpuVertexFormat`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_format()` instead."] pub fn format(&mut self, val: GpuVertexFormat) -> &mut Self { self.set_format(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `offset` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuVertexAttribute`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_offset()` instead."] pub fn offset(&mut self, val: f64) -> &mut Self { self.set_offset(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `shaderLocation` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuVertexAttribute`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_shader_location()` instead."] pub fn shader_location(&mut self, val: u32) -> &mut Self { self.set_shader_location(val); self diff --git a/crates/web-sys/src/features/gen_GpuVertexBufferLayout.rs b/crates/web-sys/src/features/gen_GpuVertexBufferLayout.rs index 6a260dcba133..267152e982c8 100644 --- a/crates/web-sys/src/features/gen_GpuVertexBufferLayout.rs +++ b/crates/web-sys/src/features/gen_GpuVertexBufferLayout.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "arrayStride")] pub fn get_array_stride(this: &GpuVertexBufferLayout) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `arrayStride` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuVertexBufferLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "arrayStride")] - fn set_array_stride(this: &GpuVertexBufferLayout, val: f64); + pub fn set_array_stride(this: &GpuVertexBufferLayout, val: f64); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `attributes` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "attributes")] pub fn get_attributes(this: &GpuVertexBufferLayout) -> ::js_sys::Array; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `attributes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuVertexBufferLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "attributes")] - fn set_attributes(this: &GpuVertexBufferLayout, val: &::wasm_bindgen::JsValue); + pub fn set_attributes(this: &GpuVertexBufferLayout, val: &::wasm_bindgen::JsValue); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuVertexStepMode")] #[doc = "Get the `stepMode` field of this object."] @@ -46,9 +60,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "stepMode")] pub fn get_step_mode(this: &GpuVertexBufferLayout) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuVertexStepMode")] + #[doc = "Change the `stepMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuVertexBufferLayout`, `GpuVertexStepMode`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "stepMode")] - fn set_step_mode(this: &GpuVertexBufferLayout, val: GpuVertexStepMode); + pub fn set_step_mode(this: &GpuVertexBufferLayout, val: GpuVertexStepMode); } #[cfg(web_sys_unstable_apis)] impl GpuVertexBufferLayout { @@ -66,35 +87,20 @@ impl GpuVertexBufferLayout { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `arrayStride` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuVertexBufferLayout`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_array_stride()` instead."] pub fn array_stride(&mut self, val: f64) -> &mut Self { self.set_array_stride(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `attributes` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuVertexBufferLayout`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_attributes()` instead."] pub fn attributes(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_attributes(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuVertexStepMode")] - #[doc = "Change the `stepMode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuVertexBufferLayout`, `GpuVertexStepMode`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_step_mode()` instead."] pub fn step_mode(&mut self, val: GpuVertexStepMode) -> &mut Self { self.set_step_mode(val); self diff --git a/crates/web-sys/src/features/gen_GpuVertexState.rs b/crates/web-sys/src/features/gen_GpuVertexState.rs index 3225fb570ad0..29bc317bd66b 100644 --- a/crates/web-sys/src/features/gen_GpuVertexState.rs +++ b/crates/web-sys/src/features/gen_GpuVertexState.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "entryPoint")] pub fn get_entry_point(this: &GpuVertexState) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `entryPoint` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuVertexState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "entryPoint")] - fn set_entry_point(this: &GpuVertexState, val: &str); + pub fn set_entry_point(this: &GpuVertexState, val: &str); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuShaderModule")] #[doc = "Get the `module` field of this object."] @@ -35,9 +42,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "module")] pub fn get_module(this: &GpuVertexState) -> GpuShaderModule; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuShaderModule")] + #[doc = "Change the `module` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuShaderModule`, `GpuVertexState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "module")] - fn set_module(this: &GpuVertexState, val: &GpuShaderModule); + pub fn set_module(this: &GpuVertexState, val: &GpuShaderModule); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `buffers` field of this object."] #[doc = ""] @@ -47,8 +61,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "buffers")] pub fn get_buffers(this: &GpuVertexState) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `buffers` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuVertexState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "buffers")] - fn set_buffers(this: &GpuVertexState, val: &::wasm_bindgen::JsValue); + pub fn set_buffers(this: &GpuVertexState, val: &::wasm_bindgen::JsValue); } #[cfg(web_sys_unstable_apis)] impl GpuVertexState { @@ -66,35 +87,20 @@ impl GpuVertexState { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `entryPoint` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuVertexState`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_entry_point()` instead."] pub fn entry_point(&mut self, val: &str) -> &mut Self { self.set_entry_point(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuShaderModule")] - #[doc = "Change the `module` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuShaderModule`, `GpuVertexState`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_module()` instead."] pub fn module(&mut self, val: &GpuShaderModule) -> &mut Self { self.set_module(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `buffers` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuVertexState`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_buffers()` instead."] pub fn buffers(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_buffers(val); self diff --git a/crates/web-sys/src/features/gen_GroupedHistoryEventInit.rs b/crates/web-sys/src/features/gen_GroupedHistoryEventInit.rs index faefd8c704a6..42286df8af12 100644 --- a/crates/web-sys/src/features/gen_GroupedHistoryEventInit.rs +++ b/crates/web-sys/src/features/gen_GroupedHistoryEventInit.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `GroupedHistoryEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &GroupedHistoryEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GroupedHistoryEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &GroupedHistoryEventInit, val: bool); + pub fn set_bubbles(this: &GroupedHistoryEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `GroupedHistoryEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &GroupedHistoryEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GroupedHistoryEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &GroupedHistoryEventInit, val: bool); + pub fn set_cancelable(this: &GroupedHistoryEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `GroupedHistoryEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &GroupedHistoryEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GroupedHistoryEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &GroupedHistoryEventInit, val: bool); + pub fn set_composed(this: &GroupedHistoryEventInit, val: bool); #[cfg(feature = "Element")] #[doc = "Get the `otherBrowser` field of this object."] #[doc = ""] @@ -38,8 +47,11 @@ extern "C" { #[wasm_bindgen(method, getter = "otherBrowser")] pub fn get_other_browser(this: &GroupedHistoryEventInit) -> Option; #[cfg(feature = "Element")] + #[doc = "Change the `otherBrowser` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Element`, `GroupedHistoryEventInit`*"] #[wasm_bindgen(method, setter = "otherBrowser")] - fn set_other_browser(this: &GroupedHistoryEventInit, val: Option<&Element>); + pub fn set_other_browser(this: &GroupedHistoryEventInit, val: Option<&Element>); } impl GroupedHistoryEventInit { #[doc = "Construct a new `GroupedHistoryEventInit`."] @@ -50,31 +62,23 @@ impl GroupedHistoryEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GroupedHistoryEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GroupedHistoryEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GroupedHistoryEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } #[cfg(feature = "Element")] - #[doc = "Change the `otherBrowser` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `Element`, `GroupedHistoryEventInit`*"] + #[deprecated = "Use `set_other_browser()` instead."] pub fn other_browser(&mut self, val: Option<&Element>) -> &mut Self { self.set_other_browser(val); self diff --git a/crates/web-sys/src/features/gen_HalfOpenInfoDict.rs b/crates/web-sys/src/features/gen_HalfOpenInfoDict.rs index 0a2a75d2e21d..bd9cdb24c043 100644 --- a/crates/web-sys/src/features/gen_HalfOpenInfoDict.rs +++ b/crates/web-sys/src/features/gen_HalfOpenInfoDict.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `HalfOpenInfoDict`*"] #[wasm_bindgen(method, getter = "speculative")] pub fn get_speculative(this: &HalfOpenInfoDict) -> Option; + #[doc = "Change the `speculative` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HalfOpenInfoDict`*"] #[wasm_bindgen(method, setter = "speculative")] - fn set_speculative(this: &HalfOpenInfoDict, val: bool); + pub fn set_speculative(this: &HalfOpenInfoDict, val: bool); } impl HalfOpenInfoDict { #[doc = "Construct a new `HalfOpenInfoDict`."] @@ -27,9 +30,7 @@ impl HalfOpenInfoDict { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `speculative` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HalfOpenInfoDict`*"] + #[deprecated = "Use `set_speculative()` instead."] pub fn speculative(&mut self, val: bool) -> &mut Self { self.set_speculative(val); self diff --git a/crates/web-sys/src/features/gen_HashChangeEventInit.rs b/crates/web-sys/src/features/gen_HashChangeEventInit.rs index 656f6e4d37ef..a4b951d4c921 100644 --- a/crates/web-sys/src/features/gen_HashChangeEventInit.rs +++ b/crates/web-sys/src/features/gen_HashChangeEventInit.rs @@ -15,36 +15,51 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `HashChangeEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &HashChangeEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HashChangeEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &HashChangeEventInit, val: bool); + pub fn set_bubbles(this: &HashChangeEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HashChangeEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &HashChangeEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HashChangeEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &HashChangeEventInit, val: bool); + pub fn set_cancelable(this: &HashChangeEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HashChangeEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &HashChangeEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HashChangeEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &HashChangeEventInit, val: bool); + pub fn set_composed(this: &HashChangeEventInit, val: bool); #[doc = "Get the `newURL` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HashChangeEventInit`*"] #[wasm_bindgen(method, getter = "newURL")] pub fn get_new_url(this: &HashChangeEventInit) -> Option; + #[doc = "Change the `newURL` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HashChangeEventInit`*"] #[wasm_bindgen(method, setter = "newURL")] - fn set_new_url(this: &HashChangeEventInit, val: &str); + pub fn set_new_url(this: &HashChangeEventInit, val: &str); #[doc = "Get the `oldURL` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HashChangeEventInit`*"] #[wasm_bindgen(method, getter = "oldURL")] pub fn get_old_url(this: &HashChangeEventInit) -> Option; + #[doc = "Change the `oldURL` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HashChangeEventInit`*"] #[wasm_bindgen(method, setter = "oldURL")] - fn set_old_url(this: &HashChangeEventInit, val: &str); + pub fn set_old_url(this: &HashChangeEventInit, val: &str); } impl HashChangeEventInit { #[doc = "Construct a new `HashChangeEventInit`."] @@ -55,37 +70,27 @@ impl HashChangeEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HashChangeEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HashChangeEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HashChangeEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } - #[doc = "Change the `newURL` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HashChangeEventInit`*"] + #[deprecated = "Use `set_new_url()` instead."] pub fn new_url(&mut self, val: &str) -> &mut Self { self.set_new_url(val); self } - #[doc = "Change the `oldURL` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HashChangeEventInit`*"] + #[deprecated = "Use `set_old_url()` instead."] pub fn old_url(&mut self, val: &str) -> &mut Self { self.set_old_url(val); self diff --git a/crates/web-sys/src/features/gen_HidCollectionInfo.rs b/crates/web-sys/src/features/gen_HidCollectionInfo.rs index 150d970b70aa..e151d69409d1 100644 --- a/crates/web-sys/src/features/gen_HidCollectionInfo.rs +++ b/crates/web-sys/src/features/gen_HidCollectionInfo.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "children")] pub fn get_children(this: &HidCollectionInfo) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `children` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidCollectionInfo`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "children")] - fn set_children(this: &HidCollectionInfo, val: &::wasm_bindgen::JsValue); + pub fn set_children(this: &HidCollectionInfo, val: &::wasm_bindgen::JsValue); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `featureReports` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "featureReports")] pub fn get_feature_reports(this: &HidCollectionInfo) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `featureReports` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidCollectionInfo`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "featureReports")] - fn set_feature_reports(this: &HidCollectionInfo, val: &::wasm_bindgen::JsValue); + pub fn set_feature_reports(this: &HidCollectionInfo, val: &::wasm_bindgen::JsValue); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `inputReports` field of this object."] #[doc = ""] @@ -45,8 +59,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "inputReports")] pub fn get_input_reports(this: &HidCollectionInfo) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `inputReports` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidCollectionInfo`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "inputReports")] - fn set_input_reports(this: &HidCollectionInfo, val: &::wasm_bindgen::JsValue); + pub fn set_input_reports(this: &HidCollectionInfo, val: &::wasm_bindgen::JsValue); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `outputReports` field of this object."] #[doc = ""] @@ -56,8 +77,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "outputReports")] pub fn get_output_reports(this: &HidCollectionInfo) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `outputReports` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidCollectionInfo`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "outputReports")] - fn set_output_reports(this: &HidCollectionInfo, val: &::wasm_bindgen::JsValue); + pub fn set_output_reports(this: &HidCollectionInfo, val: &::wasm_bindgen::JsValue); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `type` field of this object."] #[doc = ""] @@ -67,8 +95,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "type")] pub fn get_type(this: &HidCollectionInfo) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidCollectionInfo`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "type")] - fn set_type(this: &HidCollectionInfo, val: u8); + pub fn set_type(this: &HidCollectionInfo, val: u8); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `usage` field of this object."] #[doc = ""] @@ -78,8 +113,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "usage")] pub fn get_usage(this: &HidCollectionInfo) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `usage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidCollectionInfo`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "usage")] - fn set_usage(this: &HidCollectionInfo, val: u16); + pub fn set_usage(this: &HidCollectionInfo, val: u16); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `usagePage` field of this object."] #[doc = ""] @@ -89,8 +131,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "usagePage")] pub fn get_usage_page(this: &HidCollectionInfo) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `usagePage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidCollectionInfo`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "usagePage")] - fn set_usage_page(this: &HidCollectionInfo, val: u16); + pub fn set_usage_page(this: &HidCollectionInfo, val: u16); } #[cfg(web_sys_unstable_apis)] impl HidCollectionInfo { @@ -106,78 +155,43 @@ impl HidCollectionInfo { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `children` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidCollectionInfo`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_children()` instead."] pub fn children(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_children(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `featureReports` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidCollectionInfo`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_feature_reports()` instead."] pub fn feature_reports(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_feature_reports(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `inputReports` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidCollectionInfo`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_input_reports()` instead."] pub fn input_reports(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_input_reports(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `outputReports` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidCollectionInfo`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_output_reports()` instead."] pub fn output_reports(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_output_reports(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidCollectionInfo`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: u8) -> &mut Self { self.set_type(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `usage` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidCollectionInfo`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_usage()` instead."] pub fn usage(&mut self, val: u16) -> &mut Self { self.set_usage(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `usagePage` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidCollectionInfo`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_usage_page()` instead."] pub fn usage_page(&mut self, val: u16) -> &mut Self { self.set_usage_page(val); self diff --git a/crates/web-sys/src/features/gen_HidConnectionEventInit.rs b/crates/web-sys/src/features/gen_HidConnectionEventInit.rs index 7413fab34ade..3faf25b8854d 100644 --- a/crates/web-sys/src/features/gen_HidConnectionEventInit.rs +++ b/crates/web-sys/src/features/gen_HidConnectionEventInit.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &HidConnectionEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidConnectionEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &HidConnectionEventInit, val: bool); + pub fn set_bubbles(this: &HidConnectionEventInit, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `cancelable` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &HidConnectionEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidConnectionEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &HidConnectionEventInit, val: bool); + pub fn set_cancelable(this: &HidConnectionEventInit, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `composed` field of this object."] #[doc = ""] @@ -45,8 +59,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &HidConnectionEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidConnectionEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &HidConnectionEventInit, val: bool); + pub fn set_composed(this: &HidConnectionEventInit, val: bool); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "HidDevice")] #[doc = "Get the `device` field of this object."] @@ -57,9 +78,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "device")] pub fn get_device(this: &HidConnectionEventInit) -> HidDevice; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "HidDevice")] + #[doc = "Change the `device` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidConnectionEventInit`, `HidDevice`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "device")] - fn set_device(this: &HidConnectionEventInit, val: &HidDevice); + pub fn set_device(this: &HidConnectionEventInit, val: &HidDevice); } #[cfg(web_sys_unstable_apis)] impl HidConnectionEventInit { @@ -77,46 +105,26 @@ impl HidConnectionEventInit { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidConnectionEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidConnectionEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidConnectionEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "HidDevice")] - #[doc = "Change the `device` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidConnectionEventInit`, `HidDevice`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_device()` instead."] pub fn device(&mut self, val: &HidDevice) -> &mut Self { self.set_device(val); self diff --git a/crates/web-sys/src/features/gen_HidDeviceFilter.rs b/crates/web-sys/src/features/gen_HidDeviceFilter.rs index 1c4b61cd9eb1..d7fd6c7e389c 100644 --- a/crates/web-sys/src/features/gen_HidDeviceFilter.rs +++ b/crates/web-sys/src/features/gen_HidDeviceFilter.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "productId")] pub fn get_product_id(this: &HidDeviceFilter) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `productId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidDeviceFilter`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "productId")] - fn set_product_id(this: &HidDeviceFilter, val: u16); + pub fn set_product_id(this: &HidDeviceFilter, val: u16); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `usage` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "usage")] pub fn get_usage(this: &HidDeviceFilter) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `usage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidDeviceFilter`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "usage")] - fn set_usage(this: &HidDeviceFilter, val: u16); + pub fn set_usage(this: &HidDeviceFilter, val: u16); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `usagePage` field of this object."] #[doc = ""] @@ -45,8 +59,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "usagePage")] pub fn get_usage_page(this: &HidDeviceFilter) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `usagePage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidDeviceFilter`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "usagePage")] - fn set_usage_page(this: &HidDeviceFilter, val: u16); + pub fn set_usage_page(this: &HidDeviceFilter, val: u16); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `vendorId` field of this object."] #[doc = ""] @@ -56,8 +77,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "vendorId")] pub fn get_vendor_id(this: &HidDeviceFilter) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `vendorId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidDeviceFilter`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "vendorId")] - fn set_vendor_id(this: &HidDeviceFilter, val: u32); + pub fn set_vendor_id(this: &HidDeviceFilter, val: u32); } #[cfg(web_sys_unstable_apis)] impl HidDeviceFilter { @@ -73,45 +101,25 @@ impl HidDeviceFilter { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `productId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidDeviceFilter`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_product_id()` instead."] pub fn product_id(&mut self, val: u16) -> &mut Self { self.set_product_id(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `usage` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidDeviceFilter`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_usage()` instead."] pub fn usage(&mut self, val: u16) -> &mut Self { self.set_usage(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `usagePage` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidDeviceFilter`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_usage_page()` instead."] pub fn usage_page(&mut self, val: u16) -> &mut Self { self.set_usage_page(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `vendorId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidDeviceFilter`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_vendor_id()` instead."] pub fn vendor_id(&mut self, val: u32) -> &mut Self { self.set_vendor_id(val); self diff --git a/crates/web-sys/src/features/gen_HidDeviceRequestOptions.rs b/crates/web-sys/src/features/gen_HidDeviceRequestOptions.rs index 472219f638c9..81faf1780ef0 100644 --- a/crates/web-sys/src/features/gen_HidDeviceRequestOptions.rs +++ b/crates/web-sys/src/features/gen_HidDeviceRequestOptions.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "filters")] pub fn get_filters(this: &HidDeviceRequestOptions) -> ::js_sys::Array; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `filters` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidDeviceRequestOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "filters")] - fn set_filters(this: &HidDeviceRequestOptions, val: &::wasm_bindgen::JsValue); + pub fn set_filters(this: &HidDeviceRequestOptions, val: &::wasm_bindgen::JsValue); } #[cfg(web_sys_unstable_apis)] impl HidDeviceRequestOptions { @@ -41,12 +48,7 @@ impl HidDeviceRequestOptions { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `filters` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidDeviceRequestOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_filters()` instead."] pub fn filters(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_filters(val); self diff --git a/crates/web-sys/src/features/gen_HidInputReportEventInit.rs b/crates/web-sys/src/features/gen_HidInputReportEventInit.rs index f87226879e8b..b13704deac92 100644 --- a/crates/web-sys/src/features/gen_HidInputReportEventInit.rs +++ b/crates/web-sys/src/features/gen_HidInputReportEventInit.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &HidInputReportEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidInputReportEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &HidInputReportEventInit, val: bool); + pub fn set_bubbles(this: &HidInputReportEventInit, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `cancelable` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &HidInputReportEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidInputReportEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &HidInputReportEventInit, val: bool); + pub fn set_cancelable(this: &HidInputReportEventInit, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `composed` field of this object."] #[doc = ""] @@ -45,8 +59,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &HidInputReportEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidInputReportEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &HidInputReportEventInit, val: bool); + pub fn set_composed(this: &HidInputReportEventInit, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `data` field of this object."] #[doc = ""] @@ -56,8 +77,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "data")] pub fn get_data(this: &HidInputReportEventInit) -> ::js_sys::DataView; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidInputReportEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "data")] - fn set_data(this: &HidInputReportEventInit, val: &::js_sys::DataView); + pub fn set_data(this: &HidInputReportEventInit, val: &::js_sys::DataView); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "HidDevice")] #[doc = "Get the `device` field of this object."] @@ -68,9 +96,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "device")] pub fn get_device(this: &HidInputReportEventInit) -> HidDevice; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "HidDevice")] + #[doc = "Change the `device` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidDevice`, `HidInputReportEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "device")] - fn set_device(this: &HidInputReportEventInit, val: &HidDevice); + pub fn set_device(this: &HidInputReportEventInit, val: &HidDevice); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `reportId` field of this object."] #[doc = ""] @@ -80,8 +115,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "reportId")] pub fn get_report_id(this: &HidInputReportEventInit) -> u8; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `reportId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidInputReportEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "reportId")] - fn set_report_id(this: &HidInputReportEventInit, val: u8); + pub fn set_report_id(this: &HidInputReportEventInit, val: u8); } #[cfg(web_sys_unstable_apis)] impl HidInputReportEventInit { @@ -101,68 +143,38 @@ impl HidInputReportEventInit { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidInputReportEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidInputReportEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidInputReportEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `data` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidInputReportEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_data()` instead."] pub fn data(&mut self, val: &::js_sys::DataView) -> &mut Self { self.set_data(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "HidDevice")] - #[doc = "Change the `device` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidDevice`, `HidInputReportEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_device()` instead."] pub fn device(&mut self, val: &HidDevice) -> &mut Self { self.set_device(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `reportId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidInputReportEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_report_id()` instead."] pub fn report_id(&mut self, val: u8) -> &mut Self { self.set_report_id(val); self diff --git a/crates/web-sys/src/features/gen_HidReportInfo.rs b/crates/web-sys/src/features/gen_HidReportInfo.rs index e493377ca818..4da0d00dbcc0 100644 --- a/crates/web-sys/src/features/gen_HidReportInfo.rs +++ b/crates/web-sys/src/features/gen_HidReportInfo.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "items")] pub fn get_items(this: &HidReportInfo) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `items` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportInfo`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "items")] - fn set_items(this: &HidReportInfo, val: &::wasm_bindgen::JsValue); + pub fn set_items(this: &HidReportInfo, val: &::wasm_bindgen::JsValue); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `reportId` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "reportId")] pub fn get_report_id(this: &HidReportInfo) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `reportId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportInfo`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "reportId")] - fn set_report_id(this: &HidReportInfo, val: u8); + pub fn set_report_id(this: &HidReportInfo, val: u8); } #[cfg(web_sys_unstable_apis)] impl HidReportInfo { @@ -51,23 +65,13 @@ impl HidReportInfo { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `items` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidReportInfo`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_items()` instead."] pub fn items(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_items(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `reportId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidReportInfo`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_report_id()` instead."] pub fn report_id(&mut self, val: u8) -> &mut Self { self.set_report_id(val); self diff --git a/crates/web-sys/src/features/gen_HidReportItem.rs b/crates/web-sys/src/features/gen_HidReportItem.rs index feae7563a66a..c483ecd5598d 100644 --- a/crates/web-sys/src/features/gen_HidReportItem.rs +++ b/crates/web-sys/src/features/gen_HidReportItem.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "hasNull")] pub fn get_has_null(this: &HidReportItem) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `hasNull` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "hasNull")] - fn set_has_null(this: &HidReportItem, val: bool); + pub fn set_has_null(this: &HidReportItem, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `hasPreferredState` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "hasPreferredState")] pub fn get_has_preferred_state(this: &HidReportItem) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `hasPreferredState` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "hasPreferredState")] - fn set_has_preferred_state(this: &HidReportItem, val: bool); + pub fn set_has_preferred_state(this: &HidReportItem, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `isAbsolute` field of this object."] #[doc = ""] @@ -45,8 +59,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "isAbsolute")] pub fn get_is_absolute(this: &HidReportItem) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `isAbsolute` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "isAbsolute")] - fn set_is_absolute(this: &HidReportItem, val: bool); + pub fn set_is_absolute(this: &HidReportItem, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `isArray` field of this object."] #[doc = ""] @@ -56,8 +77,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "isArray")] pub fn get_is_array(this: &HidReportItem) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `isArray` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "isArray")] - fn set_is_array(this: &HidReportItem, val: bool); + pub fn set_is_array(this: &HidReportItem, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `isBufferedBytes` field of this object."] #[doc = ""] @@ -67,8 +95,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "isBufferedBytes")] pub fn get_is_buffered_bytes(this: &HidReportItem) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `isBufferedBytes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "isBufferedBytes")] - fn set_is_buffered_bytes(this: &HidReportItem, val: bool); + pub fn set_is_buffered_bytes(this: &HidReportItem, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `isConstant` field of this object."] #[doc = ""] @@ -78,8 +113,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "isConstant")] pub fn get_is_constant(this: &HidReportItem) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `isConstant` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "isConstant")] - fn set_is_constant(this: &HidReportItem, val: bool); + pub fn set_is_constant(this: &HidReportItem, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `isLinear` field of this object."] #[doc = ""] @@ -89,8 +131,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "isLinear")] pub fn get_is_linear(this: &HidReportItem) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `isLinear` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "isLinear")] - fn set_is_linear(this: &HidReportItem, val: bool); + pub fn set_is_linear(this: &HidReportItem, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `isRange` field of this object."] #[doc = ""] @@ -100,8 +149,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "isRange")] pub fn get_is_range(this: &HidReportItem) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `isRange` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "isRange")] - fn set_is_range(this: &HidReportItem, val: bool); + pub fn set_is_range(this: &HidReportItem, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `isVolatile` field of this object."] #[doc = ""] @@ -111,8 +167,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "isVolatile")] pub fn get_is_volatile(this: &HidReportItem) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `isVolatile` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "isVolatile")] - fn set_is_volatile(this: &HidReportItem, val: bool); + pub fn set_is_volatile(this: &HidReportItem, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `logicalMaximum` field of this object."] #[doc = ""] @@ -122,8 +185,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "logicalMaximum")] pub fn get_logical_maximum(this: &HidReportItem) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `logicalMaximum` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "logicalMaximum")] - fn set_logical_maximum(this: &HidReportItem, val: i32); + pub fn set_logical_maximum(this: &HidReportItem, val: i32); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `logicalMinimum` field of this object."] #[doc = ""] @@ -133,8 +203,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "logicalMinimum")] pub fn get_logical_minimum(this: &HidReportItem) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `logicalMinimum` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "logicalMinimum")] - fn set_logical_minimum(this: &HidReportItem, val: i32); + pub fn set_logical_minimum(this: &HidReportItem, val: i32); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `physicalMaximum` field of this object."] #[doc = ""] @@ -144,8 +221,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "physicalMaximum")] pub fn get_physical_maximum(this: &HidReportItem) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `physicalMaximum` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "physicalMaximum")] - fn set_physical_maximum(this: &HidReportItem, val: i32); + pub fn set_physical_maximum(this: &HidReportItem, val: i32); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `physicalMinimum` field of this object."] #[doc = ""] @@ -155,8 +239,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "physicalMinimum")] pub fn get_physical_minimum(this: &HidReportItem) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `physicalMinimum` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "physicalMinimum")] - fn set_physical_minimum(this: &HidReportItem, val: i32); + pub fn set_physical_minimum(this: &HidReportItem, val: i32); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `reportCount` field of this object."] #[doc = ""] @@ -166,8 +257,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "reportCount")] pub fn get_report_count(this: &HidReportItem) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `reportCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "reportCount")] - fn set_report_count(this: &HidReportItem, val: u16); + pub fn set_report_count(this: &HidReportItem, val: u16); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `reportSize` field of this object."] #[doc = ""] @@ -177,8 +275,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "reportSize")] pub fn get_report_size(this: &HidReportItem) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `reportSize` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "reportSize")] - fn set_report_size(this: &HidReportItem, val: u16); + pub fn set_report_size(this: &HidReportItem, val: u16); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `strings` field of this object."] #[doc = ""] @@ -188,8 +293,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "strings")] pub fn get_strings(this: &HidReportItem) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `strings` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "strings")] - fn set_strings(this: &HidReportItem, val: &::wasm_bindgen::JsValue); + pub fn set_strings(this: &HidReportItem, val: &::wasm_bindgen::JsValue); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `unitExponent` field of this object."] #[doc = ""] @@ -199,8 +311,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "unitExponent")] pub fn get_unit_exponent(this: &HidReportItem) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `unitExponent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "unitExponent")] - fn set_unit_exponent(this: &HidReportItem, val: i8); + pub fn set_unit_exponent(this: &HidReportItem, val: i8); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `unitFactorCurrentExponent` field of this object."] #[doc = ""] @@ -210,8 +329,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "unitFactorCurrentExponent")] pub fn get_unit_factor_current_exponent(this: &HidReportItem) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `unitFactorCurrentExponent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "unitFactorCurrentExponent")] - fn set_unit_factor_current_exponent(this: &HidReportItem, val: i8); + pub fn set_unit_factor_current_exponent(this: &HidReportItem, val: i8); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `unitFactorLengthExponent` field of this object."] #[doc = ""] @@ -221,8 +347,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "unitFactorLengthExponent")] pub fn get_unit_factor_length_exponent(this: &HidReportItem) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `unitFactorLengthExponent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "unitFactorLengthExponent")] - fn set_unit_factor_length_exponent(this: &HidReportItem, val: i8); + pub fn set_unit_factor_length_exponent(this: &HidReportItem, val: i8); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `unitFactorLuminousIntensityExponent` field of this object."] #[doc = ""] @@ -232,8 +365,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "unitFactorLuminousIntensityExponent")] pub fn get_unit_factor_luminous_intensity_exponent(this: &HidReportItem) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `unitFactorLuminousIntensityExponent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "unitFactorLuminousIntensityExponent")] - fn set_unit_factor_luminous_intensity_exponent(this: &HidReportItem, val: i8); + pub fn set_unit_factor_luminous_intensity_exponent(this: &HidReportItem, val: i8); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `unitFactorMassExponent` field of this object."] #[doc = ""] @@ -243,8 +383,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "unitFactorMassExponent")] pub fn get_unit_factor_mass_exponent(this: &HidReportItem) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `unitFactorMassExponent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "unitFactorMassExponent")] - fn set_unit_factor_mass_exponent(this: &HidReportItem, val: i8); + pub fn set_unit_factor_mass_exponent(this: &HidReportItem, val: i8); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `unitFactorTemperatureExponent` field of this object."] #[doc = ""] @@ -254,8 +401,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "unitFactorTemperatureExponent")] pub fn get_unit_factor_temperature_exponent(this: &HidReportItem) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `unitFactorTemperatureExponent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "unitFactorTemperatureExponent")] - fn set_unit_factor_temperature_exponent(this: &HidReportItem, val: i8); + pub fn set_unit_factor_temperature_exponent(this: &HidReportItem, val: i8); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `unitFactorTimeExponent` field of this object."] #[doc = ""] @@ -265,8 +419,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "unitFactorTimeExponent")] pub fn get_unit_factor_time_exponent(this: &HidReportItem) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `unitFactorTimeExponent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "unitFactorTimeExponent")] - fn set_unit_factor_time_exponent(this: &HidReportItem, val: i8); + pub fn set_unit_factor_time_exponent(this: &HidReportItem, val: i8); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "HidUnitSystem")] #[doc = "Get the `unitSystem` field of this object."] @@ -277,9 +438,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "unitSystem")] pub fn get_unit_system(this: &HidReportItem) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "HidUnitSystem")] + #[doc = "Change the `unitSystem` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`, `HidUnitSystem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "unitSystem")] - fn set_unit_system(this: &HidReportItem, val: HidUnitSystem); + pub fn set_unit_system(this: &HidReportItem, val: HidUnitSystem); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `usageMaximum` field of this object."] #[doc = ""] @@ -289,8 +457,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "usageMaximum")] pub fn get_usage_maximum(this: &HidReportItem) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `usageMaximum` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "usageMaximum")] - fn set_usage_maximum(this: &HidReportItem, val: u32); + pub fn set_usage_maximum(this: &HidReportItem, val: u32); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `usageMinimum` field of this object."] #[doc = ""] @@ -300,8 +475,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "usageMinimum")] pub fn get_usage_minimum(this: &HidReportItem) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `usageMinimum` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "usageMinimum")] - fn set_usage_minimum(this: &HidReportItem, val: u32); + pub fn set_usage_minimum(this: &HidReportItem, val: u32); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `usages` field of this object."] #[doc = ""] @@ -311,8 +493,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "usages")] pub fn get_usages(this: &HidReportItem) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `usages` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "usages")] - fn set_usages(this: &HidReportItem, val: &::wasm_bindgen::JsValue); + pub fn set_usages(this: &HidReportItem, val: &::wasm_bindgen::JsValue); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `wrap` field of this object."] #[doc = ""] @@ -322,8 +511,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "wrap")] pub fn get_wrap(this: &HidReportItem) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `wrap` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "wrap")] - fn set_wrap(this: &HidReportItem, val: bool); + pub fn set_wrap(this: &HidReportItem, val: bool); } #[cfg(web_sys_unstable_apis)] impl HidReportItem { @@ -339,310 +535,170 @@ impl HidReportItem { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `hasNull` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_has_null()` instead."] pub fn has_null(&mut self, val: bool) -> &mut Self { self.set_has_null(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `hasPreferredState` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_has_preferred_state()` instead."] pub fn has_preferred_state(&mut self, val: bool) -> &mut Self { self.set_has_preferred_state(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `isAbsolute` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_is_absolute()` instead."] pub fn is_absolute(&mut self, val: bool) -> &mut Self { self.set_is_absolute(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `isArray` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_is_array()` instead."] pub fn is_array(&mut self, val: bool) -> &mut Self { self.set_is_array(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `isBufferedBytes` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_is_buffered_bytes()` instead."] pub fn is_buffered_bytes(&mut self, val: bool) -> &mut Self { self.set_is_buffered_bytes(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `isConstant` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_is_constant()` instead."] pub fn is_constant(&mut self, val: bool) -> &mut Self { self.set_is_constant(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `isLinear` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_is_linear()` instead."] pub fn is_linear(&mut self, val: bool) -> &mut Self { self.set_is_linear(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `isRange` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_is_range()` instead."] pub fn is_range(&mut self, val: bool) -> &mut Self { self.set_is_range(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `isVolatile` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_is_volatile()` instead."] pub fn is_volatile(&mut self, val: bool) -> &mut Self { self.set_is_volatile(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `logicalMaximum` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_logical_maximum()` instead."] pub fn logical_maximum(&mut self, val: i32) -> &mut Self { self.set_logical_maximum(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `logicalMinimum` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_logical_minimum()` instead."] pub fn logical_minimum(&mut self, val: i32) -> &mut Self { self.set_logical_minimum(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `physicalMaximum` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_physical_maximum()` instead."] pub fn physical_maximum(&mut self, val: i32) -> &mut Self { self.set_physical_maximum(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `physicalMinimum` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_physical_minimum()` instead."] pub fn physical_minimum(&mut self, val: i32) -> &mut Self { self.set_physical_minimum(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `reportCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_report_count()` instead."] pub fn report_count(&mut self, val: u16) -> &mut Self { self.set_report_count(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `reportSize` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_report_size()` instead."] pub fn report_size(&mut self, val: u16) -> &mut Self { self.set_report_size(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `strings` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_strings()` instead."] pub fn strings(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_strings(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `unitExponent` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_unit_exponent()` instead."] pub fn unit_exponent(&mut self, val: i8) -> &mut Self { self.set_unit_exponent(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `unitFactorCurrentExponent` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_unit_factor_current_exponent()` instead."] pub fn unit_factor_current_exponent(&mut self, val: i8) -> &mut Self { self.set_unit_factor_current_exponent(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `unitFactorLengthExponent` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_unit_factor_length_exponent()` instead."] pub fn unit_factor_length_exponent(&mut self, val: i8) -> &mut Self { self.set_unit_factor_length_exponent(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `unitFactorLuminousIntensityExponent` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_unit_factor_luminous_intensity_exponent()` instead."] pub fn unit_factor_luminous_intensity_exponent(&mut self, val: i8) -> &mut Self { self.set_unit_factor_luminous_intensity_exponent(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `unitFactorMassExponent` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_unit_factor_mass_exponent()` instead."] pub fn unit_factor_mass_exponent(&mut self, val: i8) -> &mut Self { self.set_unit_factor_mass_exponent(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `unitFactorTemperatureExponent` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_unit_factor_temperature_exponent()` instead."] pub fn unit_factor_temperature_exponent(&mut self, val: i8) -> &mut Self { self.set_unit_factor_temperature_exponent(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `unitFactorTimeExponent` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_unit_factor_time_exponent()` instead."] pub fn unit_factor_time_exponent(&mut self, val: i8) -> &mut Self { self.set_unit_factor_time_exponent(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "HidUnitSystem")] - #[doc = "Change the `unitSystem` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidReportItem`, `HidUnitSystem`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_unit_system()` instead."] pub fn unit_system(&mut self, val: HidUnitSystem) -> &mut Self { self.set_unit_system(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `usageMaximum` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_usage_maximum()` instead."] pub fn usage_maximum(&mut self, val: u32) -> &mut Self { self.set_usage_maximum(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `usageMinimum` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_usage_minimum()` instead."] pub fn usage_minimum(&mut self, val: u32) -> &mut Self { self.set_usage_minimum(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `usages` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_usages()` instead."] pub fn usages(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_usages(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `wrap` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_wrap()` instead."] pub fn wrap(&mut self, val: bool) -> &mut Self { self.set_wrap(val); self diff --git a/crates/web-sys/src/features/gen_HiddenPluginEventInit.rs b/crates/web-sys/src/features/gen_HiddenPluginEventInit.rs index b3500eaee731..07fcd66658b0 100644 --- a/crates/web-sys/src/features/gen_HiddenPluginEventInit.rs +++ b/crates/web-sys/src/features/gen_HiddenPluginEventInit.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `HiddenPluginEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &HiddenPluginEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HiddenPluginEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &HiddenPluginEventInit, val: bool); + pub fn set_bubbles(this: &HiddenPluginEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HiddenPluginEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &HiddenPluginEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HiddenPluginEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &HiddenPluginEventInit, val: bool); + pub fn set_cancelable(this: &HiddenPluginEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HiddenPluginEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &HiddenPluginEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HiddenPluginEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &HiddenPluginEventInit, val: bool); + pub fn set_composed(this: &HiddenPluginEventInit, val: bool); } impl HiddenPluginEventInit { #[doc = "Construct a new `HiddenPluginEventInit`."] @@ -41,23 +50,17 @@ impl HiddenPluginEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HiddenPluginEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HiddenPluginEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HiddenPluginEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self diff --git a/crates/web-sys/src/features/gen_HitRegionOptions.rs b/crates/web-sys/src/features/gen_HitRegionOptions.rs index 2a2351d62004..fa0ea9ed78e6 100644 --- a/crates/web-sys/src/features/gen_HitRegionOptions.rs +++ b/crates/web-sys/src/features/gen_HitRegionOptions.rs @@ -17,15 +17,21 @@ extern "C" { #[wasm_bindgen(method, getter = "control")] pub fn get_control(this: &HitRegionOptions) -> Option; #[cfg(feature = "Element")] + #[doc = "Change the `control` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Element`, `HitRegionOptions`*"] #[wasm_bindgen(method, setter = "control")] - fn set_control(this: &HitRegionOptions, val: Option<&Element>); + pub fn set_control(this: &HitRegionOptions, val: Option<&Element>); #[doc = "Get the `id` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HitRegionOptions`*"] #[wasm_bindgen(method, getter = "id")] pub fn get_id(this: &HitRegionOptions) -> Option; + #[doc = "Change the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HitRegionOptions`*"] #[wasm_bindgen(method, setter = "id")] - fn set_id(this: &HitRegionOptions, val: &str); + pub fn set_id(this: &HitRegionOptions, val: &str); #[cfg(feature = "Path2d")] #[doc = "Get the `path` field of this object."] #[doc = ""] @@ -33,8 +39,11 @@ extern "C" { #[wasm_bindgen(method, getter = "path")] pub fn get_path(this: &HitRegionOptions) -> Option; #[cfg(feature = "Path2d")] + #[doc = "Change the `path` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HitRegionOptions`, `Path2d`*"] #[wasm_bindgen(method, setter = "path")] - fn set_path(this: &HitRegionOptions, val: Option<&Path2d>); + pub fn set_path(this: &HitRegionOptions, val: Option<&Path2d>); } impl HitRegionOptions { #[doc = "Construct a new `HitRegionOptions`."] @@ -46,24 +55,18 @@ impl HitRegionOptions { ret } #[cfg(feature = "Element")] - #[doc = "Change the `control` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `Element`, `HitRegionOptions`*"] + #[deprecated = "Use `set_control()` instead."] pub fn control(&mut self, val: Option<&Element>) -> &mut Self { self.set_control(val); self } - #[doc = "Change the `id` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HitRegionOptions`*"] + #[deprecated = "Use `set_id()` instead."] pub fn id(&mut self, val: &str) -> &mut Self { self.set_id(val); self } #[cfg(feature = "Path2d")] - #[doc = "Change the `path` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HitRegionOptions`, `Path2d`*"] + #[deprecated = "Use `set_path()` instead."] pub fn path(&mut self, val: Option<&Path2d>) -> &mut Self { self.set_path(val); self diff --git a/crates/web-sys/src/features/gen_HkdfParams.rs b/crates/web-sys/src/features/gen_HkdfParams.rs index 377dfd70fffc..e0b6f86a3326 100644 --- a/crates/web-sys/src/features/gen_HkdfParams.rs +++ b/crates/web-sys/src/features/gen_HkdfParams.rs @@ -15,29 +15,41 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `HkdfParams`*"] #[wasm_bindgen(method, getter = "name")] pub fn get_name(this: &HkdfParams) -> String; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HkdfParams`*"] #[wasm_bindgen(method, setter = "name")] - fn set_name(this: &HkdfParams, val: &str); + pub fn set_name(this: &HkdfParams, val: &str); #[doc = "Get the `hash` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HkdfParams`*"] #[wasm_bindgen(method, getter = "hash")] pub fn get_hash(this: &HkdfParams) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `hash` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HkdfParams`*"] #[wasm_bindgen(method, setter = "hash")] - fn set_hash(this: &HkdfParams, val: &::wasm_bindgen::JsValue); + pub fn set_hash(this: &HkdfParams, val: &::wasm_bindgen::JsValue); #[doc = "Get the `info` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HkdfParams`*"] #[wasm_bindgen(method, getter = "info")] pub fn get_info(this: &HkdfParams) -> ::js_sys::Object; + #[doc = "Change the `info` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HkdfParams`*"] #[wasm_bindgen(method, setter = "info")] - fn set_info(this: &HkdfParams, val: &::js_sys::Object); + pub fn set_info(this: &HkdfParams, val: &::js_sys::Object); #[doc = "Get the `salt` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HkdfParams`*"] #[wasm_bindgen(method, getter = "salt")] pub fn get_salt(this: &HkdfParams) -> ::js_sys::Object; + #[doc = "Change the `salt` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HkdfParams`*"] #[wasm_bindgen(method, setter = "salt")] - fn set_salt(this: &HkdfParams, val: &::js_sys::Object); + pub fn set_salt(this: &HkdfParams, val: &::js_sys::Object); } impl HkdfParams { #[doc = "Construct a new `HkdfParams`."] @@ -57,30 +69,22 @@ impl HkdfParams { ret.salt(salt); ret } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HkdfParams`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { self.set_name(val); self } - #[doc = "Change the `hash` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HkdfParams`*"] + #[deprecated = "Use `set_hash()` instead."] pub fn hash(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_hash(val); self } - #[doc = "Change the `info` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HkdfParams`*"] + #[deprecated = "Use `set_info()` instead."] pub fn info(&mut self, val: &::js_sys::Object) -> &mut Self { self.set_info(val); self } - #[doc = "Change the `salt` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HkdfParams`*"] + #[deprecated = "Use `set_salt()` instead."] pub fn salt(&mut self, val: &::js_sys::Object) -> &mut Self { self.set_salt(val); self diff --git a/crates/web-sys/src/features/gen_HmacDerivedKeyParams.rs b/crates/web-sys/src/features/gen_HmacDerivedKeyParams.rs index f8d41a224f8d..40047b3e4a96 100644 --- a/crates/web-sys/src/features/gen_HmacDerivedKeyParams.rs +++ b/crates/web-sys/src/features/gen_HmacDerivedKeyParams.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `HmacDerivedKeyParams`*"] #[wasm_bindgen(method, getter = "name")] pub fn get_name(this: &HmacDerivedKeyParams) -> String; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HmacDerivedKeyParams`*"] #[wasm_bindgen(method, setter = "name")] - fn set_name(this: &HmacDerivedKeyParams, val: &str); + pub fn set_name(this: &HmacDerivedKeyParams, val: &str); #[doc = "Get the `hash` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HmacDerivedKeyParams`*"] #[wasm_bindgen(method, getter = "hash")] pub fn get_hash(this: &HmacDerivedKeyParams) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `hash` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HmacDerivedKeyParams`*"] #[wasm_bindgen(method, setter = "hash")] - fn set_hash(this: &HmacDerivedKeyParams, val: &::wasm_bindgen::JsValue); + pub fn set_hash(this: &HmacDerivedKeyParams, val: &::wasm_bindgen::JsValue); #[doc = "Get the `length` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HmacDerivedKeyParams`*"] #[wasm_bindgen(method, getter = "length")] pub fn get_length(this: &HmacDerivedKeyParams) -> Option; + #[doc = "Change the `length` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HmacDerivedKeyParams`*"] #[wasm_bindgen(method, setter = "length")] - fn set_length(this: &HmacDerivedKeyParams, val: u32); + pub fn set_length(this: &HmacDerivedKeyParams, val: u32); } impl HmacDerivedKeyParams { #[doc = "Construct a new `HmacDerivedKeyParams`."] @@ -43,23 +52,17 @@ impl HmacDerivedKeyParams { ret.hash(hash); ret } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HmacDerivedKeyParams`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { self.set_name(val); self } - #[doc = "Change the `hash` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HmacDerivedKeyParams`*"] + #[deprecated = "Use `set_hash()` instead."] pub fn hash(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_hash(val); self } - #[doc = "Change the `length` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HmacDerivedKeyParams`*"] + #[deprecated = "Use `set_length()` instead."] pub fn length(&mut self, val: u32) -> &mut Self { self.set_length(val); self diff --git a/crates/web-sys/src/features/gen_HmacImportParams.rs b/crates/web-sys/src/features/gen_HmacImportParams.rs index 9e99f458307d..685b5ff5e7ad 100644 --- a/crates/web-sys/src/features/gen_HmacImportParams.rs +++ b/crates/web-sys/src/features/gen_HmacImportParams.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `HmacImportParams`*"] #[wasm_bindgen(method, getter = "name")] pub fn get_name(this: &HmacImportParams) -> String; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HmacImportParams`*"] #[wasm_bindgen(method, setter = "name")] - fn set_name(this: &HmacImportParams, val: &str); + pub fn set_name(this: &HmacImportParams, val: &str); #[doc = "Get the `hash` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HmacImportParams`*"] #[wasm_bindgen(method, getter = "hash")] pub fn get_hash(this: &HmacImportParams) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `hash` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HmacImportParams`*"] #[wasm_bindgen(method, setter = "hash")] - fn set_hash(this: &HmacImportParams, val: &::wasm_bindgen::JsValue); + pub fn set_hash(this: &HmacImportParams, val: &::wasm_bindgen::JsValue); } impl HmacImportParams { #[doc = "Construct a new `HmacImportParams`."] @@ -36,16 +42,12 @@ impl HmacImportParams { ret.hash(hash); ret } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HmacImportParams`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { self.set_name(val); self } - #[doc = "Change the `hash` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HmacImportParams`*"] + #[deprecated = "Use `set_hash()` instead."] pub fn hash(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_hash(val); self diff --git a/crates/web-sys/src/features/gen_HmacKeyAlgorithm.rs b/crates/web-sys/src/features/gen_HmacKeyAlgorithm.rs index c874e7e71702..de8a8cac7088 100644 --- a/crates/web-sys/src/features/gen_HmacKeyAlgorithm.rs +++ b/crates/web-sys/src/features/gen_HmacKeyAlgorithm.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `HmacKeyAlgorithm`*"] #[wasm_bindgen(method, getter = "name")] pub fn get_name(this: &HmacKeyAlgorithm) -> String; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HmacKeyAlgorithm`*"] #[wasm_bindgen(method, setter = "name")] - fn set_name(this: &HmacKeyAlgorithm, val: &str); + pub fn set_name(this: &HmacKeyAlgorithm, val: &str); #[cfg(feature = "KeyAlgorithm")] #[doc = "Get the `hash` field of this object."] #[doc = ""] @@ -24,15 +27,21 @@ extern "C" { #[wasm_bindgen(method, getter = "hash")] pub fn get_hash(this: &HmacKeyAlgorithm) -> KeyAlgorithm; #[cfg(feature = "KeyAlgorithm")] + #[doc = "Change the `hash` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HmacKeyAlgorithm`, `KeyAlgorithm`*"] #[wasm_bindgen(method, setter = "hash")] - fn set_hash(this: &HmacKeyAlgorithm, val: &KeyAlgorithm); + pub fn set_hash(this: &HmacKeyAlgorithm, val: &KeyAlgorithm); #[doc = "Get the `length` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HmacKeyAlgorithm`*"] #[wasm_bindgen(method, getter = "length")] pub fn get_length(this: &HmacKeyAlgorithm) -> u32; + #[doc = "Change the `length` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HmacKeyAlgorithm`*"] #[wasm_bindgen(method, setter = "length")] - fn set_length(this: &HmacKeyAlgorithm, val: u32); + pub fn set_length(this: &HmacKeyAlgorithm, val: u32); } impl HmacKeyAlgorithm { #[cfg(feature = "KeyAlgorithm")] @@ -47,24 +56,18 @@ impl HmacKeyAlgorithm { ret.length(length); ret } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HmacKeyAlgorithm`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { self.set_name(val); self } #[cfg(feature = "KeyAlgorithm")] - #[doc = "Change the `hash` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HmacKeyAlgorithm`, `KeyAlgorithm`*"] + #[deprecated = "Use `set_hash()` instead."] pub fn hash(&mut self, val: &KeyAlgorithm) -> &mut Self { self.set_hash(val); self } - #[doc = "Change the `length` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HmacKeyAlgorithm`*"] + #[deprecated = "Use `set_length()` instead."] pub fn length(&mut self, val: u32) -> &mut Self { self.set_length(val); self diff --git a/crates/web-sys/src/features/gen_HmacKeyGenParams.rs b/crates/web-sys/src/features/gen_HmacKeyGenParams.rs index c8b5809f4f87..7363659e1de1 100644 --- a/crates/web-sys/src/features/gen_HmacKeyGenParams.rs +++ b/crates/web-sys/src/features/gen_HmacKeyGenParams.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `HmacKeyGenParams`*"] #[wasm_bindgen(method, getter = "name")] pub fn get_name(this: &HmacKeyGenParams) -> String; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HmacKeyGenParams`*"] #[wasm_bindgen(method, setter = "name")] - fn set_name(this: &HmacKeyGenParams, val: &str); + pub fn set_name(this: &HmacKeyGenParams, val: &str); #[doc = "Get the `hash` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HmacKeyGenParams`*"] #[wasm_bindgen(method, getter = "hash")] pub fn get_hash(this: &HmacKeyGenParams) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `hash` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HmacKeyGenParams`*"] #[wasm_bindgen(method, setter = "hash")] - fn set_hash(this: &HmacKeyGenParams, val: &::wasm_bindgen::JsValue); + pub fn set_hash(this: &HmacKeyGenParams, val: &::wasm_bindgen::JsValue); #[doc = "Get the `length` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HmacKeyGenParams`*"] #[wasm_bindgen(method, getter = "length")] pub fn get_length(this: &HmacKeyGenParams) -> Option; + #[doc = "Change the `length` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HmacKeyGenParams`*"] #[wasm_bindgen(method, setter = "length")] - fn set_length(this: &HmacKeyGenParams, val: u32); + pub fn set_length(this: &HmacKeyGenParams, val: u32); } impl HmacKeyGenParams { #[doc = "Construct a new `HmacKeyGenParams`."] @@ -43,23 +52,17 @@ impl HmacKeyGenParams { ret.hash(hash); ret } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HmacKeyGenParams`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { self.set_name(val); self } - #[doc = "Change the `hash` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HmacKeyGenParams`*"] + #[deprecated = "Use `set_hash()` instead."] pub fn hash(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_hash(val); self } - #[doc = "Change the `length` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HmacKeyGenParams`*"] + #[deprecated = "Use `set_length()` instead."] pub fn length(&mut self, val: u32) -> &mut Self { self.set_length(val); self diff --git a/crates/web-sys/src/features/gen_HttpConnDict.rs b/crates/web-sys/src/features/gen_HttpConnDict.rs index 1506c0d29ed6..754d2fe96e02 100644 --- a/crates/web-sys/src/features/gen_HttpConnDict.rs +++ b/crates/web-sys/src/features/gen_HttpConnDict.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `HttpConnDict`*"] #[wasm_bindgen(method, getter = "connections")] pub fn get_connections(this: &HttpConnDict) -> Option<::js_sys::Array>; + #[doc = "Change the `connections` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HttpConnDict`*"] #[wasm_bindgen(method, setter = "connections")] - fn set_connections(this: &HttpConnDict, val: &::wasm_bindgen::JsValue); + pub fn set_connections(this: &HttpConnDict, val: &::wasm_bindgen::JsValue); } impl HttpConnDict { #[doc = "Construct a new `HttpConnDict`."] @@ -27,9 +30,7 @@ impl HttpConnDict { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `connections` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HttpConnDict`*"] + #[deprecated = "Use `set_connections()` instead."] pub fn connections(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_connections(val); self diff --git a/crates/web-sys/src/features/gen_HttpConnInfo.rs b/crates/web-sys/src/features/gen_HttpConnInfo.rs index dc616afa42a0..21819e6a5301 100644 --- a/crates/web-sys/src/features/gen_HttpConnInfo.rs +++ b/crates/web-sys/src/features/gen_HttpConnInfo.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `HttpConnInfo`*"] #[wasm_bindgen(method, getter = "protocolVersion")] pub fn get_protocol_version(this: &HttpConnInfo) -> Option; + #[doc = "Change the `protocolVersion` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HttpConnInfo`*"] #[wasm_bindgen(method, setter = "protocolVersion")] - fn set_protocol_version(this: &HttpConnInfo, val: &str); + pub fn set_protocol_version(this: &HttpConnInfo, val: &str); #[doc = "Get the `rtt` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HttpConnInfo`*"] #[wasm_bindgen(method, getter = "rtt")] pub fn get_rtt(this: &HttpConnInfo) -> Option; + #[doc = "Change the `rtt` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HttpConnInfo`*"] #[wasm_bindgen(method, setter = "rtt")] - fn set_rtt(this: &HttpConnInfo, val: u32); + pub fn set_rtt(this: &HttpConnInfo, val: u32); #[doc = "Get the `ttl` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HttpConnInfo`*"] #[wasm_bindgen(method, getter = "ttl")] pub fn get_ttl(this: &HttpConnInfo) -> Option; + #[doc = "Change the `ttl` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HttpConnInfo`*"] #[wasm_bindgen(method, setter = "ttl")] - fn set_ttl(this: &HttpConnInfo, val: u32); + pub fn set_ttl(this: &HttpConnInfo, val: u32); } impl HttpConnInfo { #[doc = "Construct a new `HttpConnInfo`."] @@ -41,23 +50,17 @@ impl HttpConnInfo { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `protocolVersion` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HttpConnInfo`*"] + #[deprecated = "Use `set_protocol_version()` instead."] pub fn protocol_version(&mut self, val: &str) -> &mut Self { self.set_protocol_version(val); self } - #[doc = "Change the `rtt` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HttpConnInfo`*"] + #[deprecated = "Use `set_rtt()` instead."] pub fn rtt(&mut self, val: u32) -> &mut Self { self.set_rtt(val); self } - #[doc = "Change the `ttl` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HttpConnInfo`*"] + #[deprecated = "Use `set_ttl()` instead."] pub fn ttl(&mut self, val: u32) -> &mut Self { self.set_ttl(val); self diff --git a/crates/web-sys/src/features/gen_HttpConnectionElement.rs b/crates/web-sys/src/features/gen_HttpConnectionElement.rs index 083732a8b3ec..8488fc9d2bcd 100644 --- a/crates/web-sys/src/features/gen_HttpConnectionElement.rs +++ b/crates/web-sys/src/features/gen_HttpConnectionElement.rs @@ -15,50 +15,71 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] #[wasm_bindgen(method, getter = "active")] pub fn get_active(this: &HttpConnectionElement) -> Option<::js_sys::Array>; + #[doc = "Change the `active` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] #[wasm_bindgen(method, setter = "active")] - fn set_active(this: &HttpConnectionElement, val: &::wasm_bindgen::JsValue); + pub fn set_active(this: &HttpConnectionElement, val: &::wasm_bindgen::JsValue); #[doc = "Get the `halfOpens` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] #[wasm_bindgen(method, getter = "halfOpens")] pub fn get_half_opens(this: &HttpConnectionElement) -> Option<::js_sys::Array>; + #[doc = "Change the `halfOpens` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] #[wasm_bindgen(method, setter = "halfOpens")] - fn set_half_opens(this: &HttpConnectionElement, val: &::wasm_bindgen::JsValue); + pub fn set_half_opens(this: &HttpConnectionElement, val: &::wasm_bindgen::JsValue); #[doc = "Get the `host` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] #[wasm_bindgen(method, getter = "host")] pub fn get_host(this: &HttpConnectionElement) -> Option; + #[doc = "Change the `host` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] #[wasm_bindgen(method, setter = "host")] - fn set_host(this: &HttpConnectionElement, val: &str); + pub fn set_host(this: &HttpConnectionElement, val: &str); #[doc = "Get the `idle` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] #[wasm_bindgen(method, getter = "idle")] pub fn get_idle(this: &HttpConnectionElement) -> Option<::js_sys::Array>; + #[doc = "Change the `idle` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] #[wasm_bindgen(method, setter = "idle")] - fn set_idle(this: &HttpConnectionElement, val: &::wasm_bindgen::JsValue); + pub fn set_idle(this: &HttpConnectionElement, val: &::wasm_bindgen::JsValue); #[doc = "Get the `port` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] #[wasm_bindgen(method, getter = "port")] pub fn get_port(this: &HttpConnectionElement) -> Option; + #[doc = "Change the `port` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] #[wasm_bindgen(method, setter = "port")] - fn set_port(this: &HttpConnectionElement, val: u32); + pub fn set_port(this: &HttpConnectionElement, val: u32); #[doc = "Get the `spdy` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] #[wasm_bindgen(method, getter = "spdy")] pub fn get_spdy(this: &HttpConnectionElement) -> Option; + #[doc = "Change the `spdy` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] #[wasm_bindgen(method, setter = "spdy")] - fn set_spdy(this: &HttpConnectionElement, val: bool); + pub fn set_spdy(this: &HttpConnectionElement, val: bool); #[doc = "Get the `ssl` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] #[wasm_bindgen(method, getter = "ssl")] pub fn get_ssl(this: &HttpConnectionElement) -> Option; + #[doc = "Change the `ssl` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] #[wasm_bindgen(method, setter = "ssl")] - fn set_ssl(this: &HttpConnectionElement, val: bool); + pub fn set_ssl(this: &HttpConnectionElement, val: bool); } impl HttpConnectionElement { #[doc = "Construct a new `HttpConnectionElement`."] @@ -69,51 +90,37 @@ impl HttpConnectionElement { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `active` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] + #[deprecated = "Use `set_active()` instead."] pub fn active(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_active(val); self } - #[doc = "Change the `halfOpens` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] + #[deprecated = "Use `set_half_opens()` instead."] pub fn half_opens(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_half_opens(val); self } - #[doc = "Change the `host` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] + #[deprecated = "Use `set_host()` instead."] pub fn host(&mut self, val: &str) -> &mut Self { self.set_host(val); self } - #[doc = "Change the `idle` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] + #[deprecated = "Use `set_idle()` instead."] pub fn idle(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_idle(val); self } - #[doc = "Change the `port` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] + #[deprecated = "Use `set_port()` instead."] pub fn port(&mut self, val: u32) -> &mut Self { self.set_port(val); self } - #[doc = "Change the `spdy` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] + #[deprecated = "Use `set_spdy()` instead."] pub fn spdy(&mut self, val: bool) -> &mut Self { self.set_spdy(val); self } - #[doc = "Change the `ssl` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] + #[deprecated = "Use `set_ssl()` instead."] pub fn ssl(&mut self, val: bool) -> &mut Self { self.set_ssl(val); self diff --git a/crates/web-sys/src/features/gen_IdbFileMetadataParameters.rs b/crates/web-sys/src/features/gen_IdbFileMetadataParameters.rs index 0cbbc7f234bf..2ec009b13385 100644 --- a/crates/web-sys/src/features/gen_IdbFileMetadataParameters.rs +++ b/crates/web-sys/src/features/gen_IdbFileMetadataParameters.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `IdbFileMetadataParameters`*"] #[wasm_bindgen(method, getter = "lastModified")] pub fn get_last_modified(this: &IdbFileMetadataParameters) -> Option; + #[doc = "Change the `lastModified` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdbFileMetadataParameters`*"] #[wasm_bindgen(method, setter = "lastModified")] - fn set_last_modified(this: &IdbFileMetadataParameters, val: bool); + pub fn set_last_modified(this: &IdbFileMetadataParameters, val: bool); #[doc = "Get the `size` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IdbFileMetadataParameters`*"] #[wasm_bindgen(method, getter = "size")] pub fn get_size(this: &IdbFileMetadataParameters) -> Option; + #[doc = "Change the `size` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdbFileMetadataParameters`*"] #[wasm_bindgen(method, setter = "size")] - fn set_size(this: &IdbFileMetadataParameters, val: bool); + pub fn set_size(this: &IdbFileMetadataParameters, val: bool); } impl IdbFileMetadataParameters { #[doc = "Construct a new `IdbFileMetadataParameters`."] @@ -34,16 +40,12 @@ impl IdbFileMetadataParameters { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `lastModified` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `IdbFileMetadataParameters`*"] + #[deprecated = "Use `set_last_modified()` instead."] pub fn last_modified(&mut self, val: bool) -> &mut Self { self.set_last_modified(val); self } - #[doc = "Change the `size` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `IdbFileMetadataParameters`*"] + #[deprecated = "Use `set_size()` instead."] pub fn size(&mut self, val: bool) -> &mut Self { self.set_size(val); self diff --git a/crates/web-sys/src/features/gen_IdbIndexParameters.rs b/crates/web-sys/src/features/gen_IdbIndexParameters.rs index 70ff3b10d0c2..9238e85f6ffc 100644 --- a/crates/web-sys/src/features/gen_IdbIndexParameters.rs +++ b/crates/web-sys/src/features/gen_IdbIndexParameters.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `IdbIndexParameters`*"] #[wasm_bindgen(method, getter = "locale")] pub fn get_locale(this: &IdbIndexParameters) -> Option; + #[doc = "Change the `locale` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdbIndexParameters`*"] #[wasm_bindgen(method, setter = "locale")] - fn set_locale(this: &IdbIndexParameters, val: Option<&str>); + pub fn set_locale(this: &IdbIndexParameters, val: Option<&str>); #[doc = "Get the `multiEntry` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IdbIndexParameters`*"] #[wasm_bindgen(method, getter = "multiEntry")] pub fn get_multi_entry(this: &IdbIndexParameters) -> Option; + #[doc = "Change the `multiEntry` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdbIndexParameters`*"] #[wasm_bindgen(method, setter = "multiEntry")] - fn set_multi_entry(this: &IdbIndexParameters, val: bool); + pub fn set_multi_entry(this: &IdbIndexParameters, val: bool); #[doc = "Get the `unique` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IdbIndexParameters`*"] #[wasm_bindgen(method, getter = "unique")] pub fn get_unique(this: &IdbIndexParameters) -> Option; + #[doc = "Change the `unique` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdbIndexParameters`*"] #[wasm_bindgen(method, setter = "unique")] - fn set_unique(this: &IdbIndexParameters, val: bool); + pub fn set_unique(this: &IdbIndexParameters, val: bool); } impl IdbIndexParameters { #[doc = "Construct a new `IdbIndexParameters`."] @@ -41,23 +50,17 @@ impl IdbIndexParameters { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `locale` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `IdbIndexParameters`*"] + #[deprecated = "Use `set_locale()` instead."] pub fn locale(&mut self, val: Option<&str>) -> &mut Self { self.set_locale(val); self } - #[doc = "Change the `multiEntry` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `IdbIndexParameters`*"] + #[deprecated = "Use `set_multi_entry()` instead."] pub fn multi_entry(&mut self, val: bool) -> &mut Self { self.set_multi_entry(val); self } - #[doc = "Change the `unique` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `IdbIndexParameters`*"] + #[deprecated = "Use `set_unique()` instead."] pub fn unique(&mut self, val: bool) -> &mut Self { self.set_unique(val); self diff --git a/crates/web-sys/src/features/gen_IdbObjectStoreParameters.rs b/crates/web-sys/src/features/gen_IdbObjectStoreParameters.rs index 292a950ffce7..03ce907e3c86 100644 --- a/crates/web-sys/src/features/gen_IdbObjectStoreParameters.rs +++ b/crates/web-sys/src/features/gen_IdbObjectStoreParameters.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `IdbObjectStoreParameters`*"] #[wasm_bindgen(method, getter = "autoIncrement")] pub fn get_auto_increment(this: &IdbObjectStoreParameters) -> Option; + #[doc = "Change the `autoIncrement` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdbObjectStoreParameters`*"] #[wasm_bindgen(method, setter = "autoIncrement")] - fn set_auto_increment(this: &IdbObjectStoreParameters, val: bool); + pub fn set_auto_increment(this: &IdbObjectStoreParameters, val: bool); #[doc = "Get the `keyPath` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IdbObjectStoreParameters`*"] #[wasm_bindgen(method, getter = "keyPath")] pub fn get_key_path(this: &IdbObjectStoreParameters) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `keyPath` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdbObjectStoreParameters`*"] #[wasm_bindgen(method, setter = "keyPath")] - fn set_key_path(this: &IdbObjectStoreParameters, val: &::wasm_bindgen::JsValue); + pub fn set_key_path(this: &IdbObjectStoreParameters, val: &::wasm_bindgen::JsValue); } impl IdbObjectStoreParameters { #[doc = "Construct a new `IdbObjectStoreParameters`."] @@ -34,16 +40,12 @@ impl IdbObjectStoreParameters { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `autoIncrement` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `IdbObjectStoreParameters`*"] + #[deprecated = "Use `set_auto_increment()` instead."] pub fn auto_increment(&mut self, val: bool) -> &mut Self { self.set_auto_increment(val); self } - #[doc = "Change the `keyPath` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `IdbObjectStoreParameters`*"] + #[deprecated = "Use `set_key_path()` instead."] pub fn key_path(&mut self, val: Option<&::wasm_bindgen::JsValue>) -> &mut Self { self.set_key_path(val.unwrap_or(&::wasm_bindgen::JsValue::NULL)); self diff --git a/crates/web-sys/src/features/gen_IdbOpenDbOptions.rs b/crates/web-sys/src/features/gen_IdbOpenDbOptions.rs index aca6bd84279a..162108e06b4c 100644 --- a/crates/web-sys/src/features/gen_IdbOpenDbOptions.rs +++ b/crates/web-sys/src/features/gen_IdbOpenDbOptions.rs @@ -17,15 +17,21 @@ extern "C" { #[wasm_bindgen(method, getter = "storage")] pub fn get_storage(this: &IdbOpenDbOptions) -> Option; #[cfg(feature = "StorageType")] + #[doc = "Change the `storage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdbOpenDbOptions`, `StorageType`*"] #[wasm_bindgen(method, setter = "storage")] - fn set_storage(this: &IdbOpenDbOptions, val: StorageType); + pub fn set_storage(this: &IdbOpenDbOptions, val: StorageType); #[doc = "Get the `version` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IdbOpenDbOptions`*"] #[wasm_bindgen(method, getter = "version")] pub fn get_version(this: &IdbOpenDbOptions) -> Option; + #[doc = "Change the `version` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdbOpenDbOptions`*"] #[wasm_bindgen(method, setter = "version")] - fn set_version(this: &IdbOpenDbOptions, val: f64); + pub fn set_version(this: &IdbOpenDbOptions, val: f64); } impl IdbOpenDbOptions { #[doc = "Construct a new `IdbOpenDbOptions`."] @@ -37,16 +43,12 @@ impl IdbOpenDbOptions { ret } #[cfg(feature = "StorageType")] - #[doc = "Change the `storage` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `IdbOpenDbOptions`, `StorageType`*"] + #[deprecated = "Use `set_storage()` instead."] pub fn storage(&mut self, val: StorageType) -> &mut Self { self.set_storage(val); self } - #[doc = "Change the `version` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `IdbOpenDbOptions`*"] + #[deprecated = "Use `set_version()` instead."] pub fn version(&mut self, val: f64) -> &mut Self { self.set_version(val); self diff --git a/crates/web-sys/src/features/gen_IdbVersionChangeEventInit.rs b/crates/web-sys/src/features/gen_IdbVersionChangeEventInit.rs index 1048f7c67fcd..ccd13f696208 100644 --- a/crates/web-sys/src/features/gen_IdbVersionChangeEventInit.rs +++ b/crates/web-sys/src/features/gen_IdbVersionChangeEventInit.rs @@ -15,36 +15,51 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &IdbVersionChangeEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &IdbVersionChangeEventInit, val: bool); + pub fn set_bubbles(this: &IdbVersionChangeEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &IdbVersionChangeEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &IdbVersionChangeEventInit, val: bool); + pub fn set_cancelable(this: &IdbVersionChangeEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &IdbVersionChangeEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &IdbVersionChangeEventInit, val: bool); + pub fn set_composed(this: &IdbVersionChangeEventInit, val: bool); #[doc = "Get the `newVersion` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] #[wasm_bindgen(method, getter = "newVersion")] pub fn get_new_version(this: &IdbVersionChangeEventInit) -> Option; + #[doc = "Change the `newVersion` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] #[wasm_bindgen(method, setter = "newVersion")] - fn set_new_version(this: &IdbVersionChangeEventInit, val: Option); + pub fn set_new_version(this: &IdbVersionChangeEventInit, val: Option); #[doc = "Get the `oldVersion` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] #[wasm_bindgen(method, getter = "oldVersion")] pub fn get_old_version(this: &IdbVersionChangeEventInit) -> Option; + #[doc = "Change the `oldVersion` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] #[wasm_bindgen(method, setter = "oldVersion")] - fn set_old_version(this: &IdbVersionChangeEventInit, val: f64); + pub fn set_old_version(this: &IdbVersionChangeEventInit, val: f64); } impl IdbVersionChangeEventInit { #[doc = "Construct a new `IdbVersionChangeEventInit`."] @@ -55,37 +70,27 @@ impl IdbVersionChangeEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } - #[doc = "Change the `newVersion` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] + #[deprecated = "Use `set_new_version()` instead."] pub fn new_version(&mut self, val: Option) -> &mut Self { self.set_new_version(val); self } - #[doc = "Change the `oldVersion` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] + #[deprecated = "Use `set_old_version()` instead."] pub fn old_version(&mut self, val: f64) -> &mut Self { self.set_old_version(val); self diff --git a/crates/web-sys/src/features/gen_IdleRequestOptions.rs b/crates/web-sys/src/features/gen_IdleRequestOptions.rs index 0b631b7ced65..cd5e78a4b184 100644 --- a/crates/web-sys/src/features/gen_IdleRequestOptions.rs +++ b/crates/web-sys/src/features/gen_IdleRequestOptions.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `IdleRequestOptions`*"] #[wasm_bindgen(method, getter = "timeout")] pub fn get_timeout(this: &IdleRequestOptions) -> Option; + #[doc = "Change the `timeout` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdleRequestOptions`*"] #[wasm_bindgen(method, setter = "timeout")] - fn set_timeout(this: &IdleRequestOptions, val: u32); + pub fn set_timeout(this: &IdleRequestOptions, val: u32); } impl IdleRequestOptions { #[doc = "Construct a new `IdleRequestOptions`."] @@ -27,9 +30,7 @@ impl IdleRequestOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `timeout` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `IdleRequestOptions`*"] + #[deprecated = "Use `set_timeout()` instead."] pub fn timeout(&mut self, val: u32) -> &mut Self { self.set_timeout(val); self diff --git a/crates/web-sys/src/features/gen_IirFilterOptions.rs b/crates/web-sys/src/features/gen_IirFilterOptions.rs index dcc2971b91a9..60c8530fbdb1 100644 --- a/crates/web-sys/src/features/gen_IirFilterOptions.rs +++ b/crates/web-sys/src/features/gen_IirFilterOptions.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `IirFilterOptions`*"] #[wasm_bindgen(method, getter = "channelCount")] pub fn get_channel_count(this: &IirFilterOptions) -> Option; + #[doc = "Change the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IirFilterOptions`*"] #[wasm_bindgen(method, setter = "channelCount")] - fn set_channel_count(this: &IirFilterOptions, val: u32); + pub fn set_channel_count(this: &IirFilterOptions, val: u32); #[cfg(feature = "ChannelCountMode")] #[doc = "Get the `channelCountMode` field of this object."] #[doc = ""] @@ -24,8 +27,11 @@ extern "C" { #[wasm_bindgen(method, getter = "channelCountMode")] pub fn get_channel_count_mode(this: &IirFilterOptions) -> Option; #[cfg(feature = "ChannelCountMode")] + #[doc = "Change the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `IirFilterOptions`*"] #[wasm_bindgen(method, setter = "channelCountMode")] - fn set_channel_count_mode(this: &IirFilterOptions, val: ChannelCountMode); + pub fn set_channel_count_mode(this: &IirFilterOptions, val: ChannelCountMode); #[cfg(feature = "ChannelInterpretation")] #[doc = "Get the `channelInterpretation` field of this object."] #[doc = ""] @@ -33,22 +39,31 @@ extern "C" { #[wasm_bindgen(method, getter = "channelInterpretation")] pub fn get_channel_interpretation(this: &IirFilterOptions) -> Option; #[cfg(feature = "ChannelInterpretation")] + #[doc = "Change the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `IirFilterOptions`*"] #[wasm_bindgen(method, setter = "channelInterpretation")] - fn set_channel_interpretation(this: &IirFilterOptions, val: ChannelInterpretation); + pub fn set_channel_interpretation(this: &IirFilterOptions, val: ChannelInterpretation); #[doc = "Get the `feedback` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IirFilterOptions`*"] #[wasm_bindgen(method, getter = "feedback")] pub fn get_feedback(this: &IirFilterOptions) -> ::js_sys::Array; + #[doc = "Change the `feedback` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IirFilterOptions`*"] #[wasm_bindgen(method, setter = "feedback")] - fn set_feedback(this: &IirFilterOptions, val: &::wasm_bindgen::JsValue); + pub fn set_feedback(this: &IirFilterOptions, val: &::wasm_bindgen::JsValue); #[doc = "Get the `feedforward` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IirFilterOptions`*"] #[wasm_bindgen(method, getter = "feedforward")] pub fn get_feedforward(this: &IirFilterOptions) -> ::js_sys::Array; + #[doc = "Change the `feedforward` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IirFilterOptions`*"] #[wasm_bindgen(method, setter = "feedforward")] - fn set_feedforward(this: &IirFilterOptions, val: &::wasm_bindgen::JsValue); + pub fn set_feedforward(this: &IirFilterOptions, val: &::wasm_bindgen::JsValue); } impl IirFilterOptions { #[doc = "Construct a new `IirFilterOptions`."] @@ -61,39 +76,29 @@ impl IirFilterOptions { ret.feedforward(feedforward); ret } - #[doc = "Change the `channelCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `IirFilterOptions`*"] + #[deprecated = "Use `set_channel_count()` instead."] pub fn channel_count(&mut self, val: u32) -> &mut Self { self.set_channel_count(val); self } #[cfg(feature = "ChannelCountMode")] - #[doc = "Change the `channelCountMode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `IirFilterOptions`*"] + #[deprecated = "Use `set_channel_count_mode()` instead."] pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self { self.set_channel_count_mode(val); self } #[cfg(feature = "ChannelInterpretation")] - #[doc = "Change the `channelInterpretation` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `IirFilterOptions`*"] + #[deprecated = "Use `set_channel_interpretation()` instead."] pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self { self.set_channel_interpretation(val); self } - #[doc = "Change the `feedback` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `IirFilterOptions`*"] + #[deprecated = "Use `set_feedback()` instead."] pub fn feedback(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_feedback(val); self } - #[doc = "Change the `feedforward` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `IirFilterOptions`*"] + #[deprecated = "Use `set_feedforward()` instead."] pub fn feedforward(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_feedforward(val); self diff --git a/crates/web-sys/src/features/gen_ImageBitmapOptions.rs b/crates/web-sys/src/features/gen_ImageBitmapOptions.rs index aa60c14e96f0..2c641c50b29d 100644 --- a/crates/web-sys/src/features/gen_ImageBitmapOptions.rs +++ b/crates/web-sys/src/features/gen_ImageBitmapOptions.rs @@ -17,8 +17,11 @@ extern "C" { #[wasm_bindgen(method, getter = "colorSpaceConversion")] pub fn get_color_space_conversion(this: &ImageBitmapOptions) -> Option; #[cfg(feature = "ColorSpaceConversion")] + #[doc = "Change the `colorSpaceConversion` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ColorSpaceConversion`, `ImageBitmapOptions`*"] #[wasm_bindgen(method, setter = "colorSpaceConversion")] - fn set_color_space_conversion(this: &ImageBitmapOptions, val: ColorSpaceConversion); + pub fn set_color_space_conversion(this: &ImageBitmapOptions, val: ColorSpaceConversion); #[cfg(feature = "ImageOrientation")] #[doc = "Get the `imageOrientation` field of this object."] #[doc = ""] @@ -26,8 +29,11 @@ extern "C" { #[wasm_bindgen(method, getter = "imageOrientation")] pub fn get_image_orientation(this: &ImageBitmapOptions) -> Option; #[cfg(feature = "ImageOrientation")] + #[doc = "Change the `imageOrientation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageBitmapOptions`, `ImageOrientation`*"] #[wasm_bindgen(method, setter = "imageOrientation")] - fn set_image_orientation(this: &ImageBitmapOptions, val: ImageOrientation); + pub fn set_image_orientation(this: &ImageBitmapOptions, val: ImageOrientation); #[cfg(feature = "PremultiplyAlpha")] #[doc = "Get the `premultiplyAlpha` field of this object."] #[doc = ""] @@ -35,15 +41,21 @@ extern "C" { #[wasm_bindgen(method, getter = "premultiplyAlpha")] pub fn get_premultiply_alpha(this: &ImageBitmapOptions) -> Option; #[cfg(feature = "PremultiplyAlpha")] + #[doc = "Change the `premultiplyAlpha` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageBitmapOptions`, `PremultiplyAlpha`*"] #[wasm_bindgen(method, setter = "premultiplyAlpha")] - fn set_premultiply_alpha(this: &ImageBitmapOptions, val: PremultiplyAlpha); + pub fn set_premultiply_alpha(this: &ImageBitmapOptions, val: PremultiplyAlpha); #[doc = "Get the `resizeHeight` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ImageBitmapOptions`*"] #[wasm_bindgen(method, getter = "resizeHeight")] pub fn get_resize_height(this: &ImageBitmapOptions) -> Option; + #[doc = "Change the `resizeHeight` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageBitmapOptions`*"] #[wasm_bindgen(method, setter = "resizeHeight")] - fn set_resize_height(this: &ImageBitmapOptions, val: u32); + pub fn set_resize_height(this: &ImageBitmapOptions, val: u32); #[cfg(feature = "ResizeQuality")] #[doc = "Get the `resizeQuality` field of this object."] #[doc = ""] @@ -51,15 +63,21 @@ extern "C" { #[wasm_bindgen(method, getter = "resizeQuality")] pub fn get_resize_quality(this: &ImageBitmapOptions) -> Option; #[cfg(feature = "ResizeQuality")] + #[doc = "Change the `resizeQuality` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageBitmapOptions`, `ResizeQuality`*"] #[wasm_bindgen(method, setter = "resizeQuality")] - fn set_resize_quality(this: &ImageBitmapOptions, val: ResizeQuality); + pub fn set_resize_quality(this: &ImageBitmapOptions, val: ResizeQuality); #[doc = "Get the `resizeWidth` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ImageBitmapOptions`*"] #[wasm_bindgen(method, getter = "resizeWidth")] pub fn get_resize_width(this: &ImageBitmapOptions) -> Option; + #[doc = "Change the `resizeWidth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageBitmapOptions`*"] #[wasm_bindgen(method, setter = "resizeWidth")] - fn set_resize_width(this: &ImageBitmapOptions, val: u32); + pub fn set_resize_width(this: &ImageBitmapOptions, val: u32); } impl ImageBitmapOptions { #[doc = "Construct a new `ImageBitmapOptions`."] @@ -71,47 +89,35 @@ impl ImageBitmapOptions { ret } #[cfg(feature = "ColorSpaceConversion")] - #[doc = "Change the `colorSpaceConversion` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ColorSpaceConversion`, `ImageBitmapOptions`*"] + #[deprecated = "Use `set_color_space_conversion()` instead."] pub fn color_space_conversion(&mut self, val: ColorSpaceConversion) -> &mut Self { self.set_color_space_conversion(val); self } #[cfg(feature = "ImageOrientation")] - #[doc = "Change the `imageOrientation` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ImageBitmapOptions`, `ImageOrientation`*"] + #[deprecated = "Use `set_image_orientation()` instead."] pub fn image_orientation(&mut self, val: ImageOrientation) -> &mut Self { self.set_image_orientation(val); self } #[cfg(feature = "PremultiplyAlpha")] - #[doc = "Change the `premultiplyAlpha` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ImageBitmapOptions`, `PremultiplyAlpha`*"] + #[deprecated = "Use `set_premultiply_alpha()` instead."] pub fn premultiply_alpha(&mut self, val: PremultiplyAlpha) -> &mut Self { self.set_premultiply_alpha(val); self } - #[doc = "Change the `resizeHeight` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ImageBitmapOptions`*"] + #[deprecated = "Use `set_resize_height()` instead."] pub fn resize_height(&mut self, val: u32) -> &mut Self { self.set_resize_height(val); self } #[cfg(feature = "ResizeQuality")] - #[doc = "Change the `resizeQuality` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ImageBitmapOptions`, `ResizeQuality`*"] + #[deprecated = "Use `set_resize_quality()` instead."] pub fn resize_quality(&mut self, val: ResizeQuality) -> &mut Self { self.set_resize_quality(val); self } - #[doc = "Change the `resizeWidth` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ImageBitmapOptions`*"] + #[deprecated = "Use `set_resize_width()` instead."] pub fn resize_width(&mut self, val: u32) -> &mut Self { self.set_resize_width(val); self diff --git a/crates/web-sys/src/features/gen_ImageCaptureErrorEventInit.rs b/crates/web-sys/src/features/gen_ImageCaptureErrorEventInit.rs index c3f3b8979483..9edf1b2a9997 100644 --- a/crates/web-sys/src/features/gen_ImageCaptureErrorEventInit.rs +++ b/crates/web-sys/src/features/gen_ImageCaptureErrorEventInit.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ImageCaptureErrorEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &ImageCaptureErrorEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageCaptureErrorEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &ImageCaptureErrorEventInit, val: bool); + pub fn set_bubbles(this: &ImageCaptureErrorEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ImageCaptureErrorEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &ImageCaptureErrorEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageCaptureErrorEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &ImageCaptureErrorEventInit, val: bool); + pub fn set_cancelable(this: &ImageCaptureErrorEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ImageCaptureErrorEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &ImageCaptureErrorEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageCaptureErrorEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &ImageCaptureErrorEventInit, val: bool); + pub fn set_composed(this: &ImageCaptureErrorEventInit, val: bool); #[cfg(feature = "ImageCaptureError")] #[doc = "Get the `imageCaptureError` field of this object."] #[doc = ""] @@ -38,8 +47,14 @@ extern "C" { #[wasm_bindgen(method, getter = "imageCaptureError")] pub fn get_image_capture_error(this: &ImageCaptureErrorEventInit) -> Option; #[cfg(feature = "ImageCaptureError")] + #[doc = "Change the `imageCaptureError` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageCaptureError`, `ImageCaptureErrorEventInit`*"] #[wasm_bindgen(method, setter = "imageCaptureError")] - fn set_image_capture_error(this: &ImageCaptureErrorEventInit, val: Option<&ImageCaptureError>); + pub fn set_image_capture_error( + this: &ImageCaptureErrorEventInit, + val: Option<&ImageCaptureError>, + ); } impl ImageCaptureErrorEventInit { #[doc = "Construct a new `ImageCaptureErrorEventInit`."] @@ -50,31 +65,23 @@ impl ImageCaptureErrorEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ImageCaptureErrorEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ImageCaptureErrorEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ImageCaptureErrorEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } #[cfg(feature = "ImageCaptureError")] - #[doc = "Change the `imageCaptureError` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ImageCaptureError`, `ImageCaptureErrorEventInit`*"] + #[deprecated = "Use `set_image_capture_error()` instead."] pub fn image_capture_error(&mut self, val: Option<&ImageCaptureError>) -> &mut Self { self.set_image_capture_error(val); self diff --git a/crates/web-sys/src/features/gen_ImageDecodeOptions.rs b/crates/web-sys/src/features/gen_ImageDecodeOptions.rs index 331cbe992cf6..3b4893ec9231 100644 --- a/crates/web-sys/src/features/gen_ImageDecodeOptions.rs +++ b/crates/web-sys/src/features/gen_ImageDecodeOptions.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "completeFramesOnly")] pub fn get_complete_frames_only(this: &ImageDecodeOptions) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `completeFramesOnly` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageDecodeOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "completeFramesOnly")] - fn set_complete_frames_only(this: &ImageDecodeOptions, val: bool); + pub fn set_complete_frames_only(this: &ImageDecodeOptions, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `frameIndex` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "frameIndex")] pub fn get_frame_index(this: &ImageDecodeOptions) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `frameIndex` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageDecodeOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "frameIndex")] - fn set_frame_index(this: &ImageDecodeOptions, val: u32); + pub fn set_frame_index(this: &ImageDecodeOptions, val: u32); } #[cfg(web_sys_unstable_apis)] impl ImageDecodeOptions { @@ -51,23 +65,13 @@ impl ImageDecodeOptions { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `completeFramesOnly` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ImageDecodeOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_complete_frames_only()` instead."] pub fn complete_frames_only(&mut self, val: bool) -> &mut Self { self.set_complete_frames_only(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `frameIndex` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ImageDecodeOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_frame_index()` instead."] pub fn frame_index(&mut self, val: u32) -> &mut Self { self.set_frame_index(val); self diff --git a/crates/web-sys/src/features/gen_ImageDecodeResult.rs b/crates/web-sys/src/features/gen_ImageDecodeResult.rs index 15f62b5e743c..8810025886ca 100644 --- a/crates/web-sys/src/features/gen_ImageDecodeResult.rs +++ b/crates/web-sys/src/features/gen_ImageDecodeResult.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "complete")] pub fn get_complete(this: &ImageDecodeResult) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `complete` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageDecodeResult`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "complete")] - fn set_complete(this: &ImageDecodeResult, val: bool); + pub fn set_complete(this: &ImageDecodeResult, val: bool); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "VideoFrame")] #[doc = "Get the `image` field of this object."] @@ -35,9 +42,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "image")] pub fn get_image(this: &ImageDecodeResult) -> VideoFrame; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "VideoFrame")] + #[doc = "Change the `image` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageDecodeResult`, `VideoFrame`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "image")] - fn set_image(this: &ImageDecodeResult, val: &VideoFrame); + pub fn set_image(this: &ImageDecodeResult, val: &VideoFrame); } #[cfg(web_sys_unstable_apis)] impl ImageDecodeResult { @@ -56,24 +70,14 @@ impl ImageDecodeResult { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `complete` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ImageDecodeResult`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_complete()` instead."] pub fn complete(&mut self, val: bool) -> &mut Self { self.set_complete(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "VideoFrame")] - #[doc = "Change the `image` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ImageDecodeResult`, `VideoFrame`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_image()` instead."] pub fn image(&mut self, val: &VideoFrame) -> &mut Self { self.set_image(val); self diff --git a/crates/web-sys/src/features/gen_ImageDecoderInit.rs b/crates/web-sys/src/features/gen_ImageDecoderInit.rs index 10869e9cbacf..af6e189d3a0d 100644 --- a/crates/web-sys/src/features/gen_ImageDecoderInit.rs +++ b/crates/web-sys/src/features/gen_ImageDecoderInit.rs @@ -24,9 +24,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "colorSpaceConversion")] pub fn get_color_space_conversion(this: &ImageDecoderInit) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "ColorSpaceConversion")] + #[doc = "Change the `colorSpaceConversion` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ColorSpaceConversion`, `ImageDecoderInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "colorSpaceConversion")] - fn set_color_space_conversion(this: &ImageDecoderInit, val: ColorSpaceConversion); + pub fn set_color_space_conversion(this: &ImageDecoderInit, val: ColorSpaceConversion); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `data` field of this object."] #[doc = ""] @@ -36,8 +43,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "data")] pub fn get_data(this: &ImageDecoderInit) -> ::wasm_bindgen::JsValue; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageDecoderInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "data")] - fn set_data(this: &ImageDecoderInit, val: &::wasm_bindgen::JsValue); + pub fn set_data(this: &ImageDecoderInit, val: &::wasm_bindgen::JsValue); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `desiredHeight` field of this object."] #[doc = ""] @@ -47,8 +61,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "desiredHeight")] pub fn get_desired_height(this: &ImageDecoderInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `desiredHeight` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageDecoderInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "desiredHeight")] - fn set_desired_height(this: &ImageDecoderInit, val: u32); + pub fn set_desired_height(this: &ImageDecoderInit, val: u32); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `desiredWidth` field of this object."] #[doc = ""] @@ -58,8 +79,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "desiredWidth")] pub fn get_desired_width(this: &ImageDecoderInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `desiredWidth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageDecoderInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "desiredWidth")] - fn set_desired_width(this: &ImageDecoderInit, val: u32); + pub fn set_desired_width(this: &ImageDecoderInit, val: u32); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `preferAnimation` field of this object."] #[doc = ""] @@ -69,8 +97,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "preferAnimation")] pub fn get_prefer_animation(this: &ImageDecoderInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `preferAnimation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageDecoderInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "preferAnimation")] - fn set_prefer_animation(this: &ImageDecoderInit, val: bool); + pub fn set_prefer_animation(this: &ImageDecoderInit, val: bool); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "PremultiplyAlpha")] #[doc = "Get the `premultiplyAlpha` field of this object."] @@ -81,9 +116,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "premultiplyAlpha")] pub fn get_premultiply_alpha(this: &ImageDecoderInit) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "PremultiplyAlpha")] + #[doc = "Change the `premultiplyAlpha` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageDecoderInit`, `PremultiplyAlpha`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "premultiplyAlpha")] - fn set_premultiply_alpha(this: &ImageDecoderInit, val: PremultiplyAlpha); + pub fn set_premultiply_alpha(this: &ImageDecoderInit, val: PremultiplyAlpha); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `type` field of this object."] #[doc = ""] @@ -93,8 +135,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "type")] pub fn get_type(this: &ImageDecoderInit) -> String; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageDecoderInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "type")] - fn set_type(this: &ImageDecoderInit, val: &str); + pub fn set_type(this: &ImageDecoderInit, val: &str); } #[cfg(web_sys_unstable_apis)] impl ImageDecoderInit { @@ -113,79 +162,44 @@ impl ImageDecoderInit { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "ColorSpaceConversion")] - #[doc = "Change the `colorSpaceConversion` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ColorSpaceConversion`, `ImageDecoderInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_color_space_conversion()` instead."] pub fn color_space_conversion(&mut self, val: ColorSpaceConversion) -> &mut Self { self.set_color_space_conversion(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `data` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ImageDecoderInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_data()` instead."] pub fn data(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_data(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `desiredHeight` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ImageDecoderInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_desired_height()` instead."] pub fn desired_height(&mut self, val: u32) -> &mut Self { self.set_desired_height(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `desiredWidth` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ImageDecoderInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_desired_width()` instead."] pub fn desired_width(&mut self, val: u32) -> &mut Self { self.set_desired_width(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `preferAnimation` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ImageDecoderInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_prefer_animation()` instead."] pub fn prefer_animation(&mut self, val: bool) -> &mut Self { self.set_prefer_animation(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "PremultiplyAlpha")] - #[doc = "Change the `premultiplyAlpha` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ImageDecoderInit`, `PremultiplyAlpha`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_premultiply_alpha()` instead."] pub fn premultiply_alpha(&mut self, val: PremultiplyAlpha) -> &mut Self { self.set_premultiply_alpha(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ImageDecoderInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: &str) -> &mut Self { self.set_type(val); self diff --git a/crates/web-sys/src/features/gen_ImageEncodeOptions.rs b/crates/web-sys/src/features/gen_ImageEncodeOptions.rs index 7e9fb97c4e95..acc724aa9b99 100644 --- a/crates/web-sys/src/features/gen_ImageEncodeOptions.rs +++ b/crates/web-sys/src/features/gen_ImageEncodeOptions.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ImageEncodeOptions`*"] #[wasm_bindgen(method, getter = "quality")] pub fn get_quality(this: &ImageEncodeOptions) -> Option; + #[doc = "Change the `quality` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageEncodeOptions`*"] #[wasm_bindgen(method, setter = "quality")] - fn set_quality(this: &ImageEncodeOptions, val: f64); + pub fn set_quality(this: &ImageEncodeOptions, val: f64); #[doc = "Get the `type` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ImageEncodeOptions`*"] #[wasm_bindgen(method, getter = "type")] pub fn get_type(this: &ImageEncodeOptions) -> Option; + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageEncodeOptions`*"] #[wasm_bindgen(method, setter = "type")] - fn set_type(this: &ImageEncodeOptions, val: &str); + pub fn set_type(this: &ImageEncodeOptions, val: &str); } impl ImageEncodeOptions { #[doc = "Construct a new `ImageEncodeOptions`."] @@ -34,16 +40,12 @@ impl ImageEncodeOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `quality` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ImageEncodeOptions`*"] + #[deprecated = "Use `set_quality()` instead."] pub fn quality(&mut self, val: f64) -> &mut Self { self.set_quality(val); self } - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ImageEncodeOptions`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: &str) -> &mut Self { self.set_type(val); self diff --git a/crates/web-sys/src/features/gen_InputEventInit.rs b/crates/web-sys/src/features/gen_InputEventInit.rs index 36763d83ba8b..0c0423a14615 100644 --- a/crates/web-sys/src/features/gen_InputEventInit.rs +++ b/crates/web-sys/src/features/gen_InputEventInit.rs @@ -15,29 +15,41 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &InputEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &InputEventInit, val: bool); + pub fn set_bubbles(this: &InputEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &InputEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &InputEventInit, val: bool); + pub fn set_cancelable(this: &InputEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &InputEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &InputEventInit, val: bool); + pub fn set_composed(this: &InputEventInit, val: bool); #[doc = "Get the `detail` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] #[wasm_bindgen(method, getter = "detail")] pub fn get_detail(this: &InputEventInit) -> Option; + #[doc = "Change the `detail` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] #[wasm_bindgen(method, setter = "detail")] - fn set_detail(this: &InputEventInit, val: i32); + pub fn set_detail(this: &InputEventInit, val: i32); #[cfg(feature = "Window")] #[doc = "Get the `view` field of this object."] #[doc = ""] @@ -45,15 +57,21 @@ extern "C" { #[wasm_bindgen(method, getter = "view")] pub fn get_view(this: &InputEventInit) -> Option; #[cfg(feature = "Window")] + #[doc = "Change the `view` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `InputEventInit`, `Window`*"] #[wasm_bindgen(method, setter = "view")] - fn set_view(this: &InputEventInit, val: Option<&Window>); + pub fn set_view(this: &InputEventInit, val: Option<&Window>); #[doc = "Get the `data` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] #[wasm_bindgen(method, getter = "data")] pub fn get_data(this: &InputEventInit) -> Option; + #[doc = "Change the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] #[wasm_bindgen(method, setter = "data")] - fn set_data(this: &InputEventInit, val: Option<&str>); + pub fn set_data(this: &InputEventInit, val: Option<&str>); #[cfg(feature = "DataTransfer")] #[doc = "Get the `dataTransfer` field of this object."] #[doc = ""] @@ -61,29 +79,41 @@ extern "C" { #[wasm_bindgen(method, getter = "dataTransfer")] pub fn get_data_transfer(this: &InputEventInit) -> Option; #[cfg(feature = "DataTransfer")] + #[doc = "Change the `dataTransfer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DataTransfer`, `InputEventInit`*"] #[wasm_bindgen(method, setter = "dataTransfer")] - fn set_data_transfer(this: &InputEventInit, val: Option<&DataTransfer>); + pub fn set_data_transfer(this: &InputEventInit, val: Option<&DataTransfer>); #[doc = "Get the `inputType` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] #[wasm_bindgen(method, getter = "inputType")] pub fn get_input_type(this: &InputEventInit) -> Option; + #[doc = "Change the `inputType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] #[wasm_bindgen(method, setter = "inputType")] - fn set_input_type(this: &InputEventInit, val: &str); + pub fn set_input_type(this: &InputEventInit, val: &str); #[doc = "Get the `isComposing` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] #[wasm_bindgen(method, getter = "isComposing")] pub fn get_is_composing(this: &InputEventInit) -> Option; + #[doc = "Change the `isComposing` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] #[wasm_bindgen(method, setter = "isComposing")] - fn set_is_composing(this: &InputEventInit, val: bool); + pub fn set_is_composing(this: &InputEventInit, val: bool); #[doc = "Get the `targetRanges` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] #[wasm_bindgen(method, getter = "targetRanges")] pub fn get_target_ranges(this: &InputEventInit) -> Option<::js_sys::Array>; + #[doc = "Change the `targetRanges` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] #[wasm_bindgen(method, setter = "targetRanges")] - fn set_target_ranges(this: &InputEventInit, val: &::wasm_bindgen::JsValue); + pub fn set_target_ranges(this: &InputEventInit, val: &::wasm_bindgen::JsValue); } impl InputEventInit { #[doc = "Construct a new `InputEventInit`."] @@ -94,74 +124,54 @@ impl InputEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } - #[doc = "Change the `detail` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] + #[deprecated = "Use `set_detail()` instead."] pub fn detail(&mut self, val: i32) -> &mut Self { self.set_detail(val); self } #[cfg(feature = "Window")] - #[doc = "Change the `view` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `InputEventInit`, `Window`*"] + #[deprecated = "Use `set_view()` instead."] pub fn view(&mut self, val: Option<&Window>) -> &mut Self { self.set_view(val); self } - #[doc = "Change the `data` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] + #[deprecated = "Use `set_data()` instead."] pub fn data(&mut self, val: Option<&str>) -> &mut Self { self.set_data(val); self } #[cfg(feature = "DataTransfer")] - #[doc = "Change the `dataTransfer` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DataTransfer`, `InputEventInit`*"] + #[deprecated = "Use `set_data_transfer()` instead."] pub fn data_transfer(&mut self, val: Option<&DataTransfer>) -> &mut Self { self.set_data_transfer(val); self } - #[doc = "Change the `inputType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] + #[deprecated = "Use `set_input_type()` instead."] pub fn input_type(&mut self, val: &str) -> &mut Self { self.set_input_type(val); self } - #[doc = "Change the `isComposing` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] + #[deprecated = "Use `set_is_composing()` instead."] pub fn is_composing(&mut self, val: bool) -> &mut Self { self.set_is_composing(val); self } - #[doc = "Change the `targetRanges` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] + #[deprecated = "Use `set_target_ranges()` instead."] pub fn target_ranges(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_target_ranges(val); self diff --git a/crates/web-sys/src/features/gen_IntersectionObserverEntryInit.rs b/crates/web-sys/src/features/gen_IntersectionObserverEntryInit.rs index fc864d71dad7..e9588ef123a7 100644 --- a/crates/web-sys/src/features/gen_IntersectionObserverEntryInit.rs +++ b/crates/web-sys/src/features/gen_IntersectionObserverEntryInit.rs @@ -17,8 +17,11 @@ extern "C" { #[wasm_bindgen(method, getter = "boundingClientRect")] pub fn get_bounding_client_rect(this: &IntersectionObserverEntryInit) -> DomRectInit; #[cfg(feature = "DomRectInit")] + #[doc = "Change the `boundingClientRect` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomRectInit`, `IntersectionObserverEntryInit`*"] #[wasm_bindgen(method, setter = "boundingClientRect")] - fn set_bounding_client_rect(this: &IntersectionObserverEntryInit, val: &DomRectInit); + pub fn set_bounding_client_rect(this: &IntersectionObserverEntryInit, val: &DomRectInit); #[cfg(feature = "DomRectInit")] #[doc = "Get the `intersectionRect` field of this object."] #[doc = ""] @@ -26,8 +29,11 @@ extern "C" { #[wasm_bindgen(method, getter = "intersectionRect")] pub fn get_intersection_rect(this: &IntersectionObserverEntryInit) -> DomRectInit; #[cfg(feature = "DomRectInit")] + #[doc = "Change the `intersectionRect` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomRectInit`, `IntersectionObserverEntryInit`*"] #[wasm_bindgen(method, setter = "intersectionRect")] - fn set_intersection_rect(this: &IntersectionObserverEntryInit, val: &DomRectInit); + pub fn set_intersection_rect(this: &IntersectionObserverEntryInit, val: &DomRectInit); #[cfg(feature = "DomRectInit")] #[doc = "Get the `rootBounds` field of this object."] #[doc = ""] @@ -35,8 +41,11 @@ extern "C" { #[wasm_bindgen(method, getter = "rootBounds")] pub fn get_root_bounds(this: &IntersectionObserverEntryInit) -> DomRectInit; #[cfg(feature = "DomRectInit")] + #[doc = "Change the `rootBounds` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomRectInit`, `IntersectionObserverEntryInit`*"] #[wasm_bindgen(method, setter = "rootBounds")] - fn set_root_bounds(this: &IntersectionObserverEntryInit, val: &DomRectInit); + pub fn set_root_bounds(this: &IntersectionObserverEntryInit, val: &DomRectInit); #[cfg(feature = "Element")] #[doc = "Get the `target` field of this object."] #[doc = ""] @@ -44,15 +53,21 @@ extern "C" { #[wasm_bindgen(method, getter = "target")] pub fn get_target(this: &IntersectionObserverEntryInit) -> Element; #[cfg(feature = "Element")] + #[doc = "Change the `target` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Element`, `IntersectionObserverEntryInit`*"] #[wasm_bindgen(method, setter = "target")] - fn set_target(this: &IntersectionObserverEntryInit, val: &Element); + pub fn set_target(this: &IntersectionObserverEntryInit, val: &Element); #[doc = "Get the `time` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IntersectionObserverEntryInit`*"] #[wasm_bindgen(method, getter = "time")] pub fn get_time(this: &IntersectionObserverEntryInit) -> f64; + #[doc = "Change the `time` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IntersectionObserverEntryInit`*"] #[wasm_bindgen(method, setter = "time")] - fn set_time(this: &IntersectionObserverEntryInit, val: f64); + pub fn set_time(this: &IntersectionObserverEntryInit, val: f64); } impl IntersectionObserverEntryInit { #[cfg(all(feature = "DomRectInit", feature = "Element",))] @@ -76,40 +91,30 @@ impl IntersectionObserverEntryInit { ret } #[cfg(feature = "DomRectInit")] - #[doc = "Change the `boundingClientRect` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomRectInit`, `IntersectionObserverEntryInit`*"] + #[deprecated = "Use `set_bounding_client_rect()` instead."] pub fn bounding_client_rect(&mut self, val: &DomRectInit) -> &mut Self { self.set_bounding_client_rect(val); self } #[cfg(feature = "DomRectInit")] - #[doc = "Change the `intersectionRect` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomRectInit`, `IntersectionObserverEntryInit`*"] + #[deprecated = "Use `set_intersection_rect()` instead."] pub fn intersection_rect(&mut self, val: &DomRectInit) -> &mut Self { self.set_intersection_rect(val); self } #[cfg(feature = "DomRectInit")] - #[doc = "Change the `rootBounds` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomRectInit`, `IntersectionObserverEntryInit`*"] + #[deprecated = "Use `set_root_bounds()` instead."] pub fn root_bounds(&mut self, val: &DomRectInit) -> &mut Self { self.set_root_bounds(val); self } #[cfg(feature = "Element")] - #[doc = "Change the `target` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `Element`, `IntersectionObserverEntryInit`*"] + #[deprecated = "Use `set_target()` instead."] pub fn target(&mut self, val: &Element) -> &mut Self { self.set_target(val); self } - #[doc = "Change the `time` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `IntersectionObserverEntryInit`*"] + #[deprecated = "Use `set_time()` instead."] pub fn time(&mut self, val: f64) -> &mut Self { self.set_time(val); self diff --git a/crates/web-sys/src/features/gen_IntersectionObserverInit.rs b/crates/web-sys/src/features/gen_IntersectionObserverInit.rs index 34064c3f5f82..115d8359ff64 100644 --- a/crates/web-sys/src/features/gen_IntersectionObserverInit.rs +++ b/crates/web-sys/src/features/gen_IntersectionObserverInit.rs @@ -17,22 +17,31 @@ extern "C" { #[wasm_bindgen(method, getter = "root")] pub fn get_root(this: &IntersectionObserverInit) -> Option; #[cfg(feature = "Element")] + #[doc = "Change the `root` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Element`, `IntersectionObserverInit`*"] #[wasm_bindgen(method, setter = "root")] - fn set_root(this: &IntersectionObserverInit, val: Option<&Element>); + pub fn set_root(this: &IntersectionObserverInit, val: Option<&Element>); #[doc = "Get the `rootMargin` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IntersectionObserverInit`*"] #[wasm_bindgen(method, getter = "rootMargin")] pub fn get_root_margin(this: &IntersectionObserverInit) -> Option; + #[doc = "Change the `rootMargin` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IntersectionObserverInit`*"] #[wasm_bindgen(method, setter = "rootMargin")] - fn set_root_margin(this: &IntersectionObserverInit, val: &str); + pub fn set_root_margin(this: &IntersectionObserverInit, val: &str); #[doc = "Get the `threshold` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IntersectionObserverInit`*"] #[wasm_bindgen(method, getter = "threshold")] pub fn get_threshold(this: &IntersectionObserverInit) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `threshold` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IntersectionObserverInit`*"] #[wasm_bindgen(method, setter = "threshold")] - fn set_threshold(this: &IntersectionObserverInit, val: &::wasm_bindgen::JsValue); + pub fn set_threshold(this: &IntersectionObserverInit, val: &::wasm_bindgen::JsValue); } impl IntersectionObserverInit { #[doc = "Construct a new `IntersectionObserverInit`."] @@ -44,23 +53,17 @@ impl IntersectionObserverInit { ret } #[cfg(feature = "Element")] - #[doc = "Change the `root` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `Element`, `IntersectionObserverInit`*"] + #[deprecated = "Use `set_root()` instead."] pub fn root(&mut self, val: Option<&Element>) -> &mut Self { self.set_root(val); self } - #[doc = "Change the `rootMargin` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `IntersectionObserverInit`*"] + #[deprecated = "Use `set_root_margin()` instead."] pub fn root_margin(&mut self, val: &str) -> &mut Self { self.set_root_margin(val); self } - #[doc = "Change the `threshold` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `IntersectionObserverInit`*"] + #[deprecated = "Use `set_threshold()` instead."] pub fn threshold(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_threshold(val); self diff --git a/crates/web-sys/src/features/gen_IsInputPendingOptions.rs b/crates/web-sys/src/features/gen_IsInputPendingOptions.rs index ed390b74084f..b627894cb707 100644 --- a/crates/web-sys/src/features/gen_IsInputPendingOptions.rs +++ b/crates/web-sys/src/features/gen_IsInputPendingOptions.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "includeContinuous")] pub fn get_include_continuous(this: &IsInputPendingOptions) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `includeContinuous` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IsInputPendingOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "includeContinuous")] - fn set_include_continuous(this: &IsInputPendingOptions, val: bool); + pub fn set_include_continuous(this: &IsInputPendingOptions, val: bool); } #[cfg(web_sys_unstable_apis)] impl IsInputPendingOptions { @@ -40,12 +47,7 @@ impl IsInputPendingOptions { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `includeContinuous` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `IsInputPendingOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_include_continuous()` instead."] pub fn include_continuous(&mut self, val: bool) -> &mut Self { self.set_include_continuous(val); self diff --git a/crates/web-sys/src/features/gen_IterableKeyAndValueResult.rs b/crates/web-sys/src/features/gen_IterableKeyAndValueResult.rs index 69229a0670ca..d6c2c0b81fc6 100644 --- a/crates/web-sys/src/features/gen_IterableKeyAndValueResult.rs +++ b/crates/web-sys/src/features/gen_IterableKeyAndValueResult.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `IterableKeyAndValueResult`*"] #[wasm_bindgen(method, getter = "done")] pub fn get_done(this: &IterableKeyAndValueResult) -> Option; + #[doc = "Change the `done` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IterableKeyAndValueResult`*"] #[wasm_bindgen(method, setter = "done")] - fn set_done(this: &IterableKeyAndValueResult, val: bool); + pub fn set_done(this: &IterableKeyAndValueResult, val: bool); #[doc = "Get the `value` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IterableKeyAndValueResult`*"] #[wasm_bindgen(method, getter = "value")] pub fn get_value(this: &IterableKeyAndValueResult) -> Option<::js_sys::Array>; + #[doc = "Change the `value` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IterableKeyAndValueResult`*"] #[wasm_bindgen(method, setter = "value")] - fn set_value(this: &IterableKeyAndValueResult, val: &::wasm_bindgen::JsValue); + pub fn set_value(this: &IterableKeyAndValueResult, val: &::wasm_bindgen::JsValue); } impl IterableKeyAndValueResult { #[doc = "Construct a new `IterableKeyAndValueResult`."] @@ -34,16 +40,12 @@ impl IterableKeyAndValueResult { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `done` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `IterableKeyAndValueResult`*"] + #[deprecated = "Use `set_done()` instead."] pub fn done(&mut self, val: bool) -> &mut Self { self.set_done(val); self } - #[doc = "Change the `value` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `IterableKeyAndValueResult`*"] + #[deprecated = "Use `set_value()` instead."] pub fn value(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_value(val); self diff --git a/crates/web-sys/src/features/gen_IterableKeyOrValueResult.rs b/crates/web-sys/src/features/gen_IterableKeyOrValueResult.rs index 430d6c99eeb5..366d7aaae766 100644 --- a/crates/web-sys/src/features/gen_IterableKeyOrValueResult.rs +++ b/crates/web-sys/src/features/gen_IterableKeyOrValueResult.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `IterableKeyOrValueResult`*"] #[wasm_bindgen(method, getter = "done")] pub fn get_done(this: &IterableKeyOrValueResult) -> Option; + #[doc = "Change the `done` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IterableKeyOrValueResult`*"] #[wasm_bindgen(method, setter = "done")] - fn set_done(this: &IterableKeyOrValueResult, val: bool); + pub fn set_done(this: &IterableKeyOrValueResult, val: bool); #[doc = "Get the `value` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IterableKeyOrValueResult`*"] #[wasm_bindgen(method, getter = "value")] pub fn get_value(this: &IterableKeyOrValueResult) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `value` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IterableKeyOrValueResult`*"] #[wasm_bindgen(method, setter = "value")] - fn set_value(this: &IterableKeyOrValueResult, val: &::wasm_bindgen::JsValue); + pub fn set_value(this: &IterableKeyOrValueResult, val: &::wasm_bindgen::JsValue); } impl IterableKeyOrValueResult { #[doc = "Construct a new `IterableKeyOrValueResult`."] @@ -34,16 +40,12 @@ impl IterableKeyOrValueResult { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `done` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `IterableKeyOrValueResult`*"] + #[deprecated = "Use `set_done()` instead."] pub fn done(&mut self, val: bool) -> &mut Self { self.set_done(val); self } - #[doc = "Change the `value` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `IterableKeyOrValueResult`*"] + #[deprecated = "Use `set_value()` instead."] pub fn value(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_value(val); self diff --git a/crates/web-sys/src/features/gen_JsonWebKey.rs b/crates/web-sys/src/features/gen_JsonWebKey.rs index 18b90f7f0013..7969e461a34d 100644 --- a/crates/web-sys/src/features/gen_JsonWebKey.rs +++ b/crates/web-sys/src/features/gen_JsonWebKey.rs @@ -15,127 +15,181 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] #[wasm_bindgen(method, getter = "alg")] pub fn get_alg(this: &JsonWebKey) -> Option; + #[doc = "Change the `alg` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] #[wasm_bindgen(method, setter = "alg")] - fn set_alg(this: &JsonWebKey, val: &str); + pub fn set_alg(this: &JsonWebKey, val: &str); #[doc = "Get the `crv` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] #[wasm_bindgen(method, getter = "crv")] pub fn get_crv(this: &JsonWebKey) -> Option; + #[doc = "Change the `crv` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] #[wasm_bindgen(method, setter = "crv")] - fn set_crv(this: &JsonWebKey, val: &str); + pub fn set_crv(this: &JsonWebKey, val: &str); #[doc = "Get the `d` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] #[wasm_bindgen(method, getter = "d")] pub fn get_d(this: &JsonWebKey) -> Option; + #[doc = "Change the `d` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] #[wasm_bindgen(method, setter = "d")] - fn set_d(this: &JsonWebKey, val: &str); + pub fn set_d(this: &JsonWebKey, val: &str); #[doc = "Get the `dp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] #[wasm_bindgen(method, getter = "dp")] pub fn get_dp(this: &JsonWebKey) -> Option; + #[doc = "Change the `dp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] #[wasm_bindgen(method, setter = "dp")] - fn set_dp(this: &JsonWebKey, val: &str); + pub fn set_dp(this: &JsonWebKey, val: &str); #[doc = "Get the `dq` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] #[wasm_bindgen(method, getter = "dq")] pub fn get_dq(this: &JsonWebKey) -> Option; + #[doc = "Change the `dq` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] #[wasm_bindgen(method, setter = "dq")] - fn set_dq(this: &JsonWebKey, val: &str); + pub fn set_dq(this: &JsonWebKey, val: &str); #[doc = "Get the `e` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] #[wasm_bindgen(method, getter = "e")] pub fn get_e(this: &JsonWebKey) -> Option; + #[doc = "Change the `e` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] #[wasm_bindgen(method, setter = "e")] - fn set_e(this: &JsonWebKey, val: &str); + pub fn set_e(this: &JsonWebKey, val: &str); #[doc = "Get the `ext` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] #[wasm_bindgen(method, getter = "ext")] pub fn get_ext(this: &JsonWebKey) -> Option; + #[doc = "Change the `ext` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] #[wasm_bindgen(method, setter = "ext")] - fn set_ext(this: &JsonWebKey, val: bool); + pub fn set_ext(this: &JsonWebKey, val: bool); #[doc = "Get the `k` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] #[wasm_bindgen(method, getter = "k")] pub fn get_k(this: &JsonWebKey) -> Option; + #[doc = "Change the `k` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] #[wasm_bindgen(method, setter = "k")] - fn set_k(this: &JsonWebKey, val: &str); + pub fn set_k(this: &JsonWebKey, val: &str); #[doc = "Get the `key_ops` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] #[wasm_bindgen(method, getter = "key_ops")] pub fn get_key_ops(this: &JsonWebKey) -> Option<::js_sys::Array>; + #[doc = "Change the `key_ops` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] #[wasm_bindgen(method, setter = "key_ops")] - fn set_key_ops(this: &JsonWebKey, val: &::wasm_bindgen::JsValue); + pub fn set_key_ops(this: &JsonWebKey, val: &::wasm_bindgen::JsValue); #[doc = "Get the `kty` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] #[wasm_bindgen(method, getter = "kty")] pub fn get_kty(this: &JsonWebKey) -> String; + #[doc = "Change the `kty` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] #[wasm_bindgen(method, setter = "kty")] - fn set_kty(this: &JsonWebKey, val: &str); + pub fn set_kty(this: &JsonWebKey, val: &str); #[doc = "Get the `n` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] #[wasm_bindgen(method, getter = "n")] pub fn get_n(this: &JsonWebKey) -> Option; + #[doc = "Change the `n` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] #[wasm_bindgen(method, setter = "n")] - fn set_n(this: &JsonWebKey, val: &str); + pub fn set_n(this: &JsonWebKey, val: &str); #[doc = "Get the `oth` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] #[wasm_bindgen(method, getter = "oth")] pub fn get_oth(this: &JsonWebKey) -> Option<::js_sys::Array>; + #[doc = "Change the `oth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] #[wasm_bindgen(method, setter = "oth")] - fn set_oth(this: &JsonWebKey, val: &::wasm_bindgen::JsValue); + pub fn set_oth(this: &JsonWebKey, val: &::wasm_bindgen::JsValue); #[doc = "Get the `p` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] #[wasm_bindgen(method, getter = "p")] pub fn get_p(this: &JsonWebKey) -> Option; + #[doc = "Change the `p` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] #[wasm_bindgen(method, setter = "p")] - fn set_p(this: &JsonWebKey, val: &str); + pub fn set_p(this: &JsonWebKey, val: &str); #[doc = "Get the `q` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] #[wasm_bindgen(method, getter = "q")] pub fn get_q(this: &JsonWebKey) -> Option; + #[doc = "Change the `q` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] #[wasm_bindgen(method, setter = "q")] - fn set_q(this: &JsonWebKey, val: &str); + pub fn set_q(this: &JsonWebKey, val: &str); #[doc = "Get the `qi` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] #[wasm_bindgen(method, getter = "qi")] pub fn get_qi(this: &JsonWebKey) -> Option; + #[doc = "Change the `qi` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] #[wasm_bindgen(method, setter = "qi")] - fn set_qi(this: &JsonWebKey, val: &str); + pub fn set_qi(this: &JsonWebKey, val: &str); #[doc = "Get the `use` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] #[wasm_bindgen(method, getter = "use")] pub fn get_use(this: &JsonWebKey) -> Option; + #[doc = "Change the `use` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] #[wasm_bindgen(method, setter = "use")] - fn set_use(this: &JsonWebKey, val: &str); + pub fn set_use(this: &JsonWebKey, val: &str); #[doc = "Get the `x` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] #[wasm_bindgen(method, getter = "x")] pub fn get_x(this: &JsonWebKey) -> Option; + #[doc = "Change the `x` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] #[wasm_bindgen(method, setter = "x")] - fn set_x(this: &JsonWebKey, val: &str); + pub fn set_x(this: &JsonWebKey, val: &str); #[doc = "Get the `y` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] #[wasm_bindgen(method, getter = "y")] pub fn get_y(this: &JsonWebKey) -> Option; + #[doc = "Change the `y` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] #[wasm_bindgen(method, setter = "y")] - fn set_y(this: &JsonWebKey, val: &str); + pub fn set_y(this: &JsonWebKey, val: &str); } impl JsonWebKey { #[doc = "Construct a new `JsonWebKey`."] @@ -147,128 +201,92 @@ impl JsonWebKey { ret.kty(kty); ret } - #[doc = "Change the `alg` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + #[deprecated = "Use `set_alg()` instead."] pub fn alg(&mut self, val: &str) -> &mut Self { self.set_alg(val); self } - #[doc = "Change the `crv` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + #[deprecated = "Use `set_crv()` instead."] pub fn crv(&mut self, val: &str) -> &mut Self { self.set_crv(val); self } - #[doc = "Change the `d` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + #[deprecated = "Use `set_d()` instead."] pub fn d(&mut self, val: &str) -> &mut Self { self.set_d(val); self } - #[doc = "Change the `dp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + #[deprecated = "Use `set_dp()` instead."] pub fn dp(&mut self, val: &str) -> &mut Self { self.set_dp(val); self } - #[doc = "Change the `dq` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + #[deprecated = "Use `set_dq()` instead."] pub fn dq(&mut self, val: &str) -> &mut Self { self.set_dq(val); self } - #[doc = "Change the `e` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + #[deprecated = "Use `set_e()` instead."] pub fn e(&mut self, val: &str) -> &mut Self { self.set_e(val); self } - #[doc = "Change the `ext` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + #[deprecated = "Use `set_ext()` instead."] pub fn ext(&mut self, val: bool) -> &mut Self { self.set_ext(val); self } - #[doc = "Change the `k` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + #[deprecated = "Use `set_k()` instead."] pub fn k(&mut self, val: &str) -> &mut Self { self.set_k(val); self } - #[doc = "Change the `key_ops` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + #[deprecated = "Use `set_key_ops()` instead."] pub fn key_ops(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_key_ops(val); self } - #[doc = "Change the `kty` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + #[deprecated = "Use `set_kty()` instead."] pub fn kty(&mut self, val: &str) -> &mut Self { self.set_kty(val); self } - #[doc = "Change the `n` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + #[deprecated = "Use `set_n()` instead."] pub fn n(&mut self, val: &str) -> &mut Self { self.set_n(val); self } - #[doc = "Change the `oth` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + #[deprecated = "Use `set_oth()` instead."] pub fn oth(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_oth(val); self } - #[doc = "Change the `p` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + #[deprecated = "Use `set_p()` instead."] pub fn p(&mut self, val: &str) -> &mut Self { self.set_p(val); self } - #[doc = "Change the `q` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + #[deprecated = "Use `set_q()` instead."] pub fn q(&mut self, val: &str) -> &mut Self { self.set_q(val); self } - #[doc = "Change the `qi` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + #[deprecated = "Use `set_qi()` instead."] pub fn qi(&mut self, val: &str) -> &mut Self { self.set_qi(val); self } - #[doc = "Change the `use` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + #[deprecated = "Use `set_use()` instead."] pub fn use_(&mut self, val: &str) -> &mut Self { self.set_use(val); self } - #[doc = "Change the `x` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + #[deprecated = "Use `set_x()` instead."] pub fn x(&mut self, val: &str) -> &mut Self { self.set_x(val); self } - #[doc = "Change the `y` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + #[deprecated = "Use `set_y()` instead."] pub fn y(&mut self, val: &str) -> &mut Self { self.set_y(val); self diff --git a/crates/web-sys/src/features/gen_KeyAlgorithm.rs b/crates/web-sys/src/features/gen_KeyAlgorithm.rs index 42eb93b7b56d..d7523f2da734 100644 --- a/crates/web-sys/src/features/gen_KeyAlgorithm.rs +++ b/crates/web-sys/src/features/gen_KeyAlgorithm.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `KeyAlgorithm`*"] #[wasm_bindgen(method, getter = "name")] pub fn get_name(this: &KeyAlgorithm) -> String; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyAlgorithm`*"] #[wasm_bindgen(method, setter = "name")] - fn set_name(this: &KeyAlgorithm, val: &str); + pub fn set_name(this: &KeyAlgorithm, val: &str); } impl KeyAlgorithm { #[doc = "Construct a new `KeyAlgorithm`."] @@ -28,9 +31,7 @@ impl KeyAlgorithm { ret.name(name); ret } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyAlgorithm`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { self.set_name(val); self diff --git a/crates/web-sys/src/features/gen_KeyIdsInitData.rs b/crates/web-sys/src/features/gen_KeyIdsInitData.rs index 6a96add37886..c05623d59d37 100644 --- a/crates/web-sys/src/features/gen_KeyIdsInitData.rs +++ b/crates/web-sys/src/features/gen_KeyIdsInitData.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `KeyIdsInitData`*"] #[wasm_bindgen(method, getter = "kids")] pub fn get_kids(this: &KeyIdsInitData) -> ::js_sys::Array; + #[doc = "Change the `kids` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyIdsInitData`*"] #[wasm_bindgen(method, setter = "kids")] - fn set_kids(this: &KeyIdsInitData, val: &::wasm_bindgen::JsValue); + pub fn set_kids(this: &KeyIdsInitData, val: &::wasm_bindgen::JsValue); } impl KeyIdsInitData { #[doc = "Construct a new `KeyIdsInitData`."] @@ -28,9 +31,7 @@ impl KeyIdsInitData { ret.kids(kids); ret } - #[doc = "Change the `kids` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyIdsInitData`*"] + #[deprecated = "Use `set_kids()` instead."] pub fn kids(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_kids(val); self diff --git a/crates/web-sys/src/features/gen_KeyboardEventInit.rs b/crates/web-sys/src/features/gen_KeyboardEventInit.rs index d5cd35021347..a7701695929d 100644 --- a/crates/web-sys/src/features/gen_KeyboardEventInit.rs +++ b/crates/web-sys/src/features/gen_KeyboardEventInit.rs @@ -15,29 +15,41 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &KeyboardEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &KeyboardEventInit, val: bool); + pub fn set_bubbles(this: &KeyboardEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &KeyboardEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &KeyboardEventInit, val: bool); + pub fn set_cancelable(this: &KeyboardEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &KeyboardEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &KeyboardEventInit, val: bool); + pub fn set_composed(this: &KeyboardEventInit, val: bool); #[doc = "Get the `detail` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, getter = "detail")] pub fn get_detail(this: &KeyboardEventInit) -> Option; + #[doc = "Change the `detail` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, setter = "detail")] - fn set_detail(this: &KeyboardEventInit, val: i32); + pub fn set_detail(this: &KeyboardEventInit, val: i32); #[cfg(feature = "Window")] #[doc = "Get the `view` field of this object."] #[doc = ""] @@ -45,155 +57,221 @@ extern "C" { #[wasm_bindgen(method, getter = "view")] pub fn get_view(this: &KeyboardEventInit) -> Option; #[cfg(feature = "Window")] + #[doc = "Change the `view` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`, `Window`*"] #[wasm_bindgen(method, setter = "view")] - fn set_view(this: &KeyboardEventInit, val: Option<&Window>); + pub fn set_view(this: &KeyboardEventInit, val: Option<&Window>); #[doc = "Get the `altKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, getter = "altKey")] pub fn get_alt_key(this: &KeyboardEventInit) -> Option; + #[doc = "Change the `altKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, setter = "altKey")] - fn set_alt_key(this: &KeyboardEventInit, val: bool); + pub fn set_alt_key(this: &KeyboardEventInit, val: bool); #[doc = "Get the `ctrlKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, getter = "ctrlKey")] pub fn get_ctrl_key(this: &KeyboardEventInit) -> Option; + #[doc = "Change the `ctrlKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, setter = "ctrlKey")] - fn set_ctrl_key(this: &KeyboardEventInit, val: bool); + pub fn set_ctrl_key(this: &KeyboardEventInit, val: bool); #[doc = "Get the `metaKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, getter = "metaKey")] pub fn get_meta_key(this: &KeyboardEventInit) -> Option; + #[doc = "Change the `metaKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, setter = "metaKey")] - fn set_meta_key(this: &KeyboardEventInit, val: bool); + pub fn set_meta_key(this: &KeyboardEventInit, val: bool); #[doc = "Get the `modifierAltGraph` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, getter = "modifierAltGraph")] pub fn get_modifier_alt_graph(this: &KeyboardEventInit) -> Option; + #[doc = "Change the `modifierAltGraph` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, setter = "modifierAltGraph")] - fn set_modifier_alt_graph(this: &KeyboardEventInit, val: bool); + pub fn set_modifier_alt_graph(this: &KeyboardEventInit, val: bool); #[doc = "Get the `modifierCapsLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, getter = "modifierCapsLock")] pub fn get_modifier_caps_lock(this: &KeyboardEventInit) -> Option; + #[doc = "Change the `modifierCapsLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, setter = "modifierCapsLock")] - fn set_modifier_caps_lock(this: &KeyboardEventInit, val: bool); + pub fn set_modifier_caps_lock(this: &KeyboardEventInit, val: bool); #[doc = "Get the `modifierFn` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, getter = "modifierFn")] pub fn get_modifier_fn(this: &KeyboardEventInit) -> Option; + #[doc = "Change the `modifierFn` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, setter = "modifierFn")] - fn set_modifier_fn(this: &KeyboardEventInit, val: bool); + pub fn set_modifier_fn(this: &KeyboardEventInit, val: bool); #[doc = "Get the `modifierFnLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, getter = "modifierFnLock")] pub fn get_modifier_fn_lock(this: &KeyboardEventInit) -> Option; + #[doc = "Change the `modifierFnLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, setter = "modifierFnLock")] - fn set_modifier_fn_lock(this: &KeyboardEventInit, val: bool); + pub fn set_modifier_fn_lock(this: &KeyboardEventInit, val: bool); #[doc = "Get the `modifierNumLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, getter = "modifierNumLock")] pub fn get_modifier_num_lock(this: &KeyboardEventInit) -> Option; + #[doc = "Change the `modifierNumLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, setter = "modifierNumLock")] - fn set_modifier_num_lock(this: &KeyboardEventInit, val: bool); + pub fn set_modifier_num_lock(this: &KeyboardEventInit, val: bool); #[doc = "Get the `modifierOS` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, getter = "modifierOS")] pub fn get_modifier_os(this: &KeyboardEventInit) -> Option; + #[doc = "Change the `modifierOS` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, setter = "modifierOS")] - fn set_modifier_os(this: &KeyboardEventInit, val: bool); + pub fn set_modifier_os(this: &KeyboardEventInit, val: bool); #[doc = "Get the `modifierScrollLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, getter = "modifierScrollLock")] pub fn get_modifier_scroll_lock(this: &KeyboardEventInit) -> Option; + #[doc = "Change the `modifierScrollLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, setter = "modifierScrollLock")] - fn set_modifier_scroll_lock(this: &KeyboardEventInit, val: bool); + pub fn set_modifier_scroll_lock(this: &KeyboardEventInit, val: bool); #[doc = "Get the `modifierSymbol` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, getter = "modifierSymbol")] pub fn get_modifier_symbol(this: &KeyboardEventInit) -> Option; + #[doc = "Change the `modifierSymbol` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, setter = "modifierSymbol")] - fn set_modifier_symbol(this: &KeyboardEventInit, val: bool); + pub fn set_modifier_symbol(this: &KeyboardEventInit, val: bool); #[doc = "Get the `modifierSymbolLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, getter = "modifierSymbolLock")] pub fn get_modifier_symbol_lock(this: &KeyboardEventInit) -> Option; + #[doc = "Change the `modifierSymbolLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, setter = "modifierSymbolLock")] - fn set_modifier_symbol_lock(this: &KeyboardEventInit, val: bool); + pub fn set_modifier_symbol_lock(this: &KeyboardEventInit, val: bool); #[doc = "Get the `shiftKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, getter = "shiftKey")] pub fn get_shift_key(this: &KeyboardEventInit) -> Option; + #[doc = "Change the `shiftKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, setter = "shiftKey")] - fn set_shift_key(this: &KeyboardEventInit, val: bool); + pub fn set_shift_key(this: &KeyboardEventInit, val: bool); #[doc = "Get the `charCode` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, getter = "charCode")] pub fn get_char_code(this: &KeyboardEventInit) -> Option; + #[doc = "Change the `charCode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, setter = "charCode")] - fn set_char_code(this: &KeyboardEventInit, val: u32); + pub fn set_char_code(this: &KeyboardEventInit, val: u32); #[doc = "Get the `code` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, getter = "code")] pub fn get_code(this: &KeyboardEventInit) -> Option; + #[doc = "Change the `code` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, setter = "code")] - fn set_code(this: &KeyboardEventInit, val: &str); + pub fn set_code(this: &KeyboardEventInit, val: &str); #[doc = "Get the `isComposing` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, getter = "isComposing")] pub fn get_is_composing(this: &KeyboardEventInit) -> Option; + #[doc = "Change the `isComposing` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, setter = "isComposing")] - fn set_is_composing(this: &KeyboardEventInit, val: bool); + pub fn set_is_composing(this: &KeyboardEventInit, val: bool); #[doc = "Get the `key` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, getter = "key")] pub fn get_key(this: &KeyboardEventInit) -> Option; + #[doc = "Change the `key` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, setter = "key")] - fn set_key(this: &KeyboardEventInit, val: &str); + pub fn set_key(this: &KeyboardEventInit, val: &str); #[doc = "Get the `keyCode` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, getter = "keyCode")] pub fn get_key_code(this: &KeyboardEventInit) -> Option; + #[doc = "Change the `keyCode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, setter = "keyCode")] - fn set_key_code(this: &KeyboardEventInit, val: u32); + pub fn set_key_code(this: &KeyboardEventInit, val: u32); #[doc = "Get the `location` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, getter = "location")] pub fn get_location(this: &KeyboardEventInit) -> Option; + #[doc = "Change the `location` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, setter = "location")] - fn set_location(this: &KeyboardEventInit, val: u32); + pub fn set_location(this: &KeyboardEventInit, val: u32); #[doc = "Get the `repeat` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, getter = "repeat")] pub fn get_repeat(this: &KeyboardEventInit) -> Option; + #[doc = "Change the `repeat` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, setter = "repeat")] - fn set_repeat(this: &KeyboardEventInit, val: bool); + pub fn set_repeat(this: &KeyboardEventInit, val: bool); #[doc = "Get the `which` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, getter = "which")] pub fn get_which(this: &KeyboardEventInit) -> Option; + #[doc = "Change the `which` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, setter = "which")] - fn set_which(this: &KeyboardEventInit, val: u32); + pub fn set_which(this: &KeyboardEventInit, val: u32); } impl KeyboardEventInit { #[doc = "Construct a new `KeyboardEventInit`."] @@ -204,185 +282,133 @@ impl KeyboardEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } - #[doc = "Change the `detail` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[deprecated = "Use `set_detail()` instead."] pub fn detail(&mut self, val: i32) -> &mut Self { self.set_detail(val); self } #[cfg(feature = "Window")] - #[doc = "Change the `view` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`, `Window`*"] + #[deprecated = "Use `set_view()` instead."] pub fn view(&mut self, val: Option<&Window>) -> &mut Self { self.set_view(val); self } - #[doc = "Change the `altKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[deprecated = "Use `set_alt_key()` instead."] pub fn alt_key(&mut self, val: bool) -> &mut Self { self.set_alt_key(val); self } - #[doc = "Change the `ctrlKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[deprecated = "Use `set_ctrl_key()` instead."] pub fn ctrl_key(&mut self, val: bool) -> &mut Self { self.set_ctrl_key(val); self } - #[doc = "Change the `metaKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[deprecated = "Use `set_meta_key()` instead."] pub fn meta_key(&mut self, val: bool) -> &mut Self { self.set_meta_key(val); self } - #[doc = "Change the `modifierAltGraph` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[deprecated = "Use `set_modifier_alt_graph()` instead."] pub fn modifier_alt_graph(&mut self, val: bool) -> &mut Self { self.set_modifier_alt_graph(val); self } - #[doc = "Change the `modifierCapsLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[deprecated = "Use `set_modifier_caps_lock()` instead."] pub fn modifier_caps_lock(&mut self, val: bool) -> &mut Self { self.set_modifier_caps_lock(val); self } - #[doc = "Change the `modifierFn` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[deprecated = "Use `set_modifier_fn()` instead."] pub fn modifier_fn(&mut self, val: bool) -> &mut Self { self.set_modifier_fn(val); self } - #[doc = "Change the `modifierFnLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[deprecated = "Use `set_modifier_fn_lock()` instead."] pub fn modifier_fn_lock(&mut self, val: bool) -> &mut Self { self.set_modifier_fn_lock(val); self } - #[doc = "Change the `modifierNumLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[deprecated = "Use `set_modifier_num_lock()` instead."] pub fn modifier_num_lock(&mut self, val: bool) -> &mut Self { self.set_modifier_num_lock(val); self } - #[doc = "Change the `modifierOS` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[deprecated = "Use `set_modifier_os()` instead."] pub fn modifier_os(&mut self, val: bool) -> &mut Self { self.set_modifier_os(val); self } - #[doc = "Change the `modifierScrollLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[deprecated = "Use `set_modifier_scroll_lock()` instead."] pub fn modifier_scroll_lock(&mut self, val: bool) -> &mut Self { self.set_modifier_scroll_lock(val); self } - #[doc = "Change the `modifierSymbol` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[deprecated = "Use `set_modifier_symbol()` instead."] pub fn modifier_symbol(&mut self, val: bool) -> &mut Self { self.set_modifier_symbol(val); self } - #[doc = "Change the `modifierSymbolLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[deprecated = "Use `set_modifier_symbol_lock()` instead."] pub fn modifier_symbol_lock(&mut self, val: bool) -> &mut Self { self.set_modifier_symbol_lock(val); self } - #[doc = "Change the `shiftKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[deprecated = "Use `set_shift_key()` instead."] pub fn shift_key(&mut self, val: bool) -> &mut Self { self.set_shift_key(val); self } - #[doc = "Change the `charCode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[deprecated = "Use `set_char_code()` instead."] pub fn char_code(&mut self, val: u32) -> &mut Self { self.set_char_code(val); self } - #[doc = "Change the `code` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[deprecated = "Use `set_code()` instead."] pub fn code(&mut self, val: &str) -> &mut Self { self.set_code(val); self } - #[doc = "Change the `isComposing` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[deprecated = "Use `set_is_composing()` instead."] pub fn is_composing(&mut self, val: bool) -> &mut Self { self.set_is_composing(val); self } - #[doc = "Change the `key` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[deprecated = "Use `set_key()` instead."] pub fn key(&mut self, val: &str) -> &mut Self { self.set_key(val); self } - #[doc = "Change the `keyCode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[deprecated = "Use `set_key_code()` instead."] pub fn key_code(&mut self, val: u32) -> &mut Self { self.set_key_code(val); self } - #[doc = "Change the `location` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[deprecated = "Use `set_location()` instead."] pub fn location(&mut self, val: u32) -> &mut Self { self.set_location(val); self } - #[doc = "Change the `repeat` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[deprecated = "Use `set_repeat()` instead."] pub fn repeat(&mut self, val: bool) -> &mut Self { self.set_repeat(val); self } - #[doc = "Change the `which` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[deprecated = "Use `set_which()` instead."] pub fn which(&mut self, val: u32) -> &mut Self { self.set_which(val); self diff --git a/crates/web-sys/src/features/gen_KeyframeAnimationOptions.rs b/crates/web-sys/src/features/gen_KeyframeAnimationOptions.rs index 8af65381361e..8777d27a77b0 100644 --- a/crates/web-sys/src/features/gen_KeyframeAnimationOptions.rs +++ b/crates/web-sys/src/features/gen_KeyframeAnimationOptions.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "delay")] pub fn get_delay(this: &KeyframeAnimationOptions) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `delay` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyframeAnimationOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "delay")] - fn set_delay(this: &KeyframeAnimationOptions, val: f64); + pub fn set_delay(this: &KeyframeAnimationOptions, val: f64); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "PlaybackDirection")] #[doc = "Get the `direction` field of this object."] @@ -35,9 +42,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "direction")] pub fn get_direction(this: &KeyframeAnimationOptions) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "PlaybackDirection")] + #[doc = "Change the `direction` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyframeAnimationOptions`, `PlaybackDirection`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "direction")] - fn set_direction(this: &KeyframeAnimationOptions, val: PlaybackDirection); + pub fn set_direction(this: &KeyframeAnimationOptions, val: PlaybackDirection); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `duration` field of this object."] #[doc = ""] @@ -47,8 +61,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "duration")] pub fn get_duration(this: &KeyframeAnimationOptions) -> ::wasm_bindgen::JsValue; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `duration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyframeAnimationOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "duration")] - fn set_duration(this: &KeyframeAnimationOptions, val: &::wasm_bindgen::JsValue); + pub fn set_duration(this: &KeyframeAnimationOptions, val: &::wasm_bindgen::JsValue); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `easing` field of this object."] #[doc = ""] @@ -58,8 +79,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "easing")] pub fn get_easing(this: &KeyframeAnimationOptions) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `easing` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyframeAnimationOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "easing")] - fn set_easing(this: &KeyframeAnimationOptions, val: &str); + pub fn set_easing(this: &KeyframeAnimationOptions, val: &str); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `endDelay` field of this object."] #[doc = ""] @@ -69,8 +97,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "endDelay")] pub fn get_end_delay(this: &KeyframeAnimationOptions) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `endDelay` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyframeAnimationOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "endDelay")] - fn set_end_delay(this: &KeyframeAnimationOptions, val: f64); + pub fn set_end_delay(this: &KeyframeAnimationOptions, val: f64); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "FillMode")] #[doc = "Get the `fill` field of this object."] @@ -81,9 +116,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "fill")] pub fn get_fill(this: &KeyframeAnimationOptions) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "FillMode")] + #[doc = "Change the `fill` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FillMode`, `KeyframeAnimationOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "fill")] - fn set_fill(this: &KeyframeAnimationOptions, val: FillMode); + pub fn set_fill(this: &KeyframeAnimationOptions, val: FillMode); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `iterationStart` field of this object."] #[doc = ""] @@ -93,8 +135,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "iterationStart")] pub fn get_iteration_start(this: &KeyframeAnimationOptions) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `iterationStart` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyframeAnimationOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "iterationStart")] - fn set_iteration_start(this: &KeyframeAnimationOptions, val: f64); + pub fn set_iteration_start(this: &KeyframeAnimationOptions, val: f64); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `iterations` field of this object."] #[doc = ""] @@ -104,8 +153,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "iterations")] pub fn get_iterations(this: &KeyframeAnimationOptions) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `iterations` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyframeAnimationOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "iterations")] - fn set_iterations(this: &KeyframeAnimationOptions, val: f64); + pub fn set_iterations(this: &KeyframeAnimationOptions, val: f64); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "CompositeOperation")] #[doc = "Get the `composite` field of this object."] @@ -116,9 +172,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "composite")] pub fn get_composite(this: &KeyframeAnimationOptions) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "CompositeOperation")] + #[doc = "Change the `composite` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CompositeOperation`, `KeyframeAnimationOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "composite")] - fn set_composite(this: &KeyframeAnimationOptions, val: CompositeOperation); + pub fn set_composite(this: &KeyframeAnimationOptions, val: CompositeOperation); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "IterationCompositeOperation")] #[doc = "Get the `iterationComposite` field of this object."] @@ -131,9 +194,19 @@ extern "C" { pub fn get_iteration_composite( this: &KeyframeAnimationOptions, ) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "IterationCompositeOperation")] + #[doc = "Change the `iterationComposite` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IterationCompositeOperation`, `KeyframeAnimationOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "iterationComposite")] - fn set_iteration_composite(this: &KeyframeAnimationOptions, val: IterationCompositeOperation); + pub fn set_iteration_composite( + this: &KeyframeAnimationOptions, + val: IterationCompositeOperation, + ); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `id` field of this object."] #[doc = ""] @@ -143,8 +216,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "id")] pub fn get_id(this: &KeyframeAnimationOptions) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyframeAnimationOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "id")] - fn set_id(this: &KeyframeAnimationOptions, val: &str); + pub fn set_id(this: &KeyframeAnimationOptions, val: &str); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "AnimationTimeline")] #[doc = "Get the `timeline` field of this object."] @@ -155,9 +235,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "timeline")] pub fn get_timeline(this: &KeyframeAnimationOptions) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "AnimationTimeline")] + #[doc = "Change the `timeline` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationTimeline`, `KeyframeAnimationOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "timeline")] - fn set_timeline(this: &KeyframeAnimationOptions, val: Option<&AnimationTimeline>); + pub fn set_timeline(this: &KeyframeAnimationOptions, val: Option<&AnimationTimeline>); } #[cfg(web_sys_unstable_apis)] impl KeyframeAnimationOptions { @@ -173,138 +260,78 @@ impl KeyframeAnimationOptions { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `delay` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyframeAnimationOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_delay()` instead."] pub fn delay(&mut self, val: f64) -> &mut Self { self.set_delay(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "PlaybackDirection")] - #[doc = "Change the `direction` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyframeAnimationOptions`, `PlaybackDirection`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_direction()` instead."] pub fn direction(&mut self, val: PlaybackDirection) -> &mut Self { self.set_direction(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `duration` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyframeAnimationOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_duration()` instead."] pub fn duration(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_duration(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `easing` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyframeAnimationOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_easing()` instead."] pub fn easing(&mut self, val: &str) -> &mut Self { self.set_easing(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `endDelay` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyframeAnimationOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_end_delay()` instead."] pub fn end_delay(&mut self, val: f64) -> &mut Self { self.set_end_delay(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "FillMode")] - #[doc = "Change the `fill` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FillMode`, `KeyframeAnimationOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_fill()` instead."] pub fn fill(&mut self, val: FillMode) -> &mut Self { self.set_fill(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `iterationStart` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyframeAnimationOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_iteration_start()` instead."] pub fn iteration_start(&mut self, val: f64) -> &mut Self { self.set_iteration_start(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `iterations` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyframeAnimationOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_iterations()` instead."] pub fn iterations(&mut self, val: f64) -> &mut Self { self.set_iterations(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "CompositeOperation")] - #[doc = "Change the `composite` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CompositeOperation`, `KeyframeAnimationOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_composite()` instead."] pub fn composite(&mut self, val: CompositeOperation) -> &mut Self { self.set_composite(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "IterationCompositeOperation")] - #[doc = "Change the `iterationComposite` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `IterationCompositeOperation`, `KeyframeAnimationOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_iteration_composite()` instead."] pub fn iteration_composite(&mut self, val: IterationCompositeOperation) -> &mut Self { self.set_iteration_composite(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `id` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyframeAnimationOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_id()` instead."] pub fn id(&mut self, val: &str) -> &mut Self { self.set_id(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "AnimationTimeline")] - #[doc = "Change the `timeline` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AnimationTimeline`, `KeyframeAnimationOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_timeline()` instead."] pub fn timeline(&mut self, val: Option<&AnimationTimeline>) -> &mut Self { self.set_timeline(val); self diff --git a/crates/web-sys/src/features/gen_KeyframeEffectOptions.rs b/crates/web-sys/src/features/gen_KeyframeEffectOptions.rs index 9dfa6ab4db1d..4424b0391e45 100644 --- a/crates/web-sys/src/features/gen_KeyframeEffectOptions.rs +++ b/crates/web-sys/src/features/gen_KeyframeEffectOptions.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"] #[wasm_bindgen(method, getter = "delay")] pub fn get_delay(this: &KeyframeEffectOptions) -> Option; + #[doc = "Change the `delay` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"] #[wasm_bindgen(method, setter = "delay")] - fn set_delay(this: &KeyframeEffectOptions, val: f64); + pub fn set_delay(this: &KeyframeEffectOptions, val: f64); #[cfg(feature = "PlaybackDirection")] #[doc = "Get the `direction` field of this object."] #[doc = ""] @@ -24,29 +27,41 @@ extern "C" { #[wasm_bindgen(method, getter = "direction")] pub fn get_direction(this: &KeyframeEffectOptions) -> Option; #[cfg(feature = "PlaybackDirection")] + #[doc = "Change the `direction` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`, `PlaybackDirection`*"] #[wasm_bindgen(method, setter = "direction")] - fn set_direction(this: &KeyframeEffectOptions, val: PlaybackDirection); + pub fn set_direction(this: &KeyframeEffectOptions, val: PlaybackDirection); #[doc = "Get the `duration` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"] #[wasm_bindgen(method, getter = "duration")] pub fn get_duration(this: &KeyframeEffectOptions) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `duration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"] #[wasm_bindgen(method, setter = "duration")] - fn set_duration(this: &KeyframeEffectOptions, val: &::wasm_bindgen::JsValue); + pub fn set_duration(this: &KeyframeEffectOptions, val: &::wasm_bindgen::JsValue); #[doc = "Get the `easing` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"] #[wasm_bindgen(method, getter = "easing")] pub fn get_easing(this: &KeyframeEffectOptions) -> Option; + #[doc = "Change the `easing` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"] #[wasm_bindgen(method, setter = "easing")] - fn set_easing(this: &KeyframeEffectOptions, val: &str); + pub fn set_easing(this: &KeyframeEffectOptions, val: &str); #[doc = "Get the `endDelay` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"] #[wasm_bindgen(method, getter = "endDelay")] pub fn get_end_delay(this: &KeyframeEffectOptions) -> Option; + #[doc = "Change the `endDelay` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"] #[wasm_bindgen(method, setter = "endDelay")] - fn set_end_delay(this: &KeyframeEffectOptions, val: f64); + pub fn set_end_delay(this: &KeyframeEffectOptions, val: f64); #[cfg(feature = "FillMode")] #[doc = "Get the `fill` field of this object."] #[doc = ""] @@ -54,22 +69,31 @@ extern "C" { #[wasm_bindgen(method, getter = "fill")] pub fn get_fill(this: &KeyframeEffectOptions) -> Option; #[cfg(feature = "FillMode")] + #[doc = "Change the `fill` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FillMode`, `KeyframeEffectOptions`*"] #[wasm_bindgen(method, setter = "fill")] - fn set_fill(this: &KeyframeEffectOptions, val: FillMode); + pub fn set_fill(this: &KeyframeEffectOptions, val: FillMode); #[doc = "Get the `iterationStart` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"] #[wasm_bindgen(method, getter = "iterationStart")] pub fn get_iteration_start(this: &KeyframeEffectOptions) -> Option; + #[doc = "Change the `iterationStart` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"] #[wasm_bindgen(method, setter = "iterationStart")] - fn set_iteration_start(this: &KeyframeEffectOptions, val: f64); + pub fn set_iteration_start(this: &KeyframeEffectOptions, val: f64); #[doc = "Get the `iterations` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"] #[wasm_bindgen(method, getter = "iterations")] pub fn get_iterations(this: &KeyframeEffectOptions) -> Option; + #[doc = "Change the `iterations` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"] #[wasm_bindgen(method, setter = "iterations")] - fn set_iterations(this: &KeyframeEffectOptions, val: f64); + pub fn set_iterations(this: &KeyframeEffectOptions, val: f64); #[cfg(feature = "CompositeOperation")] #[doc = "Get the `composite` field of this object."] #[doc = ""] @@ -77,8 +101,11 @@ extern "C" { #[wasm_bindgen(method, getter = "composite")] pub fn get_composite(this: &KeyframeEffectOptions) -> Option; #[cfg(feature = "CompositeOperation")] + #[doc = "Change the `composite` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CompositeOperation`, `KeyframeEffectOptions`*"] #[wasm_bindgen(method, setter = "composite")] - fn set_composite(this: &KeyframeEffectOptions, val: CompositeOperation); + pub fn set_composite(this: &KeyframeEffectOptions, val: CompositeOperation); #[cfg(feature = "IterationCompositeOperation")] #[doc = "Get the `iterationComposite` field of this object."] #[doc = ""] @@ -88,8 +115,11 @@ extern "C" { this: &KeyframeEffectOptions, ) -> Option; #[cfg(feature = "IterationCompositeOperation")] + #[doc = "Change the `iterationComposite` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IterationCompositeOperation`, `KeyframeEffectOptions`*"] #[wasm_bindgen(method, setter = "iterationComposite")] - fn set_iteration_composite(this: &KeyframeEffectOptions, val: IterationCompositeOperation); + pub fn set_iteration_composite(this: &KeyframeEffectOptions, val: IterationCompositeOperation); } impl KeyframeEffectOptions { #[doc = "Construct a new `KeyframeEffectOptions`."] @@ -100,76 +130,56 @@ impl KeyframeEffectOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `delay` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"] + #[deprecated = "Use `set_delay()` instead."] pub fn delay(&mut self, val: f64) -> &mut Self { self.set_delay(val); self } #[cfg(feature = "PlaybackDirection")] - #[doc = "Change the `direction` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`, `PlaybackDirection`*"] + #[deprecated = "Use `set_direction()` instead."] pub fn direction(&mut self, val: PlaybackDirection) -> &mut Self { self.set_direction(val); self } - #[doc = "Change the `duration` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"] + #[deprecated = "Use `set_duration()` instead."] pub fn duration(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_duration(val); self } - #[doc = "Change the `easing` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"] + #[deprecated = "Use `set_easing()` instead."] pub fn easing(&mut self, val: &str) -> &mut Self { self.set_easing(val); self } - #[doc = "Change the `endDelay` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"] + #[deprecated = "Use `set_end_delay()` instead."] pub fn end_delay(&mut self, val: f64) -> &mut Self { self.set_end_delay(val); self } #[cfg(feature = "FillMode")] - #[doc = "Change the `fill` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FillMode`, `KeyframeEffectOptions`*"] + #[deprecated = "Use `set_fill()` instead."] pub fn fill(&mut self, val: FillMode) -> &mut Self { self.set_fill(val); self } - #[doc = "Change the `iterationStart` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"] + #[deprecated = "Use `set_iteration_start()` instead."] pub fn iteration_start(&mut self, val: f64) -> &mut Self { self.set_iteration_start(val); self } - #[doc = "Change the `iterations` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"] + #[deprecated = "Use `set_iterations()` instead."] pub fn iterations(&mut self, val: f64) -> &mut Self { self.set_iterations(val); self } #[cfg(feature = "CompositeOperation")] - #[doc = "Change the `composite` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CompositeOperation`, `KeyframeEffectOptions`*"] + #[deprecated = "Use `set_composite()` instead."] pub fn composite(&mut self, val: CompositeOperation) -> &mut Self { self.set_composite(val); self } #[cfg(feature = "IterationCompositeOperation")] - #[doc = "Change the `iterationComposite` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `IterationCompositeOperation`, `KeyframeEffectOptions`*"] + #[deprecated = "Use `set_iteration_composite()` instead."] pub fn iteration_composite(&mut self, val: IterationCompositeOperation) -> &mut Self { self.set_iteration_composite(val); self diff --git a/crates/web-sys/src/features/gen_L10nElement.rs b/crates/web-sys/src/features/gen_L10nElement.rs index 07c6f5974565..38942a7baefa 100644 --- a/crates/web-sys/src/features/gen_L10nElement.rs +++ b/crates/web-sys/src/features/gen_L10nElement.rs @@ -15,43 +15,61 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `L10nElement`*"] #[wasm_bindgen(method, getter = "l10nArgs")] pub fn get_l10n_args(this: &L10nElement) -> Option<::js_sys::Object>; + #[doc = "Change the `l10nArgs` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `L10nElement`*"] #[wasm_bindgen(method, setter = "l10nArgs")] - fn set_l10n_args(this: &L10nElement, val: Option<&::js_sys::Object>); + pub fn set_l10n_args(this: &L10nElement, val: Option<&::js_sys::Object>); #[doc = "Get the `l10nAttrs` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `L10nElement`*"] #[wasm_bindgen(method, getter = "l10nAttrs")] pub fn get_l10n_attrs(this: &L10nElement) -> Option; + #[doc = "Change the `l10nAttrs` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `L10nElement`*"] #[wasm_bindgen(method, setter = "l10nAttrs")] - fn set_l10n_attrs(this: &L10nElement, val: Option<&str>); + pub fn set_l10n_attrs(this: &L10nElement, val: Option<&str>); #[doc = "Get the `l10nId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `L10nElement`*"] #[wasm_bindgen(method, getter = "l10nId")] pub fn get_l10n_id(this: &L10nElement) -> String; + #[doc = "Change the `l10nId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `L10nElement`*"] #[wasm_bindgen(method, setter = "l10nId")] - fn set_l10n_id(this: &L10nElement, val: &str); + pub fn set_l10n_id(this: &L10nElement, val: &str); #[doc = "Get the `localName` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `L10nElement`*"] #[wasm_bindgen(method, getter = "localName")] pub fn get_local_name(this: &L10nElement) -> String; + #[doc = "Change the `localName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `L10nElement`*"] #[wasm_bindgen(method, setter = "localName")] - fn set_local_name(this: &L10nElement, val: &str); + pub fn set_local_name(this: &L10nElement, val: &str); #[doc = "Get the `namespaceURI` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `L10nElement`*"] #[wasm_bindgen(method, getter = "namespaceURI")] pub fn get_namespace_uri(this: &L10nElement) -> String; + #[doc = "Change the `namespaceURI` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `L10nElement`*"] #[wasm_bindgen(method, setter = "namespaceURI")] - fn set_namespace_uri(this: &L10nElement, val: &str); + pub fn set_namespace_uri(this: &L10nElement, val: &str); #[doc = "Get the `type` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `L10nElement`*"] #[wasm_bindgen(method, getter = "type")] pub fn get_type(this: &L10nElement) -> Option; + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `L10nElement`*"] #[wasm_bindgen(method, setter = "type")] - fn set_type(this: &L10nElement, val: Option<&str>); + pub fn set_type(this: &L10nElement, val: Option<&str>); } impl L10nElement { #[doc = "Construct a new `L10nElement`."] @@ -65,44 +83,32 @@ impl L10nElement { ret.namespace_uri(namespace_uri); ret } - #[doc = "Change the `l10nArgs` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `L10nElement`*"] + #[deprecated = "Use `set_l10n_args()` instead."] pub fn l10n_args(&mut self, val: Option<&::js_sys::Object>) -> &mut Self { self.set_l10n_args(val); self } - #[doc = "Change the `l10nAttrs` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `L10nElement`*"] + #[deprecated = "Use `set_l10n_attrs()` instead."] pub fn l10n_attrs(&mut self, val: Option<&str>) -> &mut Self { self.set_l10n_attrs(val); self } - #[doc = "Change the `l10nId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `L10nElement`*"] + #[deprecated = "Use `set_l10n_id()` instead."] pub fn l10n_id(&mut self, val: &str) -> &mut Self { self.set_l10n_id(val); self } - #[doc = "Change the `localName` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `L10nElement`*"] + #[deprecated = "Use `set_local_name()` instead."] pub fn local_name(&mut self, val: &str) -> &mut Self { self.set_local_name(val); self } - #[doc = "Change the `namespaceURI` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `L10nElement`*"] + #[deprecated = "Use `set_namespace_uri()` instead."] pub fn namespace_uri(&mut self, val: &str) -> &mut Self { self.set_namespace_uri(val); self } - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `L10nElement`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: Option<&str>) -> &mut Self { self.set_type(val); self diff --git a/crates/web-sys/src/features/gen_L10nValue.rs b/crates/web-sys/src/features/gen_L10nValue.rs index 64b61930e274..9c09c9aa4389 100644 --- a/crates/web-sys/src/features/gen_L10nValue.rs +++ b/crates/web-sys/src/features/gen_L10nValue.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `L10nValue`*"] #[wasm_bindgen(method, getter = "attributes")] pub fn get_attributes(this: &L10nValue) -> Option<::js_sys::Array>; + #[doc = "Change the `attributes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `L10nValue`*"] #[wasm_bindgen(method, setter = "attributes")] - fn set_attributes(this: &L10nValue, val: &::wasm_bindgen::JsValue); + pub fn set_attributes(this: &L10nValue, val: &::wasm_bindgen::JsValue); #[doc = "Get the `value` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `L10nValue`*"] #[wasm_bindgen(method, getter = "value")] pub fn get_value(this: &L10nValue) -> Option; + #[doc = "Change the `value` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `L10nValue`*"] #[wasm_bindgen(method, setter = "value")] - fn set_value(this: &L10nValue, val: Option<&str>); + pub fn set_value(this: &L10nValue, val: Option<&str>); } impl L10nValue { #[doc = "Construct a new `L10nValue`."] @@ -34,16 +40,12 @@ impl L10nValue { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `attributes` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `L10nValue`*"] + #[deprecated = "Use `set_attributes()` instead."] pub fn attributes(&mut self, val: Option<&::wasm_bindgen::JsValue>) -> &mut Self { self.set_attributes(val.unwrap_or(&::wasm_bindgen::JsValue::NULL)); self } - #[doc = "Change the `value` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `L10nValue`*"] + #[deprecated = "Use `set_value()` instead."] pub fn value(&mut self, val: Option<&str>) -> &mut Self { self.set_value(val); self diff --git a/crates/web-sys/src/features/gen_LifecycleCallbacks.rs b/crates/web-sys/src/features/gen_LifecycleCallbacks.rs index c80ccdf99b5c..2628c2893945 100644 --- a/crates/web-sys/src/features/gen_LifecycleCallbacks.rs +++ b/crates/web-sys/src/features/gen_LifecycleCallbacks.rs @@ -15,29 +15,41 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `LifecycleCallbacks`*"] #[wasm_bindgen(method, getter = "adoptedCallback")] pub fn get_adopted_callback(this: &LifecycleCallbacks) -> Option<::js_sys::Function>; + #[doc = "Change the `adoptedCallback` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `LifecycleCallbacks`*"] #[wasm_bindgen(method, setter = "adoptedCallback")] - fn set_adopted_callback(this: &LifecycleCallbacks, val: &::js_sys::Function); + pub fn set_adopted_callback(this: &LifecycleCallbacks, val: &::js_sys::Function); #[doc = "Get the `attributeChangedCallback` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `LifecycleCallbacks`*"] #[wasm_bindgen(method, getter = "attributeChangedCallback")] pub fn get_attribute_changed_callback(this: &LifecycleCallbacks) -> Option<::js_sys::Function>; + #[doc = "Change the `attributeChangedCallback` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `LifecycleCallbacks`*"] #[wasm_bindgen(method, setter = "attributeChangedCallback")] - fn set_attribute_changed_callback(this: &LifecycleCallbacks, val: &::js_sys::Function); + pub fn set_attribute_changed_callback(this: &LifecycleCallbacks, val: &::js_sys::Function); #[doc = "Get the `connectedCallback` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `LifecycleCallbacks`*"] #[wasm_bindgen(method, getter = "connectedCallback")] pub fn get_connected_callback(this: &LifecycleCallbacks) -> Option<::js_sys::Function>; + #[doc = "Change the `connectedCallback` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `LifecycleCallbacks`*"] #[wasm_bindgen(method, setter = "connectedCallback")] - fn set_connected_callback(this: &LifecycleCallbacks, val: &::js_sys::Function); + pub fn set_connected_callback(this: &LifecycleCallbacks, val: &::js_sys::Function); #[doc = "Get the `disconnectedCallback` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `LifecycleCallbacks`*"] #[wasm_bindgen(method, getter = "disconnectedCallback")] pub fn get_disconnected_callback(this: &LifecycleCallbacks) -> Option<::js_sys::Function>; + #[doc = "Change the `disconnectedCallback` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `LifecycleCallbacks`*"] #[wasm_bindgen(method, setter = "disconnectedCallback")] - fn set_disconnected_callback(this: &LifecycleCallbacks, val: &::js_sys::Function); + pub fn set_disconnected_callback(this: &LifecycleCallbacks, val: &::js_sys::Function); } impl LifecycleCallbacks { #[doc = "Construct a new `LifecycleCallbacks`."] @@ -48,30 +60,22 @@ impl LifecycleCallbacks { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `adoptedCallback` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `LifecycleCallbacks`*"] + #[deprecated = "Use `set_adopted_callback()` instead."] pub fn adopted_callback(&mut self, val: &::js_sys::Function) -> &mut Self { self.set_adopted_callback(val); self } - #[doc = "Change the `attributeChangedCallback` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `LifecycleCallbacks`*"] + #[deprecated = "Use `set_attribute_changed_callback()` instead."] pub fn attribute_changed_callback(&mut self, val: &::js_sys::Function) -> &mut Self { self.set_attribute_changed_callback(val); self } - #[doc = "Change the `connectedCallback` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `LifecycleCallbacks`*"] + #[deprecated = "Use `set_connected_callback()` instead."] pub fn connected_callback(&mut self, val: &::js_sys::Function) -> &mut Self { self.set_connected_callback(val); self } - #[doc = "Change the `disconnectedCallback` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `LifecycleCallbacks`*"] + #[deprecated = "Use `set_disconnected_callback()` instead."] pub fn disconnected_callback(&mut self, val: &::js_sys::Function) -> &mut Self { self.set_disconnected_callback(val); self diff --git a/crates/web-sys/src/features/gen_LocaleInfo.rs b/crates/web-sys/src/features/gen_LocaleInfo.rs index 0aac187aae2b..b7c86104dd56 100644 --- a/crates/web-sys/src/features/gen_LocaleInfo.rs +++ b/crates/web-sys/src/features/gen_LocaleInfo.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `LocaleInfo`*"] #[wasm_bindgen(method, getter = "direction")] pub fn get_direction(this: &LocaleInfo) -> Option; + #[doc = "Change the `direction` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `LocaleInfo`*"] #[wasm_bindgen(method, setter = "direction")] - fn set_direction(this: &LocaleInfo, val: &str); + pub fn set_direction(this: &LocaleInfo, val: &str); #[doc = "Get the `locale` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `LocaleInfo`*"] #[wasm_bindgen(method, getter = "locale")] pub fn get_locale(this: &LocaleInfo) -> Option; + #[doc = "Change the `locale` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `LocaleInfo`*"] #[wasm_bindgen(method, setter = "locale")] - fn set_locale(this: &LocaleInfo, val: &str); + pub fn set_locale(this: &LocaleInfo, val: &str); } impl LocaleInfo { #[doc = "Construct a new `LocaleInfo`."] @@ -34,16 +40,12 @@ impl LocaleInfo { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `direction` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `LocaleInfo`*"] + #[deprecated = "Use `set_direction()` instead."] pub fn direction(&mut self, val: &str) -> &mut Self { self.set_direction(val); self } - #[doc = "Change the `locale` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `LocaleInfo`*"] + #[deprecated = "Use `set_locale()` instead."] pub fn locale(&mut self, val: &str) -> &mut Self { self.set_locale(val); self diff --git a/crates/web-sys/src/features/gen_LockInfo.rs b/crates/web-sys/src/features/gen_LockInfo.rs index 477f288f5716..aa37143fa48d 100644 --- a/crates/web-sys/src/features/gen_LockInfo.rs +++ b/crates/web-sys/src/features/gen_LockInfo.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "clientId")] pub fn get_client_id(this: &LockInfo) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `clientId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `LockInfo`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "clientId")] - fn set_client_id(this: &LockInfo, val: &str); + pub fn set_client_id(this: &LockInfo, val: &str); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "LockMode")] #[doc = "Get the `mode` field of this object."] @@ -35,9 +42,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "mode")] pub fn get_mode(this: &LockInfo) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "LockMode")] + #[doc = "Change the `mode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `LockInfo`, `LockMode`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "mode")] - fn set_mode(this: &LockInfo, val: LockMode); + pub fn set_mode(this: &LockInfo, val: LockMode); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `name` field of this object."] #[doc = ""] @@ -47,8 +61,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "name")] pub fn get_name(this: &LockInfo) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `LockInfo`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "name")] - fn set_name(this: &LockInfo, val: &str); + pub fn set_name(this: &LockInfo, val: &str); } #[cfg(web_sys_unstable_apis)] impl LockInfo { @@ -64,35 +85,20 @@ impl LockInfo { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `clientId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `LockInfo`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_client_id()` instead."] pub fn client_id(&mut self, val: &str) -> &mut Self { self.set_client_id(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "LockMode")] - #[doc = "Change the `mode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `LockInfo`, `LockMode`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_mode()` instead."] pub fn mode(&mut self, val: LockMode) -> &mut Self { self.set_mode(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `LockInfo`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { self.set_name(val); self diff --git a/crates/web-sys/src/features/gen_LockManagerSnapshot.rs b/crates/web-sys/src/features/gen_LockManagerSnapshot.rs index 2a6c062632db..eaf27c0dbbe8 100644 --- a/crates/web-sys/src/features/gen_LockManagerSnapshot.rs +++ b/crates/web-sys/src/features/gen_LockManagerSnapshot.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "held")] pub fn get_held(this: &LockManagerSnapshot) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `held` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `LockManagerSnapshot`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "held")] - fn set_held(this: &LockManagerSnapshot, val: &::wasm_bindgen::JsValue); + pub fn set_held(this: &LockManagerSnapshot, val: &::wasm_bindgen::JsValue); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `pending` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "pending")] pub fn get_pending(this: &LockManagerSnapshot) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `pending` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `LockManagerSnapshot`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "pending")] - fn set_pending(this: &LockManagerSnapshot, val: &::wasm_bindgen::JsValue); + pub fn set_pending(this: &LockManagerSnapshot, val: &::wasm_bindgen::JsValue); } #[cfg(web_sys_unstable_apis)] impl LockManagerSnapshot { @@ -51,23 +65,13 @@ impl LockManagerSnapshot { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `held` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `LockManagerSnapshot`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_held()` instead."] pub fn held(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_held(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `pending` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `LockManagerSnapshot`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_pending()` instead."] pub fn pending(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_pending(val); self diff --git a/crates/web-sys/src/features/gen_LockOptions.rs b/crates/web-sys/src/features/gen_LockOptions.rs index 26ddbb168d0e..3f023869c942 100644 --- a/crates/web-sys/src/features/gen_LockOptions.rs +++ b/crates/web-sys/src/features/gen_LockOptions.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "ifAvailable")] pub fn get_if_available(this: &LockOptions) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `ifAvailable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `LockOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "ifAvailable")] - fn set_if_available(this: &LockOptions, val: bool); + pub fn set_if_available(this: &LockOptions, val: bool); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "LockMode")] #[doc = "Get the `mode` field of this object."] @@ -35,9 +42,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "mode")] pub fn get_mode(this: &LockOptions) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "LockMode")] + #[doc = "Change the `mode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `LockMode`, `LockOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "mode")] - fn set_mode(this: &LockOptions, val: LockMode); + pub fn set_mode(this: &LockOptions, val: LockMode); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "AbortSignal")] #[doc = "Get the `signal` field of this object."] @@ -48,9 +62,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "signal")] pub fn get_signal(this: &LockOptions) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "AbortSignal")] + #[doc = "Change the `signal` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `LockOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "signal")] - fn set_signal(this: &LockOptions, val: &AbortSignal); + pub fn set_signal(this: &LockOptions, val: &AbortSignal); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `steal` field of this object."] #[doc = ""] @@ -60,8 +81,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "steal")] pub fn get_steal(this: &LockOptions) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `steal` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `LockOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "steal")] - fn set_steal(this: &LockOptions, val: bool); + pub fn set_steal(this: &LockOptions, val: bool); } #[cfg(web_sys_unstable_apis)] impl LockOptions { @@ -77,47 +105,27 @@ impl LockOptions { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `ifAvailable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `LockOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_if_available()` instead."] pub fn if_available(&mut self, val: bool) -> &mut Self { self.set_if_available(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "LockMode")] - #[doc = "Change the `mode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `LockMode`, `LockOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_mode()` instead."] pub fn mode(&mut self, val: LockMode) -> &mut Self { self.set_mode(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "AbortSignal")] - #[doc = "Change the `signal` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `LockOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_signal()` instead."] pub fn signal(&mut self, val: &AbortSignal) -> &mut Self { self.set_signal(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `steal` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `LockOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_steal()` instead."] pub fn steal(&mut self, val: bool) -> &mut Self { self.set_steal(val); self diff --git a/crates/web-sys/src/features/gen_MediaConfiguration.rs b/crates/web-sys/src/features/gen_MediaConfiguration.rs index 8ac22dcb0342..57c9d39f59f4 100644 --- a/crates/web-sys/src/features/gen_MediaConfiguration.rs +++ b/crates/web-sys/src/features/gen_MediaConfiguration.rs @@ -17,8 +17,11 @@ extern "C" { #[wasm_bindgen(method, getter = "audio")] pub fn get_audio(this: &MediaConfiguration) -> Option; #[cfg(feature = "AudioConfiguration")] + #[doc = "Change the `audio` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`, `MediaConfiguration`*"] #[wasm_bindgen(method, setter = "audio")] - fn set_audio(this: &MediaConfiguration, val: &AudioConfiguration); + pub fn set_audio(this: &MediaConfiguration, val: &AudioConfiguration); #[cfg(feature = "VideoConfiguration")] #[doc = "Get the `video` field of this object."] #[doc = ""] @@ -26,8 +29,11 @@ extern "C" { #[wasm_bindgen(method, getter = "video")] pub fn get_video(this: &MediaConfiguration) -> Option; #[cfg(feature = "VideoConfiguration")] + #[doc = "Change the `video` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaConfiguration`, `VideoConfiguration`*"] #[wasm_bindgen(method, setter = "video")] - fn set_video(this: &MediaConfiguration, val: &VideoConfiguration); + pub fn set_video(this: &MediaConfiguration, val: &VideoConfiguration); } impl MediaConfiguration { #[doc = "Construct a new `MediaConfiguration`."] @@ -39,17 +45,13 @@ impl MediaConfiguration { ret } #[cfg(feature = "AudioConfiguration")] - #[doc = "Change the `audio` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`, `MediaConfiguration`*"] + #[deprecated = "Use `set_audio()` instead."] pub fn audio(&mut self, val: &AudioConfiguration) -> &mut Self { self.set_audio(val); self } #[cfg(feature = "VideoConfiguration")] - #[doc = "Change the `video` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaConfiguration`, `VideoConfiguration`*"] + #[deprecated = "Use `set_video()` instead."] pub fn video(&mut self, val: &VideoConfiguration) -> &mut Self { self.set_video(val); self diff --git a/crates/web-sys/src/features/gen_MediaDecodingConfiguration.rs b/crates/web-sys/src/features/gen_MediaDecodingConfiguration.rs index c30ecbcbcd02..297dd25ef9c2 100644 --- a/crates/web-sys/src/features/gen_MediaDecodingConfiguration.rs +++ b/crates/web-sys/src/features/gen_MediaDecodingConfiguration.rs @@ -17,8 +17,11 @@ extern "C" { #[wasm_bindgen(method, getter = "audio")] pub fn get_audio(this: &MediaDecodingConfiguration) -> Option; #[cfg(feature = "AudioConfiguration")] + #[doc = "Change the `audio` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`, `MediaDecodingConfiguration`*"] #[wasm_bindgen(method, setter = "audio")] - fn set_audio(this: &MediaDecodingConfiguration, val: &AudioConfiguration); + pub fn set_audio(this: &MediaDecodingConfiguration, val: &AudioConfiguration); #[cfg(feature = "VideoConfiguration")] #[doc = "Get the `video` field of this object."] #[doc = ""] @@ -26,8 +29,11 @@ extern "C" { #[wasm_bindgen(method, getter = "video")] pub fn get_video(this: &MediaDecodingConfiguration) -> Option; #[cfg(feature = "VideoConfiguration")] + #[doc = "Change the `video` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaDecodingConfiguration`, `VideoConfiguration`*"] #[wasm_bindgen(method, setter = "video")] - fn set_video(this: &MediaDecodingConfiguration, val: &VideoConfiguration); + pub fn set_video(this: &MediaDecodingConfiguration, val: &VideoConfiguration); #[cfg(feature = "MediaDecodingType")] #[doc = "Get the `type` field of this object."] #[doc = ""] @@ -35,8 +41,11 @@ extern "C" { #[wasm_bindgen(method, getter = "type")] pub fn get_type(this: &MediaDecodingConfiguration) -> MediaDecodingType; #[cfg(feature = "MediaDecodingType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaDecodingConfiguration`, `MediaDecodingType`*"] #[wasm_bindgen(method, setter = "type")] - fn set_type(this: &MediaDecodingConfiguration, val: MediaDecodingType); + pub fn set_type(this: &MediaDecodingConfiguration, val: MediaDecodingType); } impl MediaDecodingConfiguration { #[cfg(feature = "MediaDecodingType")] @@ -50,25 +59,19 @@ impl MediaDecodingConfiguration { ret } #[cfg(feature = "AudioConfiguration")] - #[doc = "Change the `audio` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`, `MediaDecodingConfiguration`*"] + #[deprecated = "Use `set_audio()` instead."] pub fn audio(&mut self, val: &AudioConfiguration) -> &mut Self { self.set_audio(val); self } #[cfg(feature = "VideoConfiguration")] - #[doc = "Change the `video` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaDecodingConfiguration`, `VideoConfiguration`*"] + #[deprecated = "Use `set_video()` instead."] pub fn video(&mut self, val: &VideoConfiguration) -> &mut Self { self.set_video(val); self } #[cfg(feature = "MediaDecodingType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaDecodingConfiguration`, `MediaDecodingType`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: MediaDecodingType) -> &mut Self { self.set_type(val); self diff --git a/crates/web-sys/src/features/gen_MediaElementAudioSourceOptions.rs b/crates/web-sys/src/features/gen_MediaElementAudioSourceOptions.rs index da70bcc00a0b..5e5eb4b2621b 100644 --- a/crates/web-sys/src/features/gen_MediaElementAudioSourceOptions.rs +++ b/crates/web-sys/src/features/gen_MediaElementAudioSourceOptions.rs @@ -17,8 +17,11 @@ extern "C" { #[wasm_bindgen(method, getter = "mediaElement")] pub fn get_media_element(this: &MediaElementAudioSourceOptions) -> HtmlMediaElement; #[cfg(feature = "HtmlMediaElement")] + #[doc = "Change the `mediaElement` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`, `MediaElementAudioSourceOptions`*"] #[wasm_bindgen(method, setter = "mediaElement")] - fn set_media_element(this: &MediaElementAudioSourceOptions, val: &HtmlMediaElement); + pub fn set_media_element(this: &MediaElementAudioSourceOptions, val: &HtmlMediaElement); } impl MediaElementAudioSourceOptions { #[cfg(feature = "HtmlMediaElement")] @@ -32,9 +35,7 @@ impl MediaElementAudioSourceOptions { ret } #[cfg(feature = "HtmlMediaElement")] - #[doc = "Change the `mediaElement` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`, `MediaElementAudioSourceOptions`*"] + #[deprecated = "Use `set_media_element()` instead."] pub fn media_element(&mut self, val: &HtmlMediaElement) -> &mut Self { self.set_media_element(val); self diff --git a/crates/web-sys/src/features/gen_MediaEncodingConfiguration.rs b/crates/web-sys/src/features/gen_MediaEncodingConfiguration.rs index 78e061ae2c82..1880ab1d8d3b 100644 --- a/crates/web-sys/src/features/gen_MediaEncodingConfiguration.rs +++ b/crates/web-sys/src/features/gen_MediaEncodingConfiguration.rs @@ -17,8 +17,11 @@ extern "C" { #[wasm_bindgen(method, getter = "audio")] pub fn get_audio(this: &MediaEncodingConfiguration) -> Option; #[cfg(feature = "AudioConfiguration")] + #[doc = "Change the `audio` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`, `MediaEncodingConfiguration`*"] #[wasm_bindgen(method, setter = "audio")] - fn set_audio(this: &MediaEncodingConfiguration, val: &AudioConfiguration); + pub fn set_audio(this: &MediaEncodingConfiguration, val: &AudioConfiguration); #[cfg(feature = "VideoConfiguration")] #[doc = "Get the `video` field of this object."] #[doc = ""] @@ -26,8 +29,11 @@ extern "C" { #[wasm_bindgen(method, getter = "video")] pub fn get_video(this: &MediaEncodingConfiguration) -> Option; #[cfg(feature = "VideoConfiguration")] + #[doc = "Change the `video` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaEncodingConfiguration`, `VideoConfiguration`*"] #[wasm_bindgen(method, setter = "video")] - fn set_video(this: &MediaEncodingConfiguration, val: &VideoConfiguration); + pub fn set_video(this: &MediaEncodingConfiguration, val: &VideoConfiguration); #[cfg(feature = "MediaEncodingType")] #[doc = "Get the `type` field of this object."] #[doc = ""] @@ -35,8 +41,11 @@ extern "C" { #[wasm_bindgen(method, getter = "type")] pub fn get_type(this: &MediaEncodingConfiguration) -> MediaEncodingType; #[cfg(feature = "MediaEncodingType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaEncodingConfiguration`, `MediaEncodingType`*"] #[wasm_bindgen(method, setter = "type")] - fn set_type(this: &MediaEncodingConfiguration, val: MediaEncodingType); + pub fn set_type(this: &MediaEncodingConfiguration, val: MediaEncodingType); } impl MediaEncodingConfiguration { #[cfg(feature = "MediaEncodingType")] @@ -50,25 +59,19 @@ impl MediaEncodingConfiguration { ret } #[cfg(feature = "AudioConfiguration")] - #[doc = "Change the `audio` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`, `MediaEncodingConfiguration`*"] + #[deprecated = "Use `set_audio()` instead."] pub fn audio(&mut self, val: &AudioConfiguration) -> &mut Self { self.set_audio(val); self } #[cfg(feature = "VideoConfiguration")] - #[doc = "Change the `video` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaEncodingConfiguration`, `VideoConfiguration`*"] + #[deprecated = "Use `set_video()` instead."] pub fn video(&mut self, val: &VideoConfiguration) -> &mut Self { self.set_video(val); self } #[cfg(feature = "MediaEncodingType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaEncodingConfiguration`, `MediaEncodingType`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: MediaEncodingType) -> &mut Self { self.set_type(val); self diff --git a/crates/web-sys/src/features/gen_MediaImage.rs b/crates/web-sys/src/features/gen_MediaImage.rs index 2ad7b317d5e3..151349e85ea4 100644 --- a/crates/web-sys/src/features/gen_MediaImage.rs +++ b/crates/web-sys/src/features/gen_MediaImage.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "sizes")] pub fn get_sizes(this: &MediaImage) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `sizes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaImage`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "sizes")] - fn set_sizes(this: &MediaImage, val: &str); + pub fn set_sizes(this: &MediaImage, val: &str); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `src` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "src")] pub fn get_src(this: &MediaImage) -> String; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `src` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaImage`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "src")] - fn set_src(this: &MediaImage, val: &str); + pub fn set_src(this: &MediaImage, val: &str); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `type` field of this object."] #[doc = ""] @@ -45,8 +59,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "type")] pub fn get_type(this: &MediaImage) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaImage`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "type")] - fn set_type(this: &MediaImage, val: &str); + pub fn set_type(this: &MediaImage, val: &str); } #[cfg(web_sys_unstable_apis)] impl MediaImage { @@ -63,34 +84,19 @@ impl MediaImage { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `sizes` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaImage`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_sizes()` instead."] pub fn sizes(&mut self, val: &str) -> &mut Self { self.set_sizes(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `src` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaImage`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_src()` instead."] pub fn src(&mut self, val: &str) -> &mut Self { self.set_src(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaImage`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: &str) -> &mut Self { self.set_type(val); self diff --git a/crates/web-sys/src/features/gen_MediaKeyMessageEventInit.rs b/crates/web-sys/src/features/gen_MediaKeyMessageEventInit.rs index 6d2a01cb5e02..8b64ac9ada67 100644 --- a/crates/web-sys/src/features/gen_MediaKeyMessageEventInit.rs +++ b/crates/web-sys/src/features/gen_MediaKeyMessageEventInit.rs @@ -15,29 +15,41 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `MediaKeyMessageEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &MediaKeyMessageEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeyMessageEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &MediaKeyMessageEventInit, val: bool); + pub fn set_bubbles(this: &MediaKeyMessageEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaKeyMessageEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &MediaKeyMessageEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeyMessageEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &MediaKeyMessageEventInit, val: bool); + pub fn set_cancelable(this: &MediaKeyMessageEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaKeyMessageEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &MediaKeyMessageEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeyMessageEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &MediaKeyMessageEventInit, val: bool); + pub fn set_composed(this: &MediaKeyMessageEventInit, val: bool); #[doc = "Get the `message` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaKeyMessageEventInit`*"] #[wasm_bindgen(method, getter = "message")] pub fn get_message(this: &MediaKeyMessageEventInit) -> ::js_sys::ArrayBuffer; + #[doc = "Change the `message` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeyMessageEventInit`*"] #[wasm_bindgen(method, setter = "message")] - fn set_message(this: &MediaKeyMessageEventInit, val: &::js_sys::ArrayBuffer); + pub fn set_message(this: &MediaKeyMessageEventInit, val: &::js_sys::ArrayBuffer); #[cfg(feature = "MediaKeyMessageType")] #[doc = "Get the `messageType` field of this object."] #[doc = ""] @@ -45,8 +57,11 @@ extern "C" { #[wasm_bindgen(method, getter = "messageType")] pub fn get_message_type(this: &MediaKeyMessageEventInit) -> MediaKeyMessageType; #[cfg(feature = "MediaKeyMessageType")] + #[doc = "Change the `messageType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeyMessageEventInit`, `MediaKeyMessageType`*"] #[wasm_bindgen(method, setter = "messageType")] - fn set_message_type(this: &MediaKeyMessageEventInit, val: MediaKeyMessageType); + pub fn set_message_type(this: &MediaKeyMessageEventInit, val: MediaKeyMessageType); } impl MediaKeyMessageEventInit { #[cfg(feature = "MediaKeyMessageType")] @@ -60,38 +75,28 @@ impl MediaKeyMessageEventInit { ret.message_type(message_type); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaKeyMessageEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaKeyMessageEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaKeyMessageEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } - #[doc = "Change the `message` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaKeyMessageEventInit`*"] + #[deprecated = "Use `set_message()` instead."] pub fn message(&mut self, val: &::js_sys::ArrayBuffer) -> &mut Self { self.set_message(val); self } #[cfg(feature = "MediaKeyMessageType")] - #[doc = "Change the `messageType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaKeyMessageEventInit`, `MediaKeyMessageType`*"] + #[deprecated = "Use `set_message_type()` instead."] pub fn message_type(&mut self, val: MediaKeyMessageType) -> &mut Self { self.set_message_type(val); self diff --git a/crates/web-sys/src/features/gen_MediaKeyNeededEventInit.rs b/crates/web-sys/src/features/gen_MediaKeyNeededEventInit.rs index d39b1d17f116..33419e081c38 100644 --- a/crates/web-sys/src/features/gen_MediaKeyNeededEventInit.rs +++ b/crates/web-sys/src/features/gen_MediaKeyNeededEventInit.rs @@ -15,36 +15,51 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `MediaKeyNeededEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &MediaKeyNeededEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeyNeededEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &MediaKeyNeededEventInit, val: bool); + pub fn set_bubbles(this: &MediaKeyNeededEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaKeyNeededEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &MediaKeyNeededEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeyNeededEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &MediaKeyNeededEventInit, val: bool); + pub fn set_cancelable(this: &MediaKeyNeededEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaKeyNeededEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &MediaKeyNeededEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeyNeededEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &MediaKeyNeededEventInit, val: bool); + pub fn set_composed(this: &MediaKeyNeededEventInit, val: bool); #[doc = "Get the `initData` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaKeyNeededEventInit`*"] #[wasm_bindgen(method, getter = "initData")] pub fn get_init_data(this: &MediaKeyNeededEventInit) -> Option<::js_sys::ArrayBuffer>; + #[doc = "Change the `initData` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeyNeededEventInit`*"] #[wasm_bindgen(method, setter = "initData")] - fn set_init_data(this: &MediaKeyNeededEventInit, val: Option<&::js_sys::ArrayBuffer>); + pub fn set_init_data(this: &MediaKeyNeededEventInit, val: Option<&::js_sys::ArrayBuffer>); #[doc = "Get the `initDataType` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaKeyNeededEventInit`*"] #[wasm_bindgen(method, getter = "initDataType")] pub fn get_init_data_type(this: &MediaKeyNeededEventInit) -> Option; + #[doc = "Change the `initDataType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeyNeededEventInit`*"] #[wasm_bindgen(method, setter = "initDataType")] - fn set_init_data_type(this: &MediaKeyNeededEventInit, val: &str); + pub fn set_init_data_type(this: &MediaKeyNeededEventInit, val: &str); } impl MediaKeyNeededEventInit { #[doc = "Construct a new `MediaKeyNeededEventInit`."] @@ -55,37 +70,27 @@ impl MediaKeyNeededEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaKeyNeededEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaKeyNeededEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaKeyNeededEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } - #[doc = "Change the `initData` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaKeyNeededEventInit`*"] + #[deprecated = "Use `set_init_data()` instead."] pub fn init_data(&mut self, val: Option<&::js_sys::ArrayBuffer>) -> &mut Self { self.set_init_data(val); self } - #[doc = "Change the `initDataType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaKeyNeededEventInit`*"] + #[deprecated = "Use `set_init_data_type()` instead."] pub fn init_data_type(&mut self, val: &str) -> &mut Self { self.set_init_data_type(val); self diff --git a/crates/web-sys/src/features/gen_MediaKeySystemConfiguration.rs b/crates/web-sys/src/features/gen_MediaKeySystemConfiguration.rs index 7c9cecb0d0e4..e110b3e1ec1f 100644 --- a/crates/web-sys/src/features/gen_MediaKeySystemConfiguration.rs +++ b/crates/web-sys/src/features/gen_MediaKeySystemConfiguration.rs @@ -15,8 +15,14 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`*"] #[wasm_bindgen(method, getter = "audioCapabilities")] pub fn get_audio_capabilities(this: &MediaKeySystemConfiguration) -> Option<::js_sys::Array>; + #[doc = "Change the `audioCapabilities` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`*"] #[wasm_bindgen(method, setter = "audioCapabilities")] - fn set_audio_capabilities(this: &MediaKeySystemConfiguration, val: &::wasm_bindgen::JsValue); + pub fn set_audio_capabilities( + this: &MediaKeySystemConfiguration, + val: &::wasm_bindgen::JsValue, + ); #[cfg(feature = "MediaKeysRequirement")] #[doc = "Get the `distinctiveIdentifier` field of this object."] #[doc = ""] @@ -26,22 +32,34 @@ extern "C" { this: &MediaKeySystemConfiguration, ) -> Option; #[cfg(feature = "MediaKeysRequirement")] + #[doc = "Change the `distinctiveIdentifier` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`, `MediaKeysRequirement`*"] #[wasm_bindgen(method, setter = "distinctiveIdentifier")] - fn set_distinctive_identifier(this: &MediaKeySystemConfiguration, val: MediaKeysRequirement); + pub fn set_distinctive_identifier( + this: &MediaKeySystemConfiguration, + val: MediaKeysRequirement, + ); #[doc = "Get the `initDataTypes` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`*"] #[wasm_bindgen(method, getter = "initDataTypes")] pub fn get_init_data_types(this: &MediaKeySystemConfiguration) -> Option<::js_sys::Array>; + #[doc = "Change the `initDataTypes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`*"] #[wasm_bindgen(method, setter = "initDataTypes")] - fn set_init_data_types(this: &MediaKeySystemConfiguration, val: &::wasm_bindgen::JsValue); + pub fn set_init_data_types(this: &MediaKeySystemConfiguration, val: &::wasm_bindgen::JsValue); #[doc = "Get the `label` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`*"] #[wasm_bindgen(method, getter = "label")] pub fn get_label(this: &MediaKeySystemConfiguration) -> Option; + #[doc = "Change the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`*"] #[wasm_bindgen(method, setter = "label")] - fn set_label(this: &MediaKeySystemConfiguration, val: &str); + pub fn set_label(this: &MediaKeySystemConfiguration, val: &str); #[cfg(feature = "MediaKeysRequirement")] #[doc = "Get the `persistentState` field of this object."] #[doc = ""] @@ -50,22 +68,34 @@ extern "C" { pub fn get_persistent_state(this: &MediaKeySystemConfiguration) -> Option; #[cfg(feature = "MediaKeysRequirement")] + #[doc = "Change the `persistentState` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`, `MediaKeysRequirement`*"] #[wasm_bindgen(method, setter = "persistentState")] - fn set_persistent_state(this: &MediaKeySystemConfiguration, val: MediaKeysRequirement); + pub fn set_persistent_state(this: &MediaKeySystemConfiguration, val: MediaKeysRequirement); #[doc = "Get the `sessionTypes` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`*"] #[wasm_bindgen(method, getter = "sessionTypes")] pub fn get_session_types(this: &MediaKeySystemConfiguration) -> Option<::js_sys::Array>; + #[doc = "Change the `sessionTypes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`*"] #[wasm_bindgen(method, setter = "sessionTypes")] - fn set_session_types(this: &MediaKeySystemConfiguration, val: &::wasm_bindgen::JsValue); + pub fn set_session_types(this: &MediaKeySystemConfiguration, val: &::wasm_bindgen::JsValue); #[doc = "Get the `videoCapabilities` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`*"] #[wasm_bindgen(method, getter = "videoCapabilities")] pub fn get_video_capabilities(this: &MediaKeySystemConfiguration) -> Option<::js_sys::Array>; + #[doc = "Change the `videoCapabilities` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`*"] #[wasm_bindgen(method, setter = "videoCapabilities")] - fn set_video_capabilities(this: &MediaKeySystemConfiguration, val: &::wasm_bindgen::JsValue); + pub fn set_video_capabilities( + this: &MediaKeySystemConfiguration, + val: &::wasm_bindgen::JsValue, + ); } impl MediaKeySystemConfiguration { #[doc = "Construct a new `MediaKeySystemConfiguration`."] @@ -76,53 +106,39 @@ impl MediaKeySystemConfiguration { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `audioCapabilities` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`*"] + #[deprecated = "Use `set_audio_capabilities()` instead."] pub fn audio_capabilities(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_audio_capabilities(val); self } #[cfg(feature = "MediaKeysRequirement")] - #[doc = "Change the `distinctiveIdentifier` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`, `MediaKeysRequirement`*"] + #[deprecated = "Use `set_distinctive_identifier()` instead."] pub fn distinctive_identifier(&mut self, val: MediaKeysRequirement) -> &mut Self { self.set_distinctive_identifier(val); self } - #[doc = "Change the `initDataTypes` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`*"] + #[deprecated = "Use `set_init_data_types()` instead."] pub fn init_data_types(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_init_data_types(val); self } - #[doc = "Change the `label` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`*"] + #[deprecated = "Use `set_label()` instead."] pub fn label(&mut self, val: &str) -> &mut Self { self.set_label(val); self } #[cfg(feature = "MediaKeysRequirement")] - #[doc = "Change the `persistentState` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`, `MediaKeysRequirement`*"] + #[deprecated = "Use `set_persistent_state()` instead."] pub fn persistent_state(&mut self, val: MediaKeysRequirement) -> &mut Self { self.set_persistent_state(val); self } - #[doc = "Change the `sessionTypes` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`*"] + #[deprecated = "Use `set_session_types()` instead."] pub fn session_types(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_session_types(val); self } - #[doc = "Change the `videoCapabilities` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`*"] + #[deprecated = "Use `set_video_capabilities()` instead."] pub fn video_capabilities(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_video_capabilities(val); self diff --git a/crates/web-sys/src/features/gen_MediaKeySystemMediaCapability.rs b/crates/web-sys/src/features/gen_MediaKeySystemMediaCapability.rs index 2c2ffc420e56..7740ba74e30e 100644 --- a/crates/web-sys/src/features/gen_MediaKeySystemMediaCapability.rs +++ b/crates/web-sys/src/features/gen_MediaKeySystemMediaCapability.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemMediaCapability`*"] #[wasm_bindgen(method, getter = "contentType")] pub fn get_content_type(this: &MediaKeySystemMediaCapability) -> Option; + #[doc = "Change the `contentType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemMediaCapability`*"] #[wasm_bindgen(method, setter = "contentType")] - fn set_content_type(this: &MediaKeySystemMediaCapability, val: &str); + pub fn set_content_type(this: &MediaKeySystemMediaCapability, val: &str); #[doc = "Get the `robustness` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemMediaCapability`*"] #[wasm_bindgen(method, getter = "robustness")] pub fn get_robustness(this: &MediaKeySystemMediaCapability) -> Option; + #[doc = "Change the `robustness` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemMediaCapability`*"] #[wasm_bindgen(method, setter = "robustness")] - fn set_robustness(this: &MediaKeySystemMediaCapability, val: &str); + pub fn set_robustness(this: &MediaKeySystemMediaCapability, val: &str); } impl MediaKeySystemMediaCapability { #[doc = "Construct a new `MediaKeySystemMediaCapability`."] @@ -34,16 +40,12 @@ impl MediaKeySystemMediaCapability { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `contentType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemMediaCapability`*"] + #[deprecated = "Use `set_content_type()` instead."] pub fn content_type(&mut self, val: &str) -> &mut Self { self.set_content_type(val); self } - #[doc = "Change the `robustness` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemMediaCapability`*"] + #[deprecated = "Use `set_robustness()` instead."] pub fn robustness(&mut self, val: &str) -> &mut Self { self.set_robustness(val); self diff --git a/crates/web-sys/src/features/gen_MediaKeysPolicy.rs b/crates/web-sys/src/features/gen_MediaKeysPolicy.rs index 50837746c758..26f5b1842002 100644 --- a/crates/web-sys/src/features/gen_MediaKeysPolicy.rs +++ b/crates/web-sys/src/features/gen_MediaKeysPolicy.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `MediaKeysPolicy`*"] #[wasm_bindgen(method, getter = "minHdcpVersion")] pub fn get_min_hdcp_version(this: &MediaKeysPolicy) -> Option; + #[doc = "Change the `minHdcpVersion` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeysPolicy`*"] #[wasm_bindgen(method, setter = "minHdcpVersion")] - fn set_min_hdcp_version(this: &MediaKeysPolicy, val: &str); + pub fn set_min_hdcp_version(this: &MediaKeysPolicy, val: &str); } impl MediaKeysPolicy { #[doc = "Construct a new `MediaKeysPolicy`."] @@ -27,9 +30,7 @@ impl MediaKeysPolicy { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `minHdcpVersion` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaKeysPolicy`*"] + #[deprecated = "Use `set_min_hdcp_version()` instead."] pub fn min_hdcp_version(&mut self, val: &str) -> &mut Self { self.set_min_hdcp_version(val); self diff --git a/crates/web-sys/src/features/gen_MediaMetadataInit.rs b/crates/web-sys/src/features/gen_MediaMetadataInit.rs index ec43cef8623e..f2deaff2ec31 100644 --- a/crates/web-sys/src/features/gen_MediaMetadataInit.rs +++ b/crates/web-sys/src/features/gen_MediaMetadataInit.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "album")] pub fn get_album(this: &MediaMetadataInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `album` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaMetadataInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "album")] - fn set_album(this: &MediaMetadataInit, val: &str); + pub fn set_album(this: &MediaMetadataInit, val: &str); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `artist` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "artist")] pub fn get_artist(this: &MediaMetadataInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `artist` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaMetadataInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "artist")] - fn set_artist(this: &MediaMetadataInit, val: &str); + pub fn set_artist(this: &MediaMetadataInit, val: &str); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `artwork` field of this object."] #[doc = ""] @@ -45,8 +59,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "artwork")] pub fn get_artwork(this: &MediaMetadataInit) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `artwork` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaMetadataInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "artwork")] - fn set_artwork(this: &MediaMetadataInit, val: &::wasm_bindgen::JsValue); + pub fn set_artwork(this: &MediaMetadataInit, val: &::wasm_bindgen::JsValue); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `title` field of this object."] #[doc = ""] @@ -56,8 +77,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "title")] pub fn get_title(this: &MediaMetadataInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `title` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaMetadataInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "title")] - fn set_title(this: &MediaMetadataInit, val: &str); + pub fn set_title(this: &MediaMetadataInit, val: &str); } #[cfg(web_sys_unstable_apis)] impl MediaMetadataInit { @@ -73,45 +101,25 @@ impl MediaMetadataInit { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `album` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaMetadataInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_album()` instead."] pub fn album(&mut self, val: &str) -> &mut Self { self.set_album(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `artist` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaMetadataInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_artist()` instead."] pub fn artist(&mut self, val: &str) -> &mut Self { self.set_artist(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `artwork` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaMetadataInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_artwork()` instead."] pub fn artwork(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_artwork(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `title` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaMetadataInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_title()` instead."] pub fn title(&mut self, val: &str) -> &mut Self { self.set_title(val); self diff --git a/crates/web-sys/src/features/gen_MediaPositionState.rs b/crates/web-sys/src/features/gen_MediaPositionState.rs index 93b8f90af2ad..b381f380ad40 100644 --- a/crates/web-sys/src/features/gen_MediaPositionState.rs +++ b/crates/web-sys/src/features/gen_MediaPositionState.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "duration")] pub fn get_duration(this: &MediaPositionState) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `duration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaPositionState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "duration")] - fn set_duration(this: &MediaPositionState, val: f64); + pub fn set_duration(this: &MediaPositionState, val: f64); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `playbackRate` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "playbackRate")] pub fn get_playback_rate(this: &MediaPositionState) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `playbackRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaPositionState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "playbackRate")] - fn set_playback_rate(this: &MediaPositionState, val: f64); + pub fn set_playback_rate(this: &MediaPositionState, val: f64); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `position` field of this object."] #[doc = ""] @@ -45,8 +59,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "position")] pub fn get_position(this: &MediaPositionState) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `position` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaPositionState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "position")] - fn set_position(this: &MediaPositionState, val: f64); + pub fn set_position(this: &MediaPositionState, val: f64); } #[cfg(web_sys_unstable_apis)] impl MediaPositionState { @@ -62,34 +83,19 @@ impl MediaPositionState { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `duration` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaPositionState`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_duration()` instead."] pub fn duration(&mut self, val: f64) -> &mut Self { self.set_duration(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `playbackRate` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaPositionState`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_playback_rate()` instead."] pub fn playback_rate(&mut self, val: f64) -> &mut Self { self.set_playback_rate(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `position` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaPositionState`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_position()` instead."] pub fn position(&mut self, val: f64) -> &mut Self { self.set_position(val); self diff --git a/crates/web-sys/src/features/gen_MediaQueryListEventInit.rs b/crates/web-sys/src/features/gen_MediaQueryListEventInit.rs index 2f82b2da24aa..b656e13b75a6 100644 --- a/crates/web-sys/src/features/gen_MediaQueryListEventInit.rs +++ b/crates/web-sys/src/features/gen_MediaQueryListEventInit.rs @@ -15,36 +15,51 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `MediaQueryListEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &MediaQueryListEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaQueryListEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &MediaQueryListEventInit, val: bool); + pub fn set_bubbles(this: &MediaQueryListEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaQueryListEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &MediaQueryListEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaQueryListEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &MediaQueryListEventInit, val: bool); + pub fn set_cancelable(this: &MediaQueryListEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaQueryListEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &MediaQueryListEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaQueryListEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &MediaQueryListEventInit, val: bool); + pub fn set_composed(this: &MediaQueryListEventInit, val: bool); #[doc = "Get the `matches` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaQueryListEventInit`*"] #[wasm_bindgen(method, getter = "matches")] pub fn get_matches(this: &MediaQueryListEventInit) -> Option; + #[doc = "Change the `matches` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaQueryListEventInit`*"] #[wasm_bindgen(method, setter = "matches")] - fn set_matches(this: &MediaQueryListEventInit, val: bool); + pub fn set_matches(this: &MediaQueryListEventInit, val: bool); #[doc = "Get the `media` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaQueryListEventInit`*"] #[wasm_bindgen(method, getter = "media")] pub fn get_media(this: &MediaQueryListEventInit) -> Option; + #[doc = "Change the `media` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaQueryListEventInit`*"] #[wasm_bindgen(method, setter = "media")] - fn set_media(this: &MediaQueryListEventInit, val: &str); + pub fn set_media(this: &MediaQueryListEventInit, val: &str); } impl MediaQueryListEventInit { #[doc = "Construct a new `MediaQueryListEventInit`."] @@ -55,37 +70,27 @@ impl MediaQueryListEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaQueryListEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaQueryListEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaQueryListEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } - #[doc = "Change the `matches` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaQueryListEventInit`*"] + #[deprecated = "Use `set_matches()` instead."] pub fn matches(&mut self, val: bool) -> &mut Self { self.set_matches(val); self } - #[doc = "Change the `media` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaQueryListEventInit`*"] + #[deprecated = "Use `set_media()` instead."] pub fn media(&mut self, val: &str) -> &mut Self { self.set_media(val); self diff --git a/crates/web-sys/src/features/gen_MediaRecorderErrorEventInit.rs b/crates/web-sys/src/features/gen_MediaRecorderErrorEventInit.rs index 2d05f1b8c748..0c8538522675 100644 --- a/crates/web-sys/src/features/gen_MediaRecorderErrorEventInit.rs +++ b/crates/web-sys/src/features/gen_MediaRecorderErrorEventInit.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `MediaRecorderErrorEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &MediaRecorderErrorEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaRecorderErrorEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &MediaRecorderErrorEventInit, val: bool); + pub fn set_bubbles(this: &MediaRecorderErrorEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaRecorderErrorEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &MediaRecorderErrorEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaRecorderErrorEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &MediaRecorderErrorEventInit, val: bool); + pub fn set_cancelable(this: &MediaRecorderErrorEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaRecorderErrorEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &MediaRecorderErrorEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaRecorderErrorEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &MediaRecorderErrorEventInit, val: bool); + pub fn set_composed(this: &MediaRecorderErrorEventInit, val: bool); #[cfg(feature = "DomException")] #[doc = "Get the `error` field of this object."] #[doc = ""] @@ -38,8 +47,11 @@ extern "C" { #[wasm_bindgen(method, getter = "error")] pub fn get_error(this: &MediaRecorderErrorEventInit) -> DomException; #[cfg(feature = "DomException")] + #[doc = "Change the `error` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomException`, `MediaRecorderErrorEventInit`*"] #[wasm_bindgen(method, setter = "error")] - fn set_error(this: &MediaRecorderErrorEventInit, val: &DomException); + pub fn set_error(this: &MediaRecorderErrorEventInit, val: &DomException); } impl MediaRecorderErrorEventInit { #[cfg(feature = "DomException")] @@ -52,31 +64,23 @@ impl MediaRecorderErrorEventInit { ret.error(error); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaRecorderErrorEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaRecorderErrorEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaRecorderErrorEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } #[cfg(feature = "DomException")] - #[doc = "Change the `error` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomException`, `MediaRecorderErrorEventInit`*"] + #[deprecated = "Use `set_error()` instead."] pub fn error(&mut self, val: &DomException) -> &mut Self { self.set_error(val); self diff --git a/crates/web-sys/src/features/gen_MediaRecorderOptions.rs b/crates/web-sys/src/features/gen_MediaRecorderOptions.rs index de2e8072e3b8..2cadbaa05ac0 100644 --- a/crates/web-sys/src/features/gen_MediaRecorderOptions.rs +++ b/crates/web-sys/src/features/gen_MediaRecorderOptions.rs @@ -15,29 +15,41 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `MediaRecorderOptions`*"] #[wasm_bindgen(method, getter = "audioBitsPerSecond")] pub fn get_audio_bits_per_second(this: &MediaRecorderOptions) -> Option; + #[doc = "Change the `audioBitsPerSecond` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaRecorderOptions`*"] #[wasm_bindgen(method, setter = "audioBitsPerSecond")] - fn set_audio_bits_per_second(this: &MediaRecorderOptions, val: u32); + pub fn set_audio_bits_per_second(this: &MediaRecorderOptions, val: u32); #[doc = "Get the `bitsPerSecond` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaRecorderOptions`*"] #[wasm_bindgen(method, getter = "bitsPerSecond")] pub fn get_bits_per_second(this: &MediaRecorderOptions) -> Option; + #[doc = "Change the `bitsPerSecond` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaRecorderOptions`*"] #[wasm_bindgen(method, setter = "bitsPerSecond")] - fn set_bits_per_second(this: &MediaRecorderOptions, val: u32); + pub fn set_bits_per_second(this: &MediaRecorderOptions, val: u32); #[doc = "Get the `mimeType` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaRecorderOptions`*"] #[wasm_bindgen(method, getter = "mimeType")] pub fn get_mime_type(this: &MediaRecorderOptions) -> Option; + #[doc = "Change the `mimeType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaRecorderOptions`*"] #[wasm_bindgen(method, setter = "mimeType")] - fn set_mime_type(this: &MediaRecorderOptions, val: &str); + pub fn set_mime_type(this: &MediaRecorderOptions, val: &str); #[doc = "Get the `videoBitsPerSecond` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaRecorderOptions`*"] #[wasm_bindgen(method, getter = "videoBitsPerSecond")] pub fn get_video_bits_per_second(this: &MediaRecorderOptions) -> Option; + #[doc = "Change the `videoBitsPerSecond` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaRecorderOptions`*"] #[wasm_bindgen(method, setter = "videoBitsPerSecond")] - fn set_video_bits_per_second(this: &MediaRecorderOptions, val: u32); + pub fn set_video_bits_per_second(this: &MediaRecorderOptions, val: u32); } impl MediaRecorderOptions { #[doc = "Construct a new `MediaRecorderOptions`."] @@ -48,30 +60,22 @@ impl MediaRecorderOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `audioBitsPerSecond` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaRecorderOptions`*"] + #[deprecated = "Use `set_audio_bits_per_second()` instead."] pub fn audio_bits_per_second(&mut self, val: u32) -> &mut Self { self.set_audio_bits_per_second(val); self } - #[doc = "Change the `bitsPerSecond` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaRecorderOptions`*"] + #[deprecated = "Use `set_bits_per_second()` instead."] pub fn bits_per_second(&mut self, val: u32) -> &mut Self { self.set_bits_per_second(val); self } - #[doc = "Change the `mimeType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaRecorderOptions`*"] + #[deprecated = "Use `set_mime_type()` instead."] pub fn mime_type(&mut self, val: &str) -> &mut Self { self.set_mime_type(val); self } - #[doc = "Change the `videoBitsPerSecond` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaRecorderOptions`*"] + #[deprecated = "Use `set_video_bits_per_second()` instead."] pub fn video_bits_per_second(&mut self, val: u32) -> &mut Self { self.set_video_bits_per_second(val); self diff --git a/crates/web-sys/src/features/gen_MediaSessionActionDetails.rs b/crates/web-sys/src/features/gen_MediaSessionActionDetails.rs index 3ef878ba4486..69cc21f60872 100644 --- a/crates/web-sys/src/features/gen_MediaSessionActionDetails.rs +++ b/crates/web-sys/src/features/gen_MediaSessionActionDetails.rs @@ -24,9 +24,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "action")] pub fn get_action(this: &MediaSessionActionDetails) -> MediaSessionAction; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "MediaSessionAction")] + #[doc = "Change the `action` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaSessionAction`, `MediaSessionActionDetails`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "action")] - fn set_action(this: &MediaSessionActionDetails, val: MediaSessionAction); + pub fn set_action(this: &MediaSessionActionDetails, val: MediaSessionAction); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `fastSeek` field of this object."] #[doc = ""] @@ -36,8 +43,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "fastSeek")] pub fn get_fast_seek(this: &MediaSessionActionDetails) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `fastSeek` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaSessionActionDetails`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "fastSeek")] - fn set_fast_seek(this: &MediaSessionActionDetails, val: Option); + pub fn set_fast_seek(this: &MediaSessionActionDetails, val: Option); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `seekOffset` field of this object."] #[doc = ""] @@ -47,8 +61,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "seekOffset")] pub fn get_seek_offset(this: &MediaSessionActionDetails) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `seekOffset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaSessionActionDetails`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "seekOffset")] - fn set_seek_offset(this: &MediaSessionActionDetails, val: Option); + pub fn set_seek_offset(this: &MediaSessionActionDetails, val: Option); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `seekTime` field of this object."] #[doc = ""] @@ -58,8 +79,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "seekTime")] pub fn get_seek_time(this: &MediaSessionActionDetails) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `seekTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaSessionActionDetails`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "seekTime")] - fn set_seek_time(this: &MediaSessionActionDetails, val: Option); + pub fn set_seek_time(this: &MediaSessionActionDetails, val: Option); } #[cfg(web_sys_unstable_apis)] impl MediaSessionActionDetails { @@ -78,45 +106,25 @@ impl MediaSessionActionDetails { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "MediaSessionAction")] - #[doc = "Change the `action` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaSessionAction`, `MediaSessionActionDetails`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_action()` instead."] pub fn action(&mut self, val: MediaSessionAction) -> &mut Self { self.set_action(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `fastSeek` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaSessionActionDetails`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_fast_seek()` instead."] pub fn fast_seek(&mut self, val: Option) -> &mut Self { self.set_fast_seek(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `seekOffset` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaSessionActionDetails`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_seek_offset()` instead."] pub fn seek_offset(&mut self, val: Option) -> &mut Self { self.set_seek_offset(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `seekTime` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaSessionActionDetails`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_seek_time()` instead."] pub fn seek_time(&mut self, val: Option) -> &mut Self { self.set_seek_time(val); self diff --git a/crates/web-sys/src/features/gen_MediaStreamAudioSourceOptions.rs b/crates/web-sys/src/features/gen_MediaStreamAudioSourceOptions.rs index 7ee97f2867e3..891dbe1e3550 100644 --- a/crates/web-sys/src/features/gen_MediaStreamAudioSourceOptions.rs +++ b/crates/web-sys/src/features/gen_MediaStreamAudioSourceOptions.rs @@ -17,8 +17,11 @@ extern "C" { #[wasm_bindgen(method, getter = "mediaStream")] pub fn get_media_stream(this: &MediaStreamAudioSourceOptions) -> MediaStream; #[cfg(feature = "MediaStream")] + #[doc = "Change the `mediaStream` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStream`, `MediaStreamAudioSourceOptions`*"] #[wasm_bindgen(method, setter = "mediaStream")] - fn set_media_stream(this: &MediaStreamAudioSourceOptions, val: &MediaStream); + pub fn set_media_stream(this: &MediaStreamAudioSourceOptions, val: &MediaStream); } impl MediaStreamAudioSourceOptions { #[cfg(feature = "MediaStream")] @@ -32,9 +35,7 @@ impl MediaStreamAudioSourceOptions { ret } #[cfg(feature = "MediaStream")] - #[doc = "Change the `mediaStream` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaStream`, `MediaStreamAudioSourceOptions`*"] + #[deprecated = "Use `set_media_stream()` instead."] pub fn media_stream(&mut self, val: &MediaStream) -> &mut Self { self.set_media_stream(val); self diff --git a/crates/web-sys/src/features/gen_MediaStreamConstraints.rs b/crates/web-sys/src/features/gen_MediaStreamConstraints.rs index 166871ba4133..0a666f793b5b 100644 --- a/crates/web-sys/src/features/gen_MediaStreamConstraints.rs +++ b/crates/web-sys/src/features/gen_MediaStreamConstraints.rs @@ -15,36 +15,51 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `MediaStreamConstraints`*"] #[wasm_bindgen(method, getter = "audio")] pub fn get_audio(this: &MediaStreamConstraints) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `audio` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamConstraints`*"] #[wasm_bindgen(method, setter = "audio")] - fn set_audio(this: &MediaStreamConstraints, val: &::wasm_bindgen::JsValue); + pub fn set_audio(this: &MediaStreamConstraints, val: &::wasm_bindgen::JsValue); #[doc = "Get the `fake` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaStreamConstraints`*"] #[wasm_bindgen(method, getter = "fake")] pub fn get_fake(this: &MediaStreamConstraints) -> Option; + #[doc = "Change the `fake` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamConstraints`*"] #[wasm_bindgen(method, setter = "fake")] - fn set_fake(this: &MediaStreamConstraints, val: bool); + pub fn set_fake(this: &MediaStreamConstraints, val: bool); #[doc = "Get the `peerIdentity` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaStreamConstraints`*"] #[wasm_bindgen(method, getter = "peerIdentity")] pub fn get_peer_identity(this: &MediaStreamConstraints) -> Option; + #[doc = "Change the `peerIdentity` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamConstraints`*"] #[wasm_bindgen(method, setter = "peerIdentity")] - fn set_peer_identity(this: &MediaStreamConstraints, val: Option<&str>); + pub fn set_peer_identity(this: &MediaStreamConstraints, val: Option<&str>); #[doc = "Get the `picture` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaStreamConstraints`*"] #[wasm_bindgen(method, getter = "picture")] pub fn get_picture(this: &MediaStreamConstraints) -> Option; + #[doc = "Change the `picture` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamConstraints`*"] #[wasm_bindgen(method, setter = "picture")] - fn set_picture(this: &MediaStreamConstraints, val: bool); + pub fn set_picture(this: &MediaStreamConstraints, val: bool); #[doc = "Get the `video` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaStreamConstraints`*"] #[wasm_bindgen(method, getter = "video")] pub fn get_video(this: &MediaStreamConstraints) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `video` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamConstraints`*"] #[wasm_bindgen(method, setter = "video")] - fn set_video(this: &MediaStreamConstraints, val: &::wasm_bindgen::JsValue); + pub fn set_video(this: &MediaStreamConstraints, val: &::wasm_bindgen::JsValue); } impl MediaStreamConstraints { #[doc = "Construct a new `MediaStreamConstraints`."] @@ -55,37 +70,27 @@ impl MediaStreamConstraints { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `audio` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaStreamConstraints`*"] + #[deprecated = "Use `set_audio()` instead."] pub fn audio(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_audio(val); self } - #[doc = "Change the `fake` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaStreamConstraints`*"] + #[deprecated = "Use `set_fake()` instead."] pub fn fake(&mut self, val: bool) -> &mut Self { self.set_fake(val); self } - #[doc = "Change the `peerIdentity` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaStreamConstraints`*"] + #[deprecated = "Use `set_peer_identity()` instead."] pub fn peer_identity(&mut self, val: Option<&str>) -> &mut Self { self.set_peer_identity(val); self } - #[doc = "Change the `picture` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaStreamConstraints`*"] + #[deprecated = "Use `set_picture()` instead."] pub fn picture(&mut self, val: bool) -> &mut Self { self.set_picture(val); self } - #[doc = "Change the `video` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaStreamConstraints`*"] + #[deprecated = "Use `set_video()` instead."] pub fn video(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_video(val); self diff --git a/crates/web-sys/src/features/gen_MediaStreamEventInit.rs b/crates/web-sys/src/features/gen_MediaStreamEventInit.rs index d0d4196732af..0bc44a3cd3d3 100644 --- a/crates/web-sys/src/features/gen_MediaStreamEventInit.rs +++ b/crates/web-sys/src/features/gen_MediaStreamEventInit.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `MediaStreamEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &MediaStreamEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &MediaStreamEventInit, val: bool); + pub fn set_bubbles(this: &MediaStreamEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaStreamEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &MediaStreamEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &MediaStreamEventInit, val: bool); + pub fn set_cancelable(this: &MediaStreamEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaStreamEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &MediaStreamEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &MediaStreamEventInit, val: bool); + pub fn set_composed(this: &MediaStreamEventInit, val: bool); #[cfg(feature = "MediaStream")] #[doc = "Get the `stream` field of this object."] #[doc = ""] @@ -38,8 +47,11 @@ extern "C" { #[wasm_bindgen(method, getter = "stream")] pub fn get_stream(this: &MediaStreamEventInit) -> Option; #[cfg(feature = "MediaStream")] + #[doc = "Change the `stream` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStream`, `MediaStreamEventInit`*"] #[wasm_bindgen(method, setter = "stream")] - fn set_stream(this: &MediaStreamEventInit, val: Option<&MediaStream>); + pub fn set_stream(this: &MediaStreamEventInit, val: Option<&MediaStream>); } impl MediaStreamEventInit { #[doc = "Construct a new `MediaStreamEventInit`."] @@ -50,31 +62,23 @@ impl MediaStreamEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaStreamEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaStreamEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaStreamEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } #[cfg(feature = "MediaStream")] - #[doc = "Change the `stream` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaStream`, `MediaStreamEventInit`*"] + #[deprecated = "Use `set_stream()` instead."] pub fn stream(&mut self, val: Option<&MediaStream>) -> &mut Self { self.set_stream(val); self diff --git a/crates/web-sys/src/features/gen_MediaStreamTrackEventInit.rs b/crates/web-sys/src/features/gen_MediaStreamTrackEventInit.rs index 7697f96fb280..734dfeede6c2 100644 --- a/crates/web-sys/src/features/gen_MediaStreamTrackEventInit.rs +++ b/crates/web-sys/src/features/gen_MediaStreamTrackEventInit.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrackEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &MediaStreamTrackEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrackEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &MediaStreamTrackEventInit, val: bool); + pub fn set_bubbles(this: &MediaStreamTrackEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrackEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &MediaStreamTrackEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrackEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &MediaStreamTrackEventInit, val: bool); + pub fn set_cancelable(this: &MediaStreamTrackEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrackEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &MediaStreamTrackEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrackEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &MediaStreamTrackEventInit, val: bool); + pub fn set_composed(this: &MediaStreamTrackEventInit, val: bool); #[cfg(feature = "MediaStreamTrack")] #[doc = "Get the `track` field of this object."] #[doc = ""] @@ -38,8 +47,11 @@ extern "C" { #[wasm_bindgen(method, getter = "track")] pub fn get_track(this: &MediaStreamTrackEventInit) -> MediaStreamTrack; #[cfg(feature = "MediaStreamTrack")] + #[doc = "Change the `track` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrack`, `MediaStreamTrackEventInit`*"] #[wasm_bindgen(method, setter = "track")] - fn set_track(this: &MediaStreamTrackEventInit, val: &MediaStreamTrack); + pub fn set_track(this: &MediaStreamTrackEventInit, val: &MediaStreamTrack); } impl MediaStreamTrackEventInit { #[cfg(feature = "MediaStreamTrack")] @@ -52,31 +64,23 @@ impl MediaStreamTrackEventInit { ret.track(track); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrackEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrackEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrackEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } #[cfg(feature = "MediaStreamTrack")] - #[doc = "Change the `track` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrack`, `MediaStreamTrackEventInit`*"] + #[deprecated = "Use `set_track()` instead."] pub fn track(&mut self, val: &MediaStreamTrack) -> &mut Self { self.set_track(val); self diff --git a/crates/web-sys/src/features/gen_MediaStreamTrackGeneratorInit.rs b/crates/web-sys/src/features/gen_MediaStreamTrackGeneratorInit.rs index 54906122b027..67d0fcd04316 100644 --- a/crates/web-sys/src/features/gen_MediaStreamTrackGeneratorInit.rs +++ b/crates/web-sys/src/features/gen_MediaStreamTrackGeneratorInit.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "kind")] pub fn get_kind(this: &MediaStreamTrackGeneratorInit) -> String; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `kind` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrackGeneratorInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "kind")] - fn set_kind(this: &MediaStreamTrackGeneratorInit, val: &str); + pub fn set_kind(this: &MediaStreamTrackGeneratorInit, val: &str); } #[cfg(web_sys_unstable_apis)] impl MediaStreamTrackGeneratorInit { @@ -41,12 +48,7 @@ impl MediaStreamTrackGeneratorInit { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `kind` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrackGeneratorInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_kind()` instead."] pub fn kind(&mut self, val: &str) -> &mut Self { self.set_kind(val); self diff --git a/crates/web-sys/src/features/gen_MediaStreamTrackProcessorInit.rs b/crates/web-sys/src/features/gen_MediaStreamTrackProcessorInit.rs index acd161dd8ba0..76cf12ab2c02 100644 --- a/crates/web-sys/src/features/gen_MediaStreamTrackProcessorInit.rs +++ b/crates/web-sys/src/features/gen_MediaStreamTrackProcessorInit.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "maxBufferSize")] pub fn get_max_buffer_size(this: &MediaStreamTrackProcessorInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `maxBufferSize` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrackProcessorInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "maxBufferSize")] - fn set_max_buffer_size(this: &MediaStreamTrackProcessorInit, val: u16); + pub fn set_max_buffer_size(this: &MediaStreamTrackProcessorInit, val: u16); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "MediaStreamTrack")] #[doc = "Get the `track` field of this object."] @@ -35,9 +42,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "track")] pub fn get_track(this: &MediaStreamTrackProcessorInit) -> MediaStreamTrack; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "MediaStreamTrack")] + #[doc = "Change the `track` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrack`, `MediaStreamTrackProcessorInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "track")] - fn set_track(this: &MediaStreamTrackProcessorInit, val: &MediaStreamTrack); + pub fn set_track(this: &MediaStreamTrackProcessorInit, val: &MediaStreamTrack); } #[cfg(web_sys_unstable_apis)] impl MediaStreamTrackProcessorInit { @@ -55,24 +69,14 @@ impl MediaStreamTrackProcessorInit { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `maxBufferSize` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrackProcessorInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_max_buffer_size()` instead."] pub fn max_buffer_size(&mut self, val: u16) -> &mut Self { self.set_max_buffer_size(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "MediaStreamTrack")] - #[doc = "Change the `track` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrack`, `MediaStreamTrackProcessorInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_track()` instead."] pub fn track(&mut self, val: &MediaStreamTrack) -> &mut Self { self.set_track(val); self diff --git a/crates/web-sys/src/features/gen_MediaTrackCapabilities.rs b/crates/web-sys/src/features/gen_MediaTrackCapabilities.rs index 7a0a87bf3b67..1c6d82c5cb9b 100644 --- a/crates/web-sys/src/features/gen_MediaTrackCapabilities.rs +++ b/crates/web-sys/src/features/gen_MediaTrackCapabilities.rs @@ -24,9 +24,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "aspectRatio")] pub fn get_aspect_ratio(this: &MediaTrackCapabilities) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "DoubleRange")] + #[doc = "Change the `aspectRatio` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DoubleRange`, `MediaTrackCapabilities`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "aspectRatio")] - fn set_aspect_ratio(this: &MediaTrackCapabilities, val: &DoubleRange); + pub fn set_aspect_ratio(this: &MediaTrackCapabilities, val: &DoubleRange); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `autoGainControl` field of this object."] #[doc = ""] @@ -36,8 +43,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "autoGainControl")] pub fn get_auto_gain_control(this: &MediaTrackCapabilities) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `autoGainControl` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "autoGainControl")] - fn set_auto_gain_control(this: &MediaTrackCapabilities, val: &::wasm_bindgen::JsValue); + pub fn set_auto_gain_control(this: &MediaTrackCapabilities, val: &::wasm_bindgen::JsValue); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "ULongRange")] #[doc = "Get the `channelCount` field of this object."] @@ -48,9 +62,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "channelCount")] pub fn get_channel_count(this: &MediaTrackCapabilities) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "ULongRange")] + #[doc = "Change the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`, `ULongRange`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "channelCount")] - fn set_channel_count(this: &MediaTrackCapabilities, val: &ULongRange); + pub fn set_channel_count(this: &MediaTrackCapabilities, val: &ULongRange); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `deviceId` field of this object."] #[doc = ""] @@ -60,8 +81,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "deviceId")] pub fn get_device_id(this: &MediaTrackCapabilities) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `deviceId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "deviceId")] - fn set_device_id(this: &MediaTrackCapabilities, val: &str); + pub fn set_device_id(this: &MediaTrackCapabilities, val: &str); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `echoCancellation` field of this object."] #[doc = ""] @@ -71,8 +99,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "echoCancellation")] pub fn get_echo_cancellation(this: &MediaTrackCapabilities) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `echoCancellation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "echoCancellation")] - fn set_echo_cancellation(this: &MediaTrackCapabilities, val: &::wasm_bindgen::JsValue); + pub fn set_echo_cancellation(this: &MediaTrackCapabilities, val: &::wasm_bindgen::JsValue); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `facingMode` field of this object."] #[doc = ""] @@ -82,8 +117,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "facingMode")] pub fn get_facing_mode(this: &MediaTrackCapabilities) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `facingMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "facingMode")] - fn set_facing_mode(this: &MediaTrackCapabilities, val: &::wasm_bindgen::JsValue); + pub fn set_facing_mode(this: &MediaTrackCapabilities, val: &::wasm_bindgen::JsValue); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "DoubleRange")] #[doc = "Get the `frameRate` field of this object."] @@ -94,9 +136,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "frameRate")] pub fn get_frame_rate(this: &MediaTrackCapabilities) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "DoubleRange")] + #[doc = "Change the `frameRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DoubleRange`, `MediaTrackCapabilities`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "frameRate")] - fn set_frame_rate(this: &MediaTrackCapabilities, val: &DoubleRange); + pub fn set_frame_rate(this: &MediaTrackCapabilities, val: &DoubleRange); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `groupId` field of this object."] #[doc = ""] @@ -106,8 +155,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "groupId")] pub fn get_group_id(this: &MediaTrackCapabilities) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `groupId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "groupId")] - fn set_group_id(this: &MediaTrackCapabilities, val: &str); + pub fn set_group_id(this: &MediaTrackCapabilities, val: &str); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "ULongRange")] #[doc = "Get the `height` field of this object."] @@ -118,9 +174,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "height")] pub fn get_height(this: &MediaTrackCapabilities) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "ULongRange")] + #[doc = "Change the `height` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`, `ULongRange`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "height")] - fn set_height(this: &MediaTrackCapabilities, val: &ULongRange); + pub fn set_height(this: &MediaTrackCapabilities, val: &ULongRange); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "DoubleRange")] #[doc = "Get the `latency` field of this object."] @@ -131,9 +194,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "latency")] pub fn get_latency(this: &MediaTrackCapabilities) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "DoubleRange")] + #[doc = "Change the `latency` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DoubleRange`, `MediaTrackCapabilities`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "latency")] - fn set_latency(this: &MediaTrackCapabilities, val: &DoubleRange); + pub fn set_latency(this: &MediaTrackCapabilities, val: &DoubleRange); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `noiseSuppression` field of this object."] #[doc = ""] @@ -143,8 +213,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "noiseSuppression")] pub fn get_noise_suppression(this: &MediaTrackCapabilities) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `noiseSuppression` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "noiseSuppression")] - fn set_noise_suppression(this: &MediaTrackCapabilities, val: &::wasm_bindgen::JsValue); + pub fn set_noise_suppression(this: &MediaTrackCapabilities, val: &::wasm_bindgen::JsValue); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `resizeMode` field of this object."] #[doc = ""] @@ -154,8 +231,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "resizeMode")] pub fn get_resize_mode(this: &MediaTrackCapabilities) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `resizeMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "resizeMode")] - fn set_resize_mode(this: &MediaTrackCapabilities, val: &::wasm_bindgen::JsValue); + pub fn set_resize_mode(this: &MediaTrackCapabilities, val: &::wasm_bindgen::JsValue); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "ULongRange")] #[doc = "Get the `sampleRate` field of this object."] @@ -166,9 +250,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "sampleRate")] pub fn get_sample_rate(this: &MediaTrackCapabilities) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "ULongRange")] + #[doc = "Change the `sampleRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`, `ULongRange`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "sampleRate")] - fn set_sample_rate(this: &MediaTrackCapabilities, val: &ULongRange); + pub fn set_sample_rate(this: &MediaTrackCapabilities, val: &ULongRange); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "ULongRange")] #[doc = "Get the `sampleSize` field of this object."] @@ -179,9 +270,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "sampleSize")] pub fn get_sample_size(this: &MediaTrackCapabilities) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "ULongRange")] + #[doc = "Change the `sampleSize` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`, `ULongRange`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "sampleSize")] - fn set_sample_size(this: &MediaTrackCapabilities, val: &ULongRange); + pub fn set_sample_size(this: &MediaTrackCapabilities, val: &ULongRange); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "ULongRange")] #[doc = "Get the `width` field of this object."] @@ -192,9 +290,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "width")] pub fn get_width(this: &MediaTrackCapabilities) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "ULongRange")] + #[doc = "Change the `width` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`, `ULongRange`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "width")] - fn set_width(this: &MediaTrackCapabilities, val: &ULongRange); + pub fn set_width(this: &MediaTrackCapabilities, val: &ULongRange); } #[cfg(web_sys_unstable_apis)] impl MediaTrackCapabilities { @@ -211,173 +316,98 @@ impl MediaTrackCapabilities { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "DoubleRange")] - #[doc = "Change the `aspectRatio` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DoubleRange`, `MediaTrackCapabilities`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_aspect_ratio()` instead."] pub fn aspect_ratio(&mut self, val: &DoubleRange) -> &mut Self { self.set_aspect_ratio(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `autoGainControl` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_auto_gain_control()` instead."] pub fn auto_gain_control(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_auto_gain_control(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "ULongRange")] - #[doc = "Change the `channelCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`, `ULongRange`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_channel_count()` instead."] pub fn channel_count(&mut self, val: &ULongRange) -> &mut Self { self.set_channel_count(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `deviceId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_device_id()` instead."] pub fn device_id(&mut self, val: &str) -> &mut Self { self.set_device_id(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `echoCancellation` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_echo_cancellation()` instead."] pub fn echo_cancellation(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_echo_cancellation(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `facingMode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_facing_mode()` instead."] pub fn facing_mode(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_facing_mode(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "DoubleRange")] - #[doc = "Change the `frameRate` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DoubleRange`, `MediaTrackCapabilities`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_frame_rate()` instead."] pub fn frame_rate(&mut self, val: &DoubleRange) -> &mut Self { self.set_frame_rate(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `groupId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_group_id()` instead."] pub fn group_id(&mut self, val: &str) -> &mut Self { self.set_group_id(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "ULongRange")] - #[doc = "Change the `height` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`, `ULongRange`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_height()` instead."] pub fn height(&mut self, val: &ULongRange) -> &mut Self { self.set_height(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "DoubleRange")] - #[doc = "Change the `latency` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DoubleRange`, `MediaTrackCapabilities`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_latency()` instead."] pub fn latency(&mut self, val: &DoubleRange) -> &mut Self { self.set_latency(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `noiseSuppression` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_noise_suppression()` instead."] pub fn noise_suppression(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_noise_suppression(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `resizeMode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_resize_mode()` instead."] pub fn resize_mode(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_resize_mode(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "ULongRange")] - #[doc = "Change the `sampleRate` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`, `ULongRange`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_sample_rate()` instead."] pub fn sample_rate(&mut self, val: &ULongRange) -> &mut Self { self.set_sample_rate(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "ULongRange")] - #[doc = "Change the `sampleSize` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`, `ULongRange`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_sample_size()` instead."] pub fn sample_size(&mut self, val: &ULongRange) -> &mut Self { self.set_sample_size(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "ULongRange")] - #[doc = "Change the `width` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`, `ULongRange`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_width()` instead."] pub fn width(&mut self, val: &ULongRange) -> &mut Self { self.set_width(val); self diff --git a/crates/web-sys/src/features/gen_MediaTrackConstraintSet.rs b/crates/web-sys/src/features/gen_MediaTrackConstraintSet.rs index dbf8275cc249..2624e64f81a7 100644 --- a/crates/web-sys/src/features/gen_MediaTrackConstraintSet.rs +++ b/crates/web-sys/src/features/gen_MediaTrackConstraintSet.rs @@ -15,113 +15,161 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] #[wasm_bindgen(method, getter = "autoGainControl")] pub fn get_auto_gain_control(this: &MediaTrackConstraintSet) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `autoGainControl` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] #[wasm_bindgen(method, setter = "autoGainControl")] - fn set_auto_gain_control(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + pub fn set_auto_gain_control(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); #[doc = "Get the `browserWindow` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] #[wasm_bindgen(method, getter = "browserWindow")] pub fn get_browser_window(this: &MediaTrackConstraintSet) -> Option; + #[doc = "Change the `browserWindow` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] #[wasm_bindgen(method, setter = "browserWindow")] - fn set_browser_window(this: &MediaTrackConstraintSet, val: f64); + pub fn set_browser_window(this: &MediaTrackConstraintSet, val: f64); #[doc = "Get the `channelCount` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] #[wasm_bindgen(method, getter = "channelCount")] pub fn get_channel_count(this: &MediaTrackConstraintSet) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] #[wasm_bindgen(method, setter = "channelCount")] - fn set_channel_count(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + pub fn set_channel_count(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); #[doc = "Get the `deviceId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] #[wasm_bindgen(method, getter = "deviceId")] pub fn get_device_id(this: &MediaTrackConstraintSet) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `deviceId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] #[wasm_bindgen(method, setter = "deviceId")] - fn set_device_id(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + pub fn set_device_id(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); #[doc = "Get the `echoCancellation` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] #[wasm_bindgen(method, getter = "echoCancellation")] pub fn get_echo_cancellation(this: &MediaTrackConstraintSet) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `echoCancellation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] #[wasm_bindgen(method, setter = "echoCancellation")] - fn set_echo_cancellation(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + pub fn set_echo_cancellation(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); #[doc = "Get the `facingMode` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] #[wasm_bindgen(method, getter = "facingMode")] pub fn get_facing_mode(this: &MediaTrackConstraintSet) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `facingMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] #[wasm_bindgen(method, setter = "facingMode")] - fn set_facing_mode(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + pub fn set_facing_mode(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); #[doc = "Get the `frameRate` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] #[wasm_bindgen(method, getter = "frameRate")] pub fn get_frame_rate(this: &MediaTrackConstraintSet) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `frameRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] #[wasm_bindgen(method, setter = "frameRate")] - fn set_frame_rate(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + pub fn set_frame_rate(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); #[doc = "Get the `height` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] #[wasm_bindgen(method, getter = "height")] pub fn get_height(this: &MediaTrackConstraintSet) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `height` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] #[wasm_bindgen(method, setter = "height")] - fn set_height(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + pub fn set_height(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); #[doc = "Get the `mediaSource` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] #[wasm_bindgen(method, getter = "mediaSource")] pub fn get_media_source(this: &MediaTrackConstraintSet) -> Option; + #[doc = "Change the `mediaSource` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] #[wasm_bindgen(method, setter = "mediaSource")] - fn set_media_source(this: &MediaTrackConstraintSet, val: &str); + pub fn set_media_source(this: &MediaTrackConstraintSet, val: &str); #[doc = "Get the `noiseSuppression` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] #[wasm_bindgen(method, getter = "noiseSuppression")] pub fn get_noise_suppression(this: &MediaTrackConstraintSet) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `noiseSuppression` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] #[wasm_bindgen(method, setter = "noiseSuppression")] - fn set_noise_suppression(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + pub fn set_noise_suppression(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); #[doc = "Get the `scrollWithPage` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] #[wasm_bindgen(method, getter = "scrollWithPage")] pub fn get_scroll_with_page(this: &MediaTrackConstraintSet) -> Option; + #[doc = "Change the `scrollWithPage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] #[wasm_bindgen(method, setter = "scrollWithPage")] - fn set_scroll_with_page(this: &MediaTrackConstraintSet, val: bool); + pub fn set_scroll_with_page(this: &MediaTrackConstraintSet, val: bool); #[doc = "Get the `viewportHeight` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] #[wasm_bindgen(method, getter = "viewportHeight")] pub fn get_viewport_height(this: &MediaTrackConstraintSet) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `viewportHeight` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] #[wasm_bindgen(method, setter = "viewportHeight")] - fn set_viewport_height(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + pub fn set_viewport_height(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); #[doc = "Get the `viewportOffsetX` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] #[wasm_bindgen(method, getter = "viewportOffsetX")] pub fn get_viewport_offset_x(this: &MediaTrackConstraintSet) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `viewportOffsetX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] #[wasm_bindgen(method, setter = "viewportOffsetX")] - fn set_viewport_offset_x(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + pub fn set_viewport_offset_x(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); #[doc = "Get the `viewportOffsetY` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] #[wasm_bindgen(method, getter = "viewportOffsetY")] pub fn get_viewport_offset_y(this: &MediaTrackConstraintSet) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `viewportOffsetY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] #[wasm_bindgen(method, setter = "viewportOffsetY")] - fn set_viewport_offset_y(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + pub fn set_viewport_offset_y(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); #[doc = "Get the `viewportWidth` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] #[wasm_bindgen(method, getter = "viewportWidth")] pub fn get_viewport_width(this: &MediaTrackConstraintSet) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `viewportWidth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] #[wasm_bindgen(method, setter = "viewportWidth")] - fn set_viewport_width(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + pub fn set_viewport_width(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); #[doc = "Get the `width` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] #[wasm_bindgen(method, getter = "width")] pub fn get_width(this: &MediaTrackConstraintSet) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `width` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] #[wasm_bindgen(method, setter = "width")] - fn set_width(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + pub fn set_width(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); } impl MediaTrackConstraintSet { #[doc = "Construct a new `MediaTrackConstraintSet`."] @@ -132,114 +180,82 @@ impl MediaTrackConstraintSet { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `autoGainControl` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + #[deprecated = "Use `set_auto_gain_control()` instead."] pub fn auto_gain_control(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_auto_gain_control(val); self } - #[doc = "Change the `browserWindow` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + #[deprecated = "Use `set_browser_window()` instead."] pub fn browser_window(&mut self, val: f64) -> &mut Self { self.set_browser_window(val); self } - #[doc = "Change the `channelCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + #[deprecated = "Use `set_channel_count()` instead."] pub fn channel_count(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_channel_count(val); self } - #[doc = "Change the `deviceId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + #[deprecated = "Use `set_device_id()` instead."] pub fn device_id(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_device_id(val); self } - #[doc = "Change the `echoCancellation` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + #[deprecated = "Use `set_echo_cancellation()` instead."] pub fn echo_cancellation(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_echo_cancellation(val); self } - #[doc = "Change the `facingMode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + #[deprecated = "Use `set_facing_mode()` instead."] pub fn facing_mode(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_facing_mode(val); self } - #[doc = "Change the `frameRate` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + #[deprecated = "Use `set_frame_rate()` instead."] pub fn frame_rate(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_frame_rate(val); self } - #[doc = "Change the `height` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + #[deprecated = "Use `set_height()` instead."] pub fn height(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_height(val); self } - #[doc = "Change the `mediaSource` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + #[deprecated = "Use `set_media_source()` instead."] pub fn media_source(&mut self, val: &str) -> &mut Self { self.set_media_source(val); self } - #[doc = "Change the `noiseSuppression` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + #[deprecated = "Use `set_noise_suppression()` instead."] pub fn noise_suppression(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_noise_suppression(val); self } - #[doc = "Change the `scrollWithPage` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + #[deprecated = "Use `set_scroll_with_page()` instead."] pub fn scroll_with_page(&mut self, val: bool) -> &mut Self { self.set_scroll_with_page(val); self } - #[doc = "Change the `viewportHeight` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + #[deprecated = "Use `set_viewport_height()` instead."] pub fn viewport_height(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_viewport_height(val); self } - #[doc = "Change the `viewportOffsetX` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + #[deprecated = "Use `set_viewport_offset_x()` instead."] pub fn viewport_offset_x(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_viewport_offset_x(val); self } - #[doc = "Change the `viewportOffsetY` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + #[deprecated = "Use `set_viewport_offset_y()` instead."] pub fn viewport_offset_y(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_viewport_offset_y(val); self } - #[doc = "Change the `viewportWidth` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + #[deprecated = "Use `set_viewport_width()` instead."] pub fn viewport_width(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_viewport_width(val); self } - #[doc = "Change the `width` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + #[deprecated = "Use `set_width()` instead."] pub fn width(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_width(val); self diff --git a/crates/web-sys/src/features/gen_MediaTrackConstraints.rs b/crates/web-sys/src/features/gen_MediaTrackConstraints.rs index b7e537bd6d8c..6d40272de64c 100644 --- a/crates/web-sys/src/features/gen_MediaTrackConstraints.rs +++ b/crates/web-sys/src/features/gen_MediaTrackConstraints.rs @@ -15,120 +15,171 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] #[wasm_bindgen(method, getter = "autoGainControl")] pub fn get_auto_gain_control(this: &MediaTrackConstraints) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `autoGainControl` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] #[wasm_bindgen(method, setter = "autoGainControl")] - fn set_auto_gain_control(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + pub fn set_auto_gain_control(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); #[doc = "Get the `browserWindow` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] #[wasm_bindgen(method, getter = "browserWindow")] pub fn get_browser_window(this: &MediaTrackConstraints) -> Option; + #[doc = "Change the `browserWindow` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] #[wasm_bindgen(method, setter = "browserWindow")] - fn set_browser_window(this: &MediaTrackConstraints, val: f64); + pub fn set_browser_window(this: &MediaTrackConstraints, val: f64); #[doc = "Get the `channelCount` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] #[wasm_bindgen(method, getter = "channelCount")] pub fn get_channel_count(this: &MediaTrackConstraints) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] #[wasm_bindgen(method, setter = "channelCount")] - fn set_channel_count(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + pub fn set_channel_count(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); #[doc = "Get the `deviceId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] #[wasm_bindgen(method, getter = "deviceId")] pub fn get_device_id(this: &MediaTrackConstraints) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `deviceId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] #[wasm_bindgen(method, setter = "deviceId")] - fn set_device_id(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + pub fn set_device_id(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); #[doc = "Get the `echoCancellation` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] #[wasm_bindgen(method, getter = "echoCancellation")] pub fn get_echo_cancellation(this: &MediaTrackConstraints) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `echoCancellation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] #[wasm_bindgen(method, setter = "echoCancellation")] - fn set_echo_cancellation(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + pub fn set_echo_cancellation(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); #[doc = "Get the `facingMode` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] #[wasm_bindgen(method, getter = "facingMode")] pub fn get_facing_mode(this: &MediaTrackConstraints) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `facingMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] #[wasm_bindgen(method, setter = "facingMode")] - fn set_facing_mode(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + pub fn set_facing_mode(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); #[doc = "Get the `frameRate` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] #[wasm_bindgen(method, getter = "frameRate")] pub fn get_frame_rate(this: &MediaTrackConstraints) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `frameRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] #[wasm_bindgen(method, setter = "frameRate")] - fn set_frame_rate(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + pub fn set_frame_rate(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); #[doc = "Get the `height` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] #[wasm_bindgen(method, getter = "height")] pub fn get_height(this: &MediaTrackConstraints) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `height` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] #[wasm_bindgen(method, setter = "height")] - fn set_height(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + pub fn set_height(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); #[doc = "Get the `mediaSource` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] #[wasm_bindgen(method, getter = "mediaSource")] pub fn get_media_source(this: &MediaTrackConstraints) -> Option; + #[doc = "Change the `mediaSource` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] #[wasm_bindgen(method, setter = "mediaSource")] - fn set_media_source(this: &MediaTrackConstraints, val: &str); + pub fn set_media_source(this: &MediaTrackConstraints, val: &str); #[doc = "Get the `noiseSuppression` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] #[wasm_bindgen(method, getter = "noiseSuppression")] pub fn get_noise_suppression(this: &MediaTrackConstraints) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `noiseSuppression` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] #[wasm_bindgen(method, setter = "noiseSuppression")] - fn set_noise_suppression(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + pub fn set_noise_suppression(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); #[doc = "Get the `scrollWithPage` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] #[wasm_bindgen(method, getter = "scrollWithPage")] pub fn get_scroll_with_page(this: &MediaTrackConstraints) -> Option; + #[doc = "Change the `scrollWithPage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] #[wasm_bindgen(method, setter = "scrollWithPage")] - fn set_scroll_with_page(this: &MediaTrackConstraints, val: bool); + pub fn set_scroll_with_page(this: &MediaTrackConstraints, val: bool); #[doc = "Get the `viewportHeight` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] #[wasm_bindgen(method, getter = "viewportHeight")] pub fn get_viewport_height(this: &MediaTrackConstraints) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `viewportHeight` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] #[wasm_bindgen(method, setter = "viewportHeight")] - fn set_viewport_height(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + pub fn set_viewport_height(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); #[doc = "Get the `viewportOffsetX` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] #[wasm_bindgen(method, getter = "viewportOffsetX")] pub fn get_viewport_offset_x(this: &MediaTrackConstraints) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `viewportOffsetX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] #[wasm_bindgen(method, setter = "viewportOffsetX")] - fn set_viewport_offset_x(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + pub fn set_viewport_offset_x(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); #[doc = "Get the `viewportOffsetY` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] #[wasm_bindgen(method, getter = "viewportOffsetY")] pub fn get_viewport_offset_y(this: &MediaTrackConstraints) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `viewportOffsetY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] #[wasm_bindgen(method, setter = "viewportOffsetY")] - fn set_viewport_offset_y(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + pub fn set_viewport_offset_y(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); #[doc = "Get the `viewportWidth` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] #[wasm_bindgen(method, getter = "viewportWidth")] pub fn get_viewport_width(this: &MediaTrackConstraints) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `viewportWidth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] #[wasm_bindgen(method, setter = "viewportWidth")] - fn set_viewport_width(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + pub fn set_viewport_width(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); #[doc = "Get the `width` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] #[wasm_bindgen(method, getter = "width")] pub fn get_width(this: &MediaTrackConstraints) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `width` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] #[wasm_bindgen(method, setter = "width")] - fn set_width(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + pub fn set_width(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); #[doc = "Get the `advanced` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] #[wasm_bindgen(method, getter = "advanced")] pub fn get_advanced(this: &MediaTrackConstraints) -> Option<::js_sys::Array>; + #[doc = "Change the `advanced` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] #[wasm_bindgen(method, setter = "advanced")] - fn set_advanced(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + pub fn set_advanced(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); } impl MediaTrackConstraints { #[doc = "Construct a new `MediaTrackConstraints`."] @@ -139,121 +190,87 @@ impl MediaTrackConstraints { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `autoGainControl` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + #[deprecated = "Use `set_auto_gain_control()` instead."] pub fn auto_gain_control(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_auto_gain_control(val); self } - #[doc = "Change the `browserWindow` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + #[deprecated = "Use `set_browser_window()` instead."] pub fn browser_window(&mut self, val: f64) -> &mut Self { self.set_browser_window(val); self } - #[doc = "Change the `channelCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + #[deprecated = "Use `set_channel_count()` instead."] pub fn channel_count(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_channel_count(val); self } - #[doc = "Change the `deviceId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + #[deprecated = "Use `set_device_id()` instead."] pub fn device_id(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_device_id(val); self } - #[doc = "Change the `echoCancellation` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + #[deprecated = "Use `set_echo_cancellation()` instead."] pub fn echo_cancellation(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_echo_cancellation(val); self } - #[doc = "Change the `facingMode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + #[deprecated = "Use `set_facing_mode()` instead."] pub fn facing_mode(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_facing_mode(val); self } - #[doc = "Change the `frameRate` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + #[deprecated = "Use `set_frame_rate()` instead."] pub fn frame_rate(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_frame_rate(val); self } - #[doc = "Change the `height` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + #[deprecated = "Use `set_height()` instead."] pub fn height(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_height(val); self } - #[doc = "Change the `mediaSource` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + #[deprecated = "Use `set_media_source()` instead."] pub fn media_source(&mut self, val: &str) -> &mut Self { self.set_media_source(val); self } - #[doc = "Change the `noiseSuppression` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + #[deprecated = "Use `set_noise_suppression()` instead."] pub fn noise_suppression(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_noise_suppression(val); self } - #[doc = "Change the `scrollWithPage` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + #[deprecated = "Use `set_scroll_with_page()` instead."] pub fn scroll_with_page(&mut self, val: bool) -> &mut Self { self.set_scroll_with_page(val); self } - #[doc = "Change the `viewportHeight` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + #[deprecated = "Use `set_viewport_height()` instead."] pub fn viewport_height(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_viewport_height(val); self } - #[doc = "Change the `viewportOffsetX` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + #[deprecated = "Use `set_viewport_offset_x()` instead."] pub fn viewport_offset_x(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_viewport_offset_x(val); self } - #[doc = "Change the `viewportOffsetY` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + #[deprecated = "Use `set_viewport_offset_y()` instead."] pub fn viewport_offset_y(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_viewport_offset_y(val); self } - #[doc = "Change the `viewportWidth` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + #[deprecated = "Use `set_viewport_width()` instead."] pub fn viewport_width(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_viewport_width(val); self } - #[doc = "Change the `width` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + #[deprecated = "Use `set_width()` instead."] pub fn width(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_width(val); self } - #[doc = "Change the `advanced` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + #[deprecated = "Use `set_advanced()` instead."] pub fn advanced(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_advanced(val); self diff --git a/crates/web-sys/src/features/gen_MediaTrackSettings.rs b/crates/web-sys/src/features/gen_MediaTrackSettings.rs index da1ab4d8aee1..455fcad48221 100644 --- a/crates/web-sys/src/features/gen_MediaTrackSettings.rs +++ b/crates/web-sys/src/features/gen_MediaTrackSettings.rs @@ -15,64 +15,91 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] #[wasm_bindgen(method, getter = "autoGainControl")] pub fn get_auto_gain_control(this: &MediaTrackSettings) -> Option; + #[doc = "Change the `autoGainControl` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] #[wasm_bindgen(method, setter = "autoGainControl")] - fn set_auto_gain_control(this: &MediaTrackSettings, val: bool); + pub fn set_auto_gain_control(this: &MediaTrackSettings, val: bool); #[doc = "Get the `channelCount` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] #[wasm_bindgen(method, getter = "channelCount")] pub fn get_channel_count(this: &MediaTrackSettings) -> Option; + #[doc = "Change the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] #[wasm_bindgen(method, setter = "channelCount")] - fn set_channel_count(this: &MediaTrackSettings, val: i32); + pub fn set_channel_count(this: &MediaTrackSettings, val: i32); #[doc = "Get the `deviceId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] #[wasm_bindgen(method, getter = "deviceId")] pub fn get_device_id(this: &MediaTrackSettings) -> Option; + #[doc = "Change the `deviceId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] #[wasm_bindgen(method, setter = "deviceId")] - fn set_device_id(this: &MediaTrackSettings, val: &str); + pub fn set_device_id(this: &MediaTrackSettings, val: &str); #[doc = "Get the `echoCancellation` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] #[wasm_bindgen(method, getter = "echoCancellation")] pub fn get_echo_cancellation(this: &MediaTrackSettings) -> Option; + #[doc = "Change the `echoCancellation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] #[wasm_bindgen(method, setter = "echoCancellation")] - fn set_echo_cancellation(this: &MediaTrackSettings, val: bool); + pub fn set_echo_cancellation(this: &MediaTrackSettings, val: bool); #[doc = "Get the `facingMode` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] #[wasm_bindgen(method, getter = "facingMode")] pub fn get_facing_mode(this: &MediaTrackSettings) -> Option; + #[doc = "Change the `facingMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] #[wasm_bindgen(method, setter = "facingMode")] - fn set_facing_mode(this: &MediaTrackSettings, val: &str); + pub fn set_facing_mode(this: &MediaTrackSettings, val: &str); #[doc = "Get the `frameRate` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] #[wasm_bindgen(method, getter = "frameRate")] pub fn get_frame_rate(this: &MediaTrackSettings) -> Option; + #[doc = "Change the `frameRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] #[wasm_bindgen(method, setter = "frameRate")] - fn set_frame_rate(this: &MediaTrackSettings, val: f64); + pub fn set_frame_rate(this: &MediaTrackSettings, val: f64); #[doc = "Get the `height` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] #[wasm_bindgen(method, getter = "height")] pub fn get_height(this: &MediaTrackSettings) -> Option; + #[doc = "Change the `height` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] #[wasm_bindgen(method, setter = "height")] - fn set_height(this: &MediaTrackSettings, val: i32); + pub fn set_height(this: &MediaTrackSettings, val: i32); #[doc = "Get the `noiseSuppression` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] #[wasm_bindgen(method, getter = "noiseSuppression")] pub fn get_noise_suppression(this: &MediaTrackSettings) -> Option; + #[doc = "Change the `noiseSuppression` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] #[wasm_bindgen(method, setter = "noiseSuppression")] - fn set_noise_suppression(this: &MediaTrackSettings, val: bool); + pub fn set_noise_suppression(this: &MediaTrackSettings, val: bool); #[doc = "Get the `width` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] #[wasm_bindgen(method, getter = "width")] pub fn get_width(this: &MediaTrackSettings) -> Option; + #[doc = "Change the `width` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] #[wasm_bindgen(method, setter = "width")] - fn set_width(this: &MediaTrackSettings, val: i32); + pub fn set_width(this: &MediaTrackSettings, val: i32); } impl MediaTrackSettings { #[doc = "Construct a new `MediaTrackSettings`."] @@ -83,65 +110,47 @@ impl MediaTrackSettings { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `autoGainControl` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] + #[deprecated = "Use `set_auto_gain_control()` instead."] pub fn auto_gain_control(&mut self, val: bool) -> &mut Self { self.set_auto_gain_control(val); self } - #[doc = "Change the `channelCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] + #[deprecated = "Use `set_channel_count()` instead."] pub fn channel_count(&mut self, val: i32) -> &mut Self { self.set_channel_count(val); self } - #[doc = "Change the `deviceId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] + #[deprecated = "Use `set_device_id()` instead."] pub fn device_id(&mut self, val: &str) -> &mut Self { self.set_device_id(val); self } - #[doc = "Change the `echoCancellation` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] + #[deprecated = "Use `set_echo_cancellation()` instead."] pub fn echo_cancellation(&mut self, val: bool) -> &mut Self { self.set_echo_cancellation(val); self } - #[doc = "Change the `facingMode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] + #[deprecated = "Use `set_facing_mode()` instead."] pub fn facing_mode(&mut self, val: &str) -> &mut Self { self.set_facing_mode(val); self } - #[doc = "Change the `frameRate` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] + #[deprecated = "Use `set_frame_rate()` instead."] pub fn frame_rate(&mut self, val: f64) -> &mut Self { self.set_frame_rate(val); self } - #[doc = "Change the `height` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] + #[deprecated = "Use `set_height()` instead."] pub fn height(&mut self, val: i32) -> &mut Self { self.set_height(val); self } - #[doc = "Change the `noiseSuppression` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] + #[deprecated = "Use `set_noise_suppression()` instead."] pub fn noise_suppression(&mut self, val: bool) -> &mut Self { self.set_noise_suppression(val); self } - #[doc = "Change the `width` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] + #[deprecated = "Use `set_width()` instead."] pub fn width(&mut self, val: i32) -> &mut Self { self.set_width(val); self diff --git a/crates/web-sys/src/features/gen_MediaTrackSupportedConstraints.rs b/crates/web-sys/src/features/gen_MediaTrackSupportedConstraints.rs index 971ca1dd73f9..6e5cc4cc6834 100644 --- a/crates/web-sys/src/features/gen_MediaTrackSupportedConstraints.rs +++ b/crates/web-sys/src/features/gen_MediaTrackSupportedConstraints.rs @@ -15,106 +15,151 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] #[wasm_bindgen(method, getter = "aspectRatio")] pub fn get_aspect_ratio(this: &MediaTrackSupportedConstraints) -> Option; + #[doc = "Change the `aspectRatio` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] #[wasm_bindgen(method, setter = "aspectRatio")] - fn set_aspect_ratio(this: &MediaTrackSupportedConstraints, val: bool); + pub fn set_aspect_ratio(this: &MediaTrackSupportedConstraints, val: bool); #[doc = "Get the `autoGainControl` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] #[wasm_bindgen(method, getter = "autoGainControl")] pub fn get_auto_gain_control(this: &MediaTrackSupportedConstraints) -> Option; + #[doc = "Change the `autoGainControl` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] #[wasm_bindgen(method, setter = "autoGainControl")] - fn set_auto_gain_control(this: &MediaTrackSupportedConstraints, val: bool); + pub fn set_auto_gain_control(this: &MediaTrackSupportedConstraints, val: bool); #[doc = "Get the `channelCount` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] #[wasm_bindgen(method, getter = "channelCount")] pub fn get_channel_count(this: &MediaTrackSupportedConstraints) -> Option; + #[doc = "Change the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] #[wasm_bindgen(method, setter = "channelCount")] - fn set_channel_count(this: &MediaTrackSupportedConstraints, val: bool); + pub fn set_channel_count(this: &MediaTrackSupportedConstraints, val: bool); #[doc = "Get the `deviceId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] #[wasm_bindgen(method, getter = "deviceId")] pub fn get_device_id(this: &MediaTrackSupportedConstraints) -> Option; + #[doc = "Change the `deviceId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] #[wasm_bindgen(method, setter = "deviceId")] - fn set_device_id(this: &MediaTrackSupportedConstraints, val: bool); + pub fn set_device_id(this: &MediaTrackSupportedConstraints, val: bool); #[doc = "Get the `echoCancellation` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] #[wasm_bindgen(method, getter = "echoCancellation")] pub fn get_echo_cancellation(this: &MediaTrackSupportedConstraints) -> Option; + #[doc = "Change the `echoCancellation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] #[wasm_bindgen(method, setter = "echoCancellation")] - fn set_echo_cancellation(this: &MediaTrackSupportedConstraints, val: bool); + pub fn set_echo_cancellation(this: &MediaTrackSupportedConstraints, val: bool); #[doc = "Get the `facingMode` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] #[wasm_bindgen(method, getter = "facingMode")] pub fn get_facing_mode(this: &MediaTrackSupportedConstraints) -> Option; + #[doc = "Change the `facingMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] #[wasm_bindgen(method, setter = "facingMode")] - fn set_facing_mode(this: &MediaTrackSupportedConstraints, val: bool); + pub fn set_facing_mode(this: &MediaTrackSupportedConstraints, val: bool); #[doc = "Get the `frameRate` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] #[wasm_bindgen(method, getter = "frameRate")] pub fn get_frame_rate(this: &MediaTrackSupportedConstraints) -> Option; + #[doc = "Change the `frameRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] #[wasm_bindgen(method, setter = "frameRate")] - fn set_frame_rate(this: &MediaTrackSupportedConstraints, val: bool); + pub fn set_frame_rate(this: &MediaTrackSupportedConstraints, val: bool); #[doc = "Get the `groupId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] #[wasm_bindgen(method, getter = "groupId")] pub fn get_group_id(this: &MediaTrackSupportedConstraints) -> Option; + #[doc = "Change the `groupId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] #[wasm_bindgen(method, setter = "groupId")] - fn set_group_id(this: &MediaTrackSupportedConstraints, val: bool); + pub fn set_group_id(this: &MediaTrackSupportedConstraints, val: bool); #[doc = "Get the `height` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] #[wasm_bindgen(method, getter = "height")] pub fn get_height(this: &MediaTrackSupportedConstraints) -> Option; + #[doc = "Change the `height` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] #[wasm_bindgen(method, setter = "height")] - fn set_height(this: &MediaTrackSupportedConstraints, val: bool); + pub fn set_height(this: &MediaTrackSupportedConstraints, val: bool); #[doc = "Get the `latency` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] #[wasm_bindgen(method, getter = "latency")] pub fn get_latency(this: &MediaTrackSupportedConstraints) -> Option; + #[doc = "Change the `latency` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] #[wasm_bindgen(method, setter = "latency")] - fn set_latency(this: &MediaTrackSupportedConstraints, val: bool); + pub fn set_latency(this: &MediaTrackSupportedConstraints, val: bool); #[doc = "Get the `noiseSuppression` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] #[wasm_bindgen(method, getter = "noiseSuppression")] pub fn get_noise_suppression(this: &MediaTrackSupportedConstraints) -> Option; + #[doc = "Change the `noiseSuppression` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] #[wasm_bindgen(method, setter = "noiseSuppression")] - fn set_noise_suppression(this: &MediaTrackSupportedConstraints, val: bool); + pub fn set_noise_suppression(this: &MediaTrackSupportedConstraints, val: bool); #[doc = "Get the `sampleRate` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] #[wasm_bindgen(method, getter = "sampleRate")] pub fn get_sample_rate(this: &MediaTrackSupportedConstraints) -> Option; + #[doc = "Change the `sampleRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] #[wasm_bindgen(method, setter = "sampleRate")] - fn set_sample_rate(this: &MediaTrackSupportedConstraints, val: bool); + pub fn set_sample_rate(this: &MediaTrackSupportedConstraints, val: bool); #[doc = "Get the `sampleSize` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] #[wasm_bindgen(method, getter = "sampleSize")] pub fn get_sample_size(this: &MediaTrackSupportedConstraints) -> Option; + #[doc = "Change the `sampleSize` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] #[wasm_bindgen(method, setter = "sampleSize")] - fn set_sample_size(this: &MediaTrackSupportedConstraints, val: bool); + pub fn set_sample_size(this: &MediaTrackSupportedConstraints, val: bool); #[doc = "Get the `volume` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] #[wasm_bindgen(method, getter = "volume")] pub fn get_volume(this: &MediaTrackSupportedConstraints) -> Option; + #[doc = "Change the `volume` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] #[wasm_bindgen(method, setter = "volume")] - fn set_volume(this: &MediaTrackSupportedConstraints, val: bool); + pub fn set_volume(this: &MediaTrackSupportedConstraints, val: bool); #[doc = "Get the `width` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] #[wasm_bindgen(method, getter = "width")] pub fn get_width(this: &MediaTrackSupportedConstraints) -> Option; + #[doc = "Change the `width` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] #[wasm_bindgen(method, setter = "width")] - fn set_width(this: &MediaTrackSupportedConstraints, val: bool); + pub fn set_width(this: &MediaTrackSupportedConstraints, val: bool); } impl MediaTrackSupportedConstraints { #[doc = "Construct a new `MediaTrackSupportedConstraints`."] @@ -125,107 +170,77 @@ impl MediaTrackSupportedConstraints { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `aspectRatio` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + #[deprecated = "Use `set_aspect_ratio()` instead."] pub fn aspect_ratio(&mut self, val: bool) -> &mut Self { self.set_aspect_ratio(val); self } - #[doc = "Change the `autoGainControl` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + #[deprecated = "Use `set_auto_gain_control()` instead."] pub fn auto_gain_control(&mut self, val: bool) -> &mut Self { self.set_auto_gain_control(val); self } - #[doc = "Change the `channelCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + #[deprecated = "Use `set_channel_count()` instead."] pub fn channel_count(&mut self, val: bool) -> &mut Self { self.set_channel_count(val); self } - #[doc = "Change the `deviceId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + #[deprecated = "Use `set_device_id()` instead."] pub fn device_id(&mut self, val: bool) -> &mut Self { self.set_device_id(val); self } - #[doc = "Change the `echoCancellation` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + #[deprecated = "Use `set_echo_cancellation()` instead."] pub fn echo_cancellation(&mut self, val: bool) -> &mut Self { self.set_echo_cancellation(val); self } - #[doc = "Change the `facingMode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + #[deprecated = "Use `set_facing_mode()` instead."] pub fn facing_mode(&mut self, val: bool) -> &mut Self { self.set_facing_mode(val); self } - #[doc = "Change the `frameRate` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + #[deprecated = "Use `set_frame_rate()` instead."] pub fn frame_rate(&mut self, val: bool) -> &mut Self { self.set_frame_rate(val); self } - #[doc = "Change the `groupId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + #[deprecated = "Use `set_group_id()` instead."] pub fn group_id(&mut self, val: bool) -> &mut Self { self.set_group_id(val); self } - #[doc = "Change the `height` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + #[deprecated = "Use `set_height()` instead."] pub fn height(&mut self, val: bool) -> &mut Self { self.set_height(val); self } - #[doc = "Change the `latency` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + #[deprecated = "Use `set_latency()` instead."] pub fn latency(&mut self, val: bool) -> &mut Self { self.set_latency(val); self } - #[doc = "Change the `noiseSuppression` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + #[deprecated = "Use `set_noise_suppression()` instead."] pub fn noise_suppression(&mut self, val: bool) -> &mut Self { self.set_noise_suppression(val); self } - #[doc = "Change the `sampleRate` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + #[deprecated = "Use `set_sample_rate()` instead."] pub fn sample_rate(&mut self, val: bool) -> &mut Self { self.set_sample_rate(val); self } - #[doc = "Change the `sampleSize` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + #[deprecated = "Use `set_sample_size()` instead."] pub fn sample_size(&mut self, val: bool) -> &mut Self { self.set_sample_size(val); self } - #[doc = "Change the `volume` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + #[deprecated = "Use `set_volume()` instead."] pub fn volume(&mut self, val: bool) -> &mut Self { self.set_volume(val); self } - #[doc = "Change the `width` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + #[deprecated = "Use `set_width()` instead."] pub fn width(&mut self, val: bool) -> &mut Self { self.set_width(val); self diff --git a/crates/web-sys/src/features/gen_MemoryAttribution.rs b/crates/web-sys/src/features/gen_MemoryAttribution.rs index b4d81a9390be..be7056aa458f 100644 --- a/crates/web-sys/src/features/gen_MemoryAttribution.rs +++ b/crates/web-sys/src/features/gen_MemoryAttribution.rs @@ -24,9 +24,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "container")] pub fn get_container(this: &MemoryAttribution) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "MemoryAttributionContainer")] + #[doc = "Change the `container` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MemoryAttribution`, `MemoryAttributionContainer`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "container")] - fn set_container(this: &MemoryAttribution, val: &MemoryAttributionContainer); + pub fn set_container(this: &MemoryAttribution, val: &MemoryAttributionContainer); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `scope` field of this object."] #[doc = ""] @@ -36,8 +43,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "scope")] pub fn get_scope(this: &MemoryAttribution) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `scope` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MemoryAttribution`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "scope")] - fn set_scope(this: &MemoryAttribution, val: &str); + pub fn set_scope(this: &MemoryAttribution, val: &str); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `url` field of this object."] #[doc = ""] @@ -47,8 +61,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "url")] pub fn get_url(this: &MemoryAttribution) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `url` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MemoryAttribution`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "url")] - fn set_url(this: &MemoryAttribution, val: &str); + pub fn set_url(this: &MemoryAttribution, val: &str); } #[cfg(web_sys_unstable_apis)] impl MemoryAttribution { @@ -65,34 +86,19 @@ impl MemoryAttribution { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "MemoryAttributionContainer")] - #[doc = "Change the `container` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MemoryAttribution`, `MemoryAttributionContainer`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_container()` instead."] pub fn container(&mut self, val: &MemoryAttributionContainer) -> &mut Self { self.set_container(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `scope` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MemoryAttribution`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_scope()` instead."] pub fn scope(&mut self, val: &str) -> &mut Self { self.set_scope(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `url` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MemoryAttribution`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_url()` instead."] pub fn url(&mut self, val: &str) -> &mut Self { self.set_url(val); self diff --git a/crates/web-sys/src/features/gen_MemoryAttributionContainer.rs b/crates/web-sys/src/features/gen_MemoryAttributionContainer.rs index 3fe9e94928c6..c7a6bb4c1e83 100644 --- a/crates/web-sys/src/features/gen_MemoryAttributionContainer.rs +++ b/crates/web-sys/src/features/gen_MemoryAttributionContainer.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "id")] pub fn get_id(this: &MemoryAttributionContainer) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MemoryAttributionContainer`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "id")] - fn set_id(this: &MemoryAttributionContainer, val: &str); + pub fn set_id(this: &MemoryAttributionContainer, val: &str); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `src` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "src")] pub fn get_src(this: &MemoryAttributionContainer) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `src` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MemoryAttributionContainer`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "src")] - fn set_src(this: &MemoryAttributionContainer, val: &str); + pub fn set_src(this: &MemoryAttributionContainer, val: &str); } #[cfg(web_sys_unstable_apis)] impl MemoryAttributionContainer { @@ -51,23 +65,13 @@ impl MemoryAttributionContainer { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `id` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MemoryAttributionContainer`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_id()` instead."] pub fn id(&mut self, val: &str) -> &mut Self { self.set_id(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `src` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MemoryAttributionContainer`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_src()` instead."] pub fn src(&mut self, val: &str) -> &mut Self { self.set_src(val); self diff --git a/crates/web-sys/src/features/gen_MemoryBreakdownEntry.rs b/crates/web-sys/src/features/gen_MemoryBreakdownEntry.rs index 0c69ec03537c..97ad8cecf9d8 100644 --- a/crates/web-sys/src/features/gen_MemoryBreakdownEntry.rs +++ b/crates/web-sys/src/features/gen_MemoryBreakdownEntry.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "attribution")] pub fn get_attribution(this: &MemoryBreakdownEntry) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `attribution` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MemoryBreakdownEntry`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "attribution")] - fn set_attribution(this: &MemoryBreakdownEntry, val: &::wasm_bindgen::JsValue); + pub fn set_attribution(this: &MemoryBreakdownEntry, val: &::wasm_bindgen::JsValue); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `bytes` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "bytes")] pub fn get_bytes(this: &MemoryBreakdownEntry) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `bytes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MemoryBreakdownEntry`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "bytes")] - fn set_bytes(this: &MemoryBreakdownEntry, val: f64); + pub fn set_bytes(this: &MemoryBreakdownEntry, val: f64); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `types` field of this object."] #[doc = ""] @@ -45,8 +59,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "types")] pub fn get_types(this: &MemoryBreakdownEntry) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `types` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MemoryBreakdownEntry`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "types")] - fn set_types(this: &MemoryBreakdownEntry, val: &::wasm_bindgen::JsValue); + pub fn set_types(this: &MemoryBreakdownEntry, val: &::wasm_bindgen::JsValue); } #[cfg(web_sys_unstable_apis)] impl MemoryBreakdownEntry { @@ -62,34 +83,19 @@ impl MemoryBreakdownEntry { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `attribution` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MemoryBreakdownEntry`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_attribution()` instead."] pub fn attribution(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_attribution(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `bytes` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MemoryBreakdownEntry`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_bytes()` instead."] pub fn bytes(&mut self, val: f64) -> &mut Self { self.set_bytes(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `types` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MemoryBreakdownEntry`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_types()` instead."] pub fn types(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_types(val); self diff --git a/crates/web-sys/src/features/gen_MemoryMeasurement.rs b/crates/web-sys/src/features/gen_MemoryMeasurement.rs index de19e19fdad9..041a0e64493a 100644 --- a/crates/web-sys/src/features/gen_MemoryMeasurement.rs +++ b/crates/web-sys/src/features/gen_MemoryMeasurement.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "breakdown")] pub fn get_breakdown(this: &MemoryMeasurement) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `breakdown` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MemoryMeasurement`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "breakdown")] - fn set_breakdown(this: &MemoryMeasurement, val: &::wasm_bindgen::JsValue); + pub fn set_breakdown(this: &MemoryMeasurement, val: &::wasm_bindgen::JsValue); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `bytes` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "bytes")] pub fn get_bytes(this: &MemoryMeasurement) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `bytes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MemoryMeasurement`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "bytes")] - fn set_bytes(this: &MemoryMeasurement, val: f64); + pub fn set_bytes(this: &MemoryMeasurement, val: f64); } #[cfg(web_sys_unstable_apis)] impl MemoryMeasurement { @@ -51,23 +65,13 @@ impl MemoryMeasurement { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `breakdown` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MemoryMeasurement`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_breakdown()` instead."] pub fn breakdown(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_breakdown(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `bytes` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MemoryMeasurement`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_bytes()` instead."] pub fn bytes(&mut self, val: f64) -> &mut Self { self.set_bytes(val); self diff --git a/crates/web-sys/src/features/gen_MessageEventInit.rs b/crates/web-sys/src/features/gen_MessageEventInit.rs index e24fc14486d7..82a6cfe5cec0 100644 --- a/crates/web-sys/src/features/gen_MessageEventInit.rs +++ b/crates/web-sys/src/features/gen_MessageEventInit.rs @@ -15,57 +15,81 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &MessageEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &MessageEventInit, val: bool); + pub fn set_bubbles(this: &MessageEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &MessageEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &MessageEventInit, val: bool); + pub fn set_cancelable(this: &MessageEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &MessageEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &MessageEventInit, val: bool); + pub fn set_composed(this: &MessageEventInit, val: bool); #[doc = "Get the `data` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] #[wasm_bindgen(method, getter = "data")] pub fn get_data(this: &MessageEventInit) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] #[wasm_bindgen(method, setter = "data")] - fn set_data(this: &MessageEventInit, val: &::wasm_bindgen::JsValue); + pub fn set_data(this: &MessageEventInit, val: &::wasm_bindgen::JsValue); #[doc = "Get the `lastEventId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] #[wasm_bindgen(method, getter = "lastEventId")] pub fn get_last_event_id(this: &MessageEventInit) -> Option; + #[doc = "Change the `lastEventId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] #[wasm_bindgen(method, setter = "lastEventId")] - fn set_last_event_id(this: &MessageEventInit, val: &str); + pub fn set_last_event_id(this: &MessageEventInit, val: &str); #[doc = "Get the `origin` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] #[wasm_bindgen(method, getter = "origin")] pub fn get_origin(this: &MessageEventInit) -> Option; + #[doc = "Change the `origin` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] #[wasm_bindgen(method, setter = "origin")] - fn set_origin(this: &MessageEventInit, val: &str); + pub fn set_origin(this: &MessageEventInit, val: &str); #[doc = "Get the `ports` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] #[wasm_bindgen(method, getter = "ports")] pub fn get_ports(this: &MessageEventInit) -> Option<::js_sys::Array>; + #[doc = "Change the `ports` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] #[wasm_bindgen(method, setter = "ports")] - fn set_ports(this: &MessageEventInit, val: &::wasm_bindgen::JsValue); + pub fn set_ports(this: &MessageEventInit, val: &::wasm_bindgen::JsValue); #[doc = "Get the `source` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] #[wasm_bindgen(method, getter = "source")] pub fn get_source(this: &MessageEventInit) -> Option<::js_sys::Object>; + #[doc = "Change the `source` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] #[wasm_bindgen(method, setter = "source")] - fn set_source(this: &MessageEventInit, val: Option<&::js_sys::Object>); + pub fn set_source(this: &MessageEventInit, val: Option<&::js_sys::Object>); } impl MessageEventInit { #[doc = "Construct a new `MessageEventInit`."] @@ -76,58 +100,42 @@ impl MessageEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } - #[doc = "Change the `data` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] + #[deprecated = "Use `set_data()` instead."] pub fn data(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_data(val); self } - #[doc = "Change the `lastEventId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] + #[deprecated = "Use `set_last_event_id()` instead."] pub fn last_event_id(&mut self, val: &str) -> &mut Self { self.set_last_event_id(val); self } - #[doc = "Change the `origin` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] + #[deprecated = "Use `set_origin()` instead."] pub fn origin(&mut self, val: &str) -> &mut Self { self.set_origin(val); self } - #[doc = "Change the `ports` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] + #[deprecated = "Use `set_ports()` instead."] pub fn ports(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_ports(val); self } - #[doc = "Change the `source` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] + #[deprecated = "Use `set_source()` instead."] pub fn source(&mut self, val: Option<&::js_sys::Object>) -> &mut Self { self.set_source(val); self diff --git a/crates/web-sys/src/features/gen_MidiConnectionEventInit.rs b/crates/web-sys/src/features/gen_MidiConnectionEventInit.rs index f6af7152017f..97410953386b 100644 --- a/crates/web-sys/src/features/gen_MidiConnectionEventInit.rs +++ b/crates/web-sys/src/features/gen_MidiConnectionEventInit.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `MidiConnectionEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &MidiConnectionEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MidiConnectionEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &MidiConnectionEventInit, val: bool); + pub fn set_bubbles(this: &MidiConnectionEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MidiConnectionEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &MidiConnectionEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MidiConnectionEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &MidiConnectionEventInit, val: bool); + pub fn set_cancelable(this: &MidiConnectionEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MidiConnectionEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &MidiConnectionEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MidiConnectionEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &MidiConnectionEventInit, val: bool); + pub fn set_composed(this: &MidiConnectionEventInit, val: bool); #[cfg(feature = "MidiPort")] #[doc = "Get the `port` field of this object."] #[doc = ""] @@ -38,8 +47,11 @@ extern "C" { #[wasm_bindgen(method, getter = "port")] pub fn get_port(this: &MidiConnectionEventInit) -> Option; #[cfg(feature = "MidiPort")] + #[doc = "Change the `port` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MidiConnectionEventInit`, `MidiPort`*"] #[wasm_bindgen(method, setter = "port")] - fn set_port(this: &MidiConnectionEventInit, val: Option<&MidiPort>); + pub fn set_port(this: &MidiConnectionEventInit, val: Option<&MidiPort>); } impl MidiConnectionEventInit { #[doc = "Construct a new `MidiConnectionEventInit`."] @@ -50,31 +62,23 @@ impl MidiConnectionEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MidiConnectionEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MidiConnectionEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MidiConnectionEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } #[cfg(feature = "MidiPort")] - #[doc = "Change the `port` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MidiConnectionEventInit`, `MidiPort`*"] + #[deprecated = "Use `set_port()` instead."] pub fn port(&mut self, val: Option<&MidiPort>) -> &mut Self { self.set_port(val); self diff --git a/crates/web-sys/src/features/gen_MidiMessageEventInit.rs b/crates/web-sys/src/features/gen_MidiMessageEventInit.rs index 63781f08cd55..9ea620bda4a4 100644 --- a/crates/web-sys/src/features/gen_MidiMessageEventInit.rs +++ b/crates/web-sys/src/features/gen_MidiMessageEventInit.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `MidiMessageEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &MidiMessageEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MidiMessageEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &MidiMessageEventInit, val: bool); + pub fn set_bubbles(this: &MidiMessageEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MidiMessageEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &MidiMessageEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MidiMessageEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &MidiMessageEventInit, val: bool); + pub fn set_cancelable(this: &MidiMessageEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MidiMessageEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &MidiMessageEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MidiMessageEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &MidiMessageEventInit, val: bool); + pub fn set_composed(this: &MidiMessageEventInit, val: bool); } impl MidiMessageEventInit { #[doc = "Construct a new `MidiMessageEventInit`."] @@ -41,23 +50,17 @@ impl MidiMessageEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MidiMessageEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MidiMessageEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MidiMessageEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self diff --git a/crates/web-sys/src/features/gen_MidiOptions.rs b/crates/web-sys/src/features/gen_MidiOptions.rs index ec3495a565ca..3404891355a8 100644 --- a/crates/web-sys/src/features/gen_MidiOptions.rs +++ b/crates/web-sys/src/features/gen_MidiOptions.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `MidiOptions`*"] #[wasm_bindgen(method, getter = "software")] pub fn get_software(this: &MidiOptions) -> Option; + #[doc = "Change the `software` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MidiOptions`*"] #[wasm_bindgen(method, setter = "software")] - fn set_software(this: &MidiOptions, val: bool); + pub fn set_software(this: &MidiOptions, val: bool); #[doc = "Get the `sysex` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MidiOptions`*"] #[wasm_bindgen(method, getter = "sysex")] pub fn get_sysex(this: &MidiOptions) -> Option; + #[doc = "Change the `sysex` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MidiOptions`*"] #[wasm_bindgen(method, setter = "sysex")] - fn set_sysex(this: &MidiOptions, val: bool); + pub fn set_sysex(this: &MidiOptions, val: bool); } impl MidiOptions { #[doc = "Construct a new `MidiOptions`."] @@ -34,16 +40,12 @@ impl MidiOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `software` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MidiOptions`*"] + #[deprecated = "Use `set_software()` instead."] pub fn software(&mut self, val: bool) -> &mut Self { self.set_software(val); self } - #[doc = "Change the `sysex` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MidiOptions`*"] + #[deprecated = "Use `set_sysex()` instead."] pub fn sysex(&mut self, val: bool) -> &mut Self { self.set_sysex(val); self diff --git a/crates/web-sys/src/features/gen_MouseEventInit.rs b/crates/web-sys/src/features/gen_MouseEventInit.rs index e1b81e328740..61220cd75364 100644 --- a/crates/web-sys/src/features/gen_MouseEventInit.rs +++ b/crates/web-sys/src/features/gen_MouseEventInit.rs @@ -15,29 +15,41 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &MouseEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &MouseEventInit, val: bool); + pub fn set_bubbles(this: &MouseEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &MouseEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &MouseEventInit, val: bool); + pub fn set_cancelable(this: &MouseEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &MouseEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &MouseEventInit, val: bool); + pub fn set_composed(this: &MouseEventInit, val: bool); #[doc = "Get the `detail` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, getter = "detail")] pub fn get_detail(this: &MouseEventInit) -> Option; + #[doc = "Change the `detail` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, setter = "detail")] - fn set_detail(this: &MouseEventInit, val: i32); + pub fn set_detail(this: &MouseEventInit, val: i32); #[cfg(feature = "Window")] #[doc = "Get the `view` field of this object."] #[doc = ""] @@ -45,141 +57,201 @@ extern "C" { #[wasm_bindgen(method, getter = "view")] pub fn get_view(this: &MouseEventInit) -> Option; #[cfg(feature = "Window")] + #[doc = "Change the `view` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`, `Window`*"] #[wasm_bindgen(method, setter = "view")] - fn set_view(this: &MouseEventInit, val: Option<&Window>); + pub fn set_view(this: &MouseEventInit, val: Option<&Window>); #[doc = "Get the `altKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, getter = "altKey")] pub fn get_alt_key(this: &MouseEventInit) -> Option; + #[doc = "Change the `altKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, setter = "altKey")] - fn set_alt_key(this: &MouseEventInit, val: bool); + pub fn set_alt_key(this: &MouseEventInit, val: bool); #[doc = "Get the `ctrlKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, getter = "ctrlKey")] pub fn get_ctrl_key(this: &MouseEventInit) -> Option; + #[doc = "Change the `ctrlKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, setter = "ctrlKey")] - fn set_ctrl_key(this: &MouseEventInit, val: bool); + pub fn set_ctrl_key(this: &MouseEventInit, val: bool); #[doc = "Get the `metaKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, getter = "metaKey")] pub fn get_meta_key(this: &MouseEventInit) -> Option; + #[doc = "Change the `metaKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, setter = "metaKey")] - fn set_meta_key(this: &MouseEventInit, val: bool); + pub fn set_meta_key(this: &MouseEventInit, val: bool); #[doc = "Get the `modifierAltGraph` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, getter = "modifierAltGraph")] pub fn get_modifier_alt_graph(this: &MouseEventInit) -> Option; + #[doc = "Change the `modifierAltGraph` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, setter = "modifierAltGraph")] - fn set_modifier_alt_graph(this: &MouseEventInit, val: bool); + pub fn set_modifier_alt_graph(this: &MouseEventInit, val: bool); #[doc = "Get the `modifierCapsLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, getter = "modifierCapsLock")] pub fn get_modifier_caps_lock(this: &MouseEventInit) -> Option; + #[doc = "Change the `modifierCapsLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, setter = "modifierCapsLock")] - fn set_modifier_caps_lock(this: &MouseEventInit, val: bool); + pub fn set_modifier_caps_lock(this: &MouseEventInit, val: bool); #[doc = "Get the `modifierFn` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, getter = "modifierFn")] pub fn get_modifier_fn(this: &MouseEventInit) -> Option; + #[doc = "Change the `modifierFn` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, setter = "modifierFn")] - fn set_modifier_fn(this: &MouseEventInit, val: bool); + pub fn set_modifier_fn(this: &MouseEventInit, val: bool); #[doc = "Get the `modifierFnLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, getter = "modifierFnLock")] pub fn get_modifier_fn_lock(this: &MouseEventInit) -> Option; + #[doc = "Change the `modifierFnLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, setter = "modifierFnLock")] - fn set_modifier_fn_lock(this: &MouseEventInit, val: bool); + pub fn set_modifier_fn_lock(this: &MouseEventInit, val: bool); #[doc = "Get the `modifierNumLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, getter = "modifierNumLock")] pub fn get_modifier_num_lock(this: &MouseEventInit) -> Option; + #[doc = "Change the `modifierNumLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, setter = "modifierNumLock")] - fn set_modifier_num_lock(this: &MouseEventInit, val: bool); + pub fn set_modifier_num_lock(this: &MouseEventInit, val: bool); #[doc = "Get the `modifierOS` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, getter = "modifierOS")] pub fn get_modifier_os(this: &MouseEventInit) -> Option; + #[doc = "Change the `modifierOS` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, setter = "modifierOS")] - fn set_modifier_os(this: &MouseEventInit, val: bool); + pub fn set_modifier_os(this: &MouseEventInit, val: bool); #[doc = "Get the `modifierScrollLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, getter = "modifierScrollLock")] pub fn get_modifier_scroll_lock(this: &MouseEventInit) -> Option; + #[doc = "Change the `modifierScrollLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, setter = "modifierScrollLock")] - fn set_modifier_scroll_lock(this: &MouseEventInit, val: bool); + pub fn set_modifier_scroll_lock(this: &MouseEventInit, val: bool); #[doc = "Get the `modifierSymbol` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, getter = "modifierSymbol")] pub fn get_modifier_symbol(this: &MouseEventInit) -> Option; + #[doc = "Change the `modifierSymbol` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, setter = "modifierSymbol")] - fn set_modifier_symbol(this: &MouseEventInit, val: bool); + pub fn set_modifier_symbol(this: &MouseEventInit, val: bool); #[doc = "Get the `modifierSymbolLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, getter = "modifierSymbolLock")] pub fn get_modifier_symbol_lock(this: &MouseEventInit) -> Option; + #[doc = "Change the `modifierSymbolLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, setter = "modifierSymbolLock")] - fn set_modifier_symbol_lock(this: &MouseEventInit, val: bool); + pub fn set_modifier_symbol_lock(this: &MouseEventInit, val: bool); #[doc = "Get the `shiftKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, getter = "shiftKey")] pub fn get_shift_key(this: &MouseEventInit) -> Option; + #[doc = "Change the `shiftKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, setter = "shiftKey")] - fn set_shift_key(this: &MouseEventInit, val: bool); + pub fn set_shift_key(this: &MouseEventInit, val: bool); #[doc = "Get the `button` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, getter = "button")] pub fn get_button(this: &MouseEventInit) -> Option; + #[doc = "Change the `button` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, setter = "button")] - fn set_button(this: &MouseEventInit, val: i16); + pub fn set_button(this: &MouseEventInit, val: i16); #[doc = "Get the `buttons` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, getter = "buttons")] pub fn get_buttons(this: &MouseEventInit) -> Option; + #[doc = "Change the `buttons` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, setter = "buttons")] - fn set_buttons(this: &MouseEventInit, val: u16); + pub fn set_buttons(this: &MouseEventInit, val: u16); #[doc = "Get the `clientX` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, getter = "clientX")] pub fn get_client_x(this: &MouseEventInit) -> Option; + #[doc = "Change the `clientX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, setter = "clientX")] - fn set_client_x(this: &MouseEventInit, val: i32); + pub fn set_client_x(this: &MouseEventInit, val: i32); #[doc = "Get the `clientY` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, getter = "clientY")] pub fn get_client_y(this: &MouseEventInit) -> Option; + #[doc = "Change the `clientY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, setter = "clientY")] - fn set_client_y(this: &MouseEventInit, val: i32); + pub fn set_client_y(this: &MouseEventInit, val: i32); #[doc = "Get the `movementX` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, getter = "movementX")] pub fn get_movement_x(this: &MouseEventInit) -> Option; + #[doc = "Change the `movementX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, setter = "movementX")] - fn set_movement_x(this: &MouseEventInit, val: i32); + pub fn set_movement_x(this: &MouseEventInit, val: i32); #[doc = "Get the `movementY` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, getter = "movementY")] pub fn get_movement_y(this: &MouseEventInit) -> Option; + #[doc = "Change the `movementY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, setter = "movementY")] - fn set_movement_y(this: &MouseEventInit, val: i32); + pub fn set_movement_y(this: &MouseEventInit, val: i32); #[cfg(feature = "EventTarget")] #[doc = "Get the `relatedTarget` field of this object."] #[doc = ""] @@ -187,22 +259,31 @@ extern "C" { #[wasm_bindgen(method, getter = "relatedTarget")] pub fn get_related_target(this: &MouseEventInit) -> Option; #[cfg(feature = "EventTarget")] + #[doc = "Change the `relatedTarget` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventTarget`, `MouseEventInit`*"] #[wasm_bindgen(method, setter = "relatedTarget")] - fn set_related_target(this: &MouseEventInit, val: Option<&EventTarget>); + pub fn set_related_target(this: &MouseEventInit, val: Option<&EventTarget>); #[doc = "Get the `screenX` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, getter = "screenX")] pub fn get_screen_x(this: &MouseEventInit) -> Option; + #[doc = "Change the `screenX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, setter = "screenX")] - fn set_screen_x(this: &MouseEventInit, val: i32); + pub fn set_screen_x(this: &MouseEventInit, val: i32); #[doc = "Get the `screenY` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, getter = "screenY")] pub fn get_screen_y(this: &MouseEventInit) -> Option; + #[doc = "Change the `screenY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, setter = "screenY")] - fn set_screen_y(this: &MouseEventInit, val: i32); + pub fn set_screen_y(this: &MouseEventInit, val: i32); } impl MouseEventInit { #[doc = "Construct a new `MouseEventInit`."] @@ -213,193 +294,139 @@ impl MouseEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } - #[doc = "Change the `detail` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[deprecated = "Use `set_detail()` instead."] pub fn detail(&mut self, val: i32) -> &mut Self { self.set_detail(val); self } #[cfg(feature = "Window")] - #[doc = "Change the `view` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`, `Window`*"] + #[deprecated = "Use `set_view()` instead."] pub fn view(&mut self, val: Option<&Window>) -> &mut Self { self.set_view(val); self } - #[doc = "Change the `altKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[deprecated = "Use `set_alt_key()` instead."] pub fn alt_key(&mut self, val: bool) -> &mut Self { self.set_alt_key(val); self } - #[doc = "Change the `ctrlKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[deprecated = "Use `set_ctrl_key()` instead."] pub fn ctrl_key(&mut self, val: bool) -> &mut Self { self.set_ctrl_key(val); self } - #[doc = "Change the `metaKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[deprecated = "Use `set_meta_key()` instead."] pub fn meta_key(&mut self, val: bool) -> &mut Self { self.set_meta_key(val); self } - #[doc = "Change the `modifierAltGraph` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[deprecated = "Use `set_modifier_alt_graph()` instead."] pub fn modifier_alt_graph(&mut self, val: bool) -> &mut Self { self.set_modifier_alt_graph(val); self } - #[doc = "Change the `modifierCapsLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[deprecated = "Use `set_modifier_caps_lock()` instead."] pub fn modifier_caps_lock(&mut self, val: bool) -> &mut Self { self.set_modifier_caps_lock(val); self } - #[doc = "Change the `modifierFn` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[deprecated = "Use `set_modifier_fn()` instead."] pub fn modifier_fn(&mut self, val: bool) -> &mut Self { self.set_modifier_fn(val); self } - #[doc = "Change the `modifierFnLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[deprecated = "Use `set_modifier_fn_lock()` instead."] pub fn modifier_fn_lock(&mut self, val: bool) -> &mut Self { self.set_modifier_fn_lock(val); self } - #[doc = "Change the `modifierNumLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[deprecated = "Use `set_modifier_num_lock()` instead."] pub fn modifier_num_lock(&mut self, val: bool) -> &mut Self { self.set_modifier_num_lock(val); self } - #[doc = "Change the `modifierOS` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[deprecated = "Use `set_modifier_os()` instead."] pub fn modifier_os(&mut self, val: bool) -> &mut Self { self.set_modifier_os(val); self } - #[doc = "Change the `modifierScrollLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[deprecated = "Use `set_modifier_scroll_lock()` instead."] pub fn modifier_scroll_lock(&mut self, val: bool) -> &mut Self { self.set_modifier_scroll_lock(val); self } - #[doc = "Change the `modifierSymbol` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[deprecated = "Use `set_modifier_symbol()` instead."] pub fn modifier_symbol(&mut self, val: bool) -> &mut Self { self.set_modifier_symbol(val); self } - #[doc = "Change the `modifierSymbolLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[deprecated = "Use `set_modifier_symbol_lock()` instead."] pub fn modifier_symbol_lock(&mut self, val: bool) -> &mut Self { self.set_modifier_symbol_lock(val); self } - #[doc = "Change the `shiftKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[deprecated = "Use `set_shift_key()` instead."] pub fn shift_key(&mut self, val: bool) -> &mut Self { self.set_shift_key(val); self } - #[doc = "Change the `button` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[deprecated = "Use `set_button()` instead."] pub fn button(&mut self, val: i16) -> &mut Self { self.set_button(val); self } - #[doc = "Change the `buttons` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[deprecated = "Use `set_buttons()` instead."] pub fn buttons(&mut self, val: u16) -> &mut Self { self.set_buttons(val); self } - #[doc = "Change the `clientX` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[deprecated = "Use `set_client_x()` instead."] pub fn client_x(&mut self, val: i32) -> &mut Self { self.set_client_x(val); self } - #[doc = "Change the `clientY` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[deprecated = "Use `set_client_y()` instead."] pub fn client_y(&mut self, val: i32) -> &mut Self { self.set_client_y(val); self } - #[doc = "Change the `movementX` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[deprecated = "Use `set_movement_x()` instead."] pub fn movement_x(&mut self, val: i32) -> &mut Self { self.set_movement_x(val); self } - #[doc = "Change the `movementY` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[deprecated = "Use `set_movement_y()` instead."] pub fn movement_y(&mut self, val: i32) -> &mut Self { self.set_movement_y(val); self } #[cfg(feature = "EventTarget")] - #[doc = "Change the `relatedTarget` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventTarget`, `MouseEventInit`*"] + #[deprecated = "Use `set_related_target()` instead."] pub fn related_target(&mut self, val: Option<&EventTarget>) -> &mut Self { self.set_related_target(val); self } - #[doc = "Change the `screenX` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[deprecated = "Use `set_screen_x()` instead."] pub fn screen_x(&mut self, val: i32) -> &mut Self { self.set_screen_x(val); self } - #[doc = "Change the `screenY` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[deprecated = "Use `set_screen_y()` instead."] pub fn screen_y(&mut self, val: i32) -> &mut Self { self.set_screen_y(val); self diff --git a/crates/web-sys/src/features/gen_MutationObserverInit.rs b/crates/web-sys/src/features/gen_MutationObserverInit.rs index f10514555cba..69ac7cf001d0 100644 --- a/crates/web-sys/src/features/gen_MutationObserverInit.rs +++ b/crates/web-sys/src/features/gen_MutationObserverInit.rs @@ -15,64 +15,91 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] #[wasm_bindgen(method, getter = "animations")] pub fn get_animations(this: &MutationObserverInit) -> Option; + #[doc = "Change the `animations` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] #[wasm_bindgen(method, setter = "animations")] - fn set_animations(this: &MutationObserverInit, val: bool); + pub fn set_animations(this: &MutationObserverInit, val: bool); #[doc = "Get the `attributeFilter` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] #[wasm_bindgen(method, getter = "attributeFilter")] pub fn get_attribute_filter(this: &MutationObserverInit) -> Option<::js_sys::Array>; + #[doc = "Change the `attributeFilter` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] #[wasm_bindgen(method, setter = "attributeFilter")] - fn set_attribute_filter(this: &MutationObserverInit, val: &::wasm_bindgen::JsValue); + pub fn set_attribute_filter(this: &MutationObserverInit, val: &::wasm_bindgen::JsValue); #[doc = "Get the `attributeOldValue` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] #[wasm_bindgen(method, getter = "attributeOldValue")] pub fn get_attribute_old_value(this: &MutationObserverInit) -> Option; + #[doc = "Change the `attributeOldValue` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] #[wasm_bindgen(method, setter = "attributeOldValue")] - fn set_attribute_old_value(this: &MutationObserverInit, val: bool); + pub fn set_attribute_old_value(this: &MutationObserverInit, val: bool); #[doc = "Get the `attributes` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] #[wasm_bindgen(method, getter = "attributes")] pub fn get_attributes(this: &MutationObserverInit) -> Option; + #[doc = "Change the `attributes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] #[wasm_bindgen(method, setter = "attributes")] - fn set_attributes(this: &MutationObserverInit, val: bool); + pub fn set_attributes(this: &MutationObserverInit, val: bool); #[doc = "Get the `characterData` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] #[wasm_bindgen(method, getter = "characterData")] pub fn get_character_data(this: &MutationObserverInit) -> Option; + #[doc = "Change the `characterData` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] #[wasm_bindgen(method, setter = "characterData")] - fn set_character_data(this: &MutationObserverInit, val: bool); + pub fn set_character_data(this: &MutationObserverInit, val: bool); #[doc = "Get the `characterDataOldValue` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] #[wasm_bindgen(method, getter = "characterDataOldValue")] pub fn get_character_data_old_value(this: &MutationObserverInit) -> Option; + #[doc = "Change the `characterDataOldValue` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] #[wasm_bindgen(method, setter = "characterDataOldValue")] - fn set_character_data_old_value(this: &MutationObserverInit, val: bool); + pub fn set_character_data_old_value(this: &MutationObserverInit, val: bool); #[doc = "Get the `childList` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] #[wasm_bindgen(method, getter = "childList")] pub fn get_child_list(this: &MutationObserverInit) -> Option; + #[doc = "Change the `childList` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] #[wasm_bindgen(method, setter = "childList")] - fn set_child_list(this: &MutationObserverInit, val: bool); + pub fn set_child_list(this: &MutationObserverInit, val: bool); #[doc = "Get the `nativeAnonymousChildList` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] #[wasm_bindgen(method, getter = "nativeAnonymousChildList")] pub fn get_native_anonymous_child_list(this: &MutationObserverInit) -> Option; + #[doc = "Change the `nativeAnonymousChildList` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] #[wasm_bindgen(method, setter = "nativeAnonymousChildList")] - fn set_native_anonymous_child_list(this: &MutationObserverInit, val: bool); + pub fn set_native_anonymous_child_list(this: &MutationObserverInit, val: bool); #[doc = "Get the `subtree` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] #[wasm_bindgen(method, getter = "subtree")] pub fn get_subtree(this: &MutationObserverInit) -> Option; + #[doc = "Change the `subtree` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] #[wasm_bindgen(method, setter = "subtree")] - fn set_subtree(this: &MutationObserverInit, val: bool); + pub fn set_subtree(this: &MutationObserverInit, val: bool); } impl MutationObserverInit { #[doc = "Construct a new `MutationObserverInit`."] @@ -83,65 +110,47 @@ impl MutationObserverInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `animations` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] + #[deprecated = "Use `set_animations()` instead."] pub fn animations(&mut self, val: bool) -> &mut Self { self.set_animations(val); self } - #[doc = "Change the `attributeFilter` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] + #[deprecated = "Use `set_attribute_filter()` instead."] pub fn attribute_filter(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_attribute_filter(val); self } - #[doc = "Change the `attributeOldValue` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] + #[deprecated = "Use `set_attribute_old_value()` instead."] pub fn attribute_old_value(&mut self, val: bool) -> &mut Self { self.set_attribute_old_value(val); self } - #[doc = "Change the `attributes` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] + #[deprecated = "Use `set_attributes()` instead."] pub fn attributes(&mut self, val: bool) -> &mut Self { self.set_attributes(val); self } - #[doc = "Change the `characterData` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] + #[deprecated = "Use `set_character_data()` instead."] pub fn character_data(&mut self, val: bool) -> &mut Self { self.set_character_data(val); self } - #[doc = "Change the `characterDataOldValue` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] + #[deprecated = "Use `set_character_data_old_value()` instead."] pub fn character_data_old_value(&mut self, val: bool) -> &mut Self { self.set_character_data_old_value(val); self } - #[doc = "Change the `childList` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] + #[deprecated = "Use `set_child_list()` instead."] pub fn child_list(&mut self, val: bool) -> &mut Self { self.set_child_list(val); self } - #[doc = "Change the `nativeAnonymousChildList` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] + #[deprecated = "Use `set_native_anonymous_child_list()` instead."] pub fn native_anonymous_child_list(&mut self, val: bool) -> &mut Self { self.set_native_anonymous_child_list(val); self } - #[doc = "Change the `subtree` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] + #[deprecated = "Use `set_subtree()` instead."] pub fn subtree(&mut self, val: bool) -> &mut Self { self.set_subtree(val); self diff --git a/crates/web-sys/src/features/gen_MutationObservingInfo.rs b/crates/web-sys/src/features/gen_MutationObservingInfo.rs index a50f3c40ea00..6d6aceb05142 100644 --- a/crates/web-sys/src/features/gen_MutationObservingInfo.rs +++ b/crates/web-sys/src/features/gen_MutationObservingInfo.rs @@ -15,64 +15,91 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] #[wasm_bindgen(method, getter = "animations")] pub fn get_animations(this: &MutationObservingInfo) -> Option; + #[doc = "Change the `animations` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] #[wasm_bindgen(method, setter = "animations")] - fn set_animations(this: &MutationObservingInfo, val: bool); + pub fn set_animations(this: &MutationObservingInfo, val: bool); #[doc = "Get the `attributeFilter` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] #[wasm_bindgen(method, getter = "attributeFilter")] pub fn get_attribute_filter(this: &MutationObservingInfo) -> Option<::js_sys::Array>; + #[doc = "Change the `attributeFilter` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] #[wasm_bindgen(method, setter = "attributeFilter")] - fn set_attribute_filter(this: &MutationObservingInfo, val: &::wasm_bindgen::JsValue); + pub fn set_attribute_filter(this: &MutationObservingInfo, val: &::wasm_bindgen::JsValue); #[doc = "Get the `attributeOldValue` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] #[wasm_bindgen(method, getter = "attributeOldValue")] pub fn get_attribute_old_value(this: &MutationObservingInfo) -> Option; + #[doc = "Change the `attributeOldValue` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] #[wasm_bindgen(method, setter = "attributeOldValue")] - fn set_attribute_old_value(this: &MutationObservingInfo, val: bool); + pub fn set_attribute_old_value(this: &MutationObservingInfo, val: bool); #[doc = "Get the `attributes` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] #[wasm_bindgen(method, getter = "attributes")] pub fn get_attributes(this: &MutationObservingInfo) -> Option; + #[doc = "Change the `attributes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] #[wasm_bindgen(method, setter = "attributes")] - fn set_attributes(this: &MutationObservingInfo, val: bool); + pub fn set_attributes(this: &MutationObservingInfo, val: bool); #[doc = "Get the `characterData` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] #[wasm_bindgen(method, getter = "characterData")] pub fn get_character_data(this: &MutationObservingInfo) -> Option; + #[doc = "Change the `characterData` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] #[wasm_bindgen(method, setter = "characterData")] - fn set_character_data(this: &MutationObservingInfo, val: bool); + pub fn set_character_data(this: &MutationObservingInfo, val: bool); #[doc = "Get the `characterDataOldValue` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] #[wasm_bindgen(method, getter = "characterDataOldValue")] pub fn get_character_data_old_value(this: &MutationObservingInfo) -> Option; + #[doc = "Change the `characterDataOldValue` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] #[wasm_bindgen(method, setter = "characterDataOldValue")] - fn set_character_data_old_value(this: &MutationObservingInfo, val: bool); + pub fn set_character_data_old_value(this: &MutationObservingInfo, val: bool); #[doc = "Get the `childList` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] #[wasm_bindgen(method, getter = "childList")] pub fn get_child_list(this: &MutationObservingInfo) -> Option; + #[doc = "Change the `childList` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] #[wasm_bindgen(method, setter = "childList")] - fn set_child_list(this: &MutationObservingInfo, val: bool); + pub fn set_child_list(this: &MutationObservingInfo, val: bool); #[doc = "Get the `nativeAnonymousChildList` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] #[wasm_bindgen(method, getter = "nativeAnonymousChildList")] pub fn get_native_anonymous_child_list(this: &MutationObservingInfo) -> Option; + #[doc = "Change the `nativeAnonymousChildList` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] #[wasm_bindgen(method, setter = "nativeAnonymousChildList")] - fn set_native_anonymous_child_list(this: &MutationObservingInfo, val: bool); + pub fn set_native_anonymous_child_list(this: &MutationObservingInfo, val: bool); #[doc = "Get the `subtree` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] #[wasm_bindgen(method, getter = "subtree")] pub fn get_subtree(this: &MutationObservingInfo) -> Option; + #[doc = "Change the `subtree` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] #[wasm_bindgen(method, setter = "subtree")] - fn set_subtree(this: &MutationObservingInfo, val: bool); + pub fn set_subtree(this: &MutationObservingInfo, val: bool); #[cfg(feature = "Node")] #[doc = "Get the `observedNode` field of this object."] #[doc = ""] @@ -80,8 +107,11 @@ extern "C" { #[wasm_bindgen(method, getter = "observedNode")] pub fn get_observed_node(this: &MutationObservingInfo) -> Option; #[cfg(feature = "Node")] + #[doc = "Change the `observedNode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`, `Node`*"] #[wasm_bindgen(method, setter = "observedNode")] - fn set_observed_node(this: &MutationObservingInfo, val: Option<&Node>); + pub fn set_observed_node(this: &MutationObservingInfo, val: Option<&Node>); } impl MutationObservingInfo { #[doc = "Construct a new `MutationObservingInfo`."] @@ -92,73 +122,53 @@ impl MutationObservingInfo { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `animations` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] + #[deprecated = "Use `set_animations()` instead."] pub fn animations(&mut self, val: bool) -> &mut Self { self.set_animations(val); self } - #[doc = "Change the `attributeFilter` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] + #[deprecated = "Use `set_attribute_filter()` instead."] pub fn attribute_filter(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_attribute_filter(val); self } - #[doc = "Change the `attributeOldValue` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] + #[deprecated = "Use `set_attribute_old_value()` instead."] pub fn attribute_old_value(&mut self, val: bool) -> &mut Self { self.set_attribute_old_value(val); self } - #[doc = "Change the `attributes` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] + #[deprecated = "Use `set_attributes()` instead."] pub fn attributes(&mut self, val: bool) -> &mut Self { self.set_attributes(val); self } - #[doc = "Change the `characterData` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] + #[deprecated = "Use `set_character_data()` instead."] pub fn character_data(&mut self, val: bool) -> &mut Self { self.set_character_data(val); self } - #[doc = "Change the `characterDataOldValue` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] + #[deprecated = "Use `set_character_data_old_value()` instead."] pub fn character_data_old_value(&mut self, val: bool) -> &mut Self { self.set_character_data_old_value(val); self } - #[doc = "Change the `childList` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] + #[deprecated = "Use `set_child_list()` instead."] pub fn child_list(&mut self, val: bool) -> &mut Self { self.set_child_list(val); self } - #[doc = "Change the `nativeAnonymousChildList` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] + #[deprecated = "Use `set_native_anonymous_child_list()` instead."] pub fn native_anonymous_child_list(&mut self, val: bool) -> &mut Self { self.set_native_anonymous_child_list(val); self } - #[doc = "Change the `subtree` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] + #[deprecated = "Use `set_subtree()` instead."] pub fn subtree(&mut self, val: bool) -> &mut Self { self.set_subtree(val); self } #[cfg(feature = "Node")] - #[doc = "Change the `observedNode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`, `Node`*"] + #[deprecated = "Use `set_observed_node()` instead."] pub fn observed_node(&mut self, val: Option<&Node>) -> &mut Self { self.set_observed_node(val); self diff --git a/crates/web-sys/src/features/gen_NativeOsFileReadOptions.rs b/crates/web-sys/src/features/gen_NativeOsFileReadOptions.rs index 6c5decef877a..7f8f52c40f65 100644 --- a/crates/web-sys/src/features/gen_NativeOsFileReadOptions.rs +++ b/crates/web-sys/src/features/gen_NativeOsFileReadOptions.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `NativeOsFileReadOptions`*"] #[wasm_bindgen(method, getter = "bytes")] pub fn get_bytes(this: &NativeOsFileReadOptions) -> Option; + #[doc = "Change the `bytes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NativeOsFileReadOptions`*"] #[wasm_bindgen(method, setter = "bytes")] - fn set_bytes(this: &NativeOsFileReadOptions, val: Option); + pub fn set_bytes(this: &NativeOsFileReadOptions, val: Option); #[doc = "Get the `encoding` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NativeOsFileReadOptions`*"] #[wasm_bindgen(method, getter = "encoding")] pub fn get_encoding(this: &NativeOsFileReadOptions) -> Option; + #[doc = "Change the `encoding` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NativeOsFileReadOptions`*"] #[wasm_bindgen(method, setter = "encoding")] - fn set_encoding(this: &NativeOsFileReadOptions, val: Option<&str>); + pub fn set_encoding(this: &NativeOsFileReadOptions, val: Option<&str>); } impl NativeOsFileReadOptions { #[doc = "Construct a new `NativeOsFileReadOptions`."] @@ -34,16 +40,12 @@ impl NativeOsFileReadOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bytes` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NativeOsFileReadOptions`*"] + #[deprecated = "Use `set_bytes()` instead."] pub fn bytes(&mut self, val: Option) -> &mut Self { self.set_bytes(val); self } - #[doc = "Change the `encoding` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NativeOsFileReadOptions`*"] + #[deprecated = "Use `set_encoding()` instead."] pub fn encoding(&mut self, val: Option<&str>) -> &mut Self { self.set_encoding(val); self diff --git a/crates/web-sys/src/features/gen_NativeOsFileWriteAtomicOptions.rs b/crates/web-sys/src/features/gen_NativeOsFileWriteAtomicOptions.rs index b8a971460cab..6215a0b8529f 100644 --- a/crates/web-sys/src/features/gen_NativeOsFileWriteAtomicOptions.rs +++ b/crates/web-sys/src/features/gen_NativeOsFileWriteAtomicOptions.rs @@ -15,36 +15,51 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"] #[wasm_bindgen(method, getter = "backupTo")] pub fn get_backup_to(this: &NativeOsFileWriteAtomicOptions) -> Option; + #[doc = "Change the `backupTo` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"] #[wasm_bindgen(method, setter = "backupTo")] - fn set_backup_to(this: &NativeOsFileWriteAtomicOptions, val: Option<&str>); + pub fn set_backup_to(this: &NativeOsFileWriteAtomicOptions, val: Option<&str>); #[doc = "Get the `bytes` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"] #[wasm_bindgen(method, getter = "bytes")] pub fn get_bytes(this: &NativeOsFileWriteAtomicOptions) -> Option; + #[doc = "Change the `bytes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"] #[wasm_bindgen(method, setter = "bytes")] - fn set_bytes(this: &NativeOsFileWriteAtomicOptions, val: Option); + pub fn set_bytes(this: &NativeOsFileWriteAtomicOptions, val: Option); #[doc = "Get the `flush` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"] #[wasm_bindgen(method, getter = "flush")] pub fn get_flush(this: &NativeOsFileWriteAtomicOptions) -> Option; + #[doc = "Change the `flush` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"] #[wasm_bindgen(method, setter = "flush")] - fn set_flush(this: &NativeOsFileWriteAtomicOptions, val: bool); + pub fn set_flush(this: &NativeOsFileWriteAtomicOptions, val: bool); #[doc = "Get the `noOverwrite` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"] #[wasm_bindgen(method, getter = "noOverwrite")] pub fn get_no_overwrite(this: &NativeOsFileWriteAtomicOptions) -> Option; + #[doc = "Change the `noOverwrite` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"] #[wasm_bindgen(method, setter = "noOverwrite")] - fn set_no_overwrite(this: &NativeOsFileWriteAtomicOptions, val: bool); + pub fn set_no_overwrite(this: &NativeOsFileWriteAtomicOptions, val: bool); #[doc = "Get the `tmpPath` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"] #[wasm_bindgen(method, getter = "tmpPath")] pub fn get_tmp_path(this: &NativeOsFileWriteAtomicOptions) -> Option; + #[doc = "Change the `tmpPath` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"] #[wasm_bindgen(method, setter = "tmpPath")] - fn set_tmp_path(this: &NativeOsFileWriteAtomicOptions, val: Option<&str>); + pub fn set_tmp_path(this: &NativeOsFileWriteAtomicOptions, val: Option<&str>); } impl NativeOsFileWriteAtomicOptions { #[doc = "Construct a new `NativeOsFileWriteAtomicOptions`."] @@ -55,37 +70,27 @@ impl NativeOsFileWriteAtomicOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `backupTo` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"] + #[deprecated = "Use `set_backup_to()` instead."] pub fn backup_to(&mut self, val: Option<&str>) -> &mut Self { self.set_backup_to(val); self } - #[doc = "Change the `bytes` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"] + #[deprecated = "Use `set_bytes()` instead."] pub fn bytes(&mut self, val: Option) -> &mut Self { self.set_bytes(val); self } - #[doc = "Change the `flush` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"] + #[deprecated = "Use `set_flush()` instead."] pub fn flush(&mut self, val: bool) -> &mut Self { self.set_flush(val); self } - #[doc = "Change the `noOverwrite` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"] + #[deprecated = "Use `set_no_overwrite()` instead."] pub fn no_overwrite(&mut self, val: bool) -> &mut Self { self.set_no_overwrite(val); self } - #[doc = "Change the `tmpPath` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"] + #[deprecated = "Use `set_tmp_path()` instead."] pub fn tmp_path(&mut self, val: Option<&str>) -> &mut Self { self.set_tmp_path(val); self diff --git a/crates/web-sys/src/features/gen_NetworkCommandOptions.rs b/crates/web-sys/src/features/gen_NetworkCommandOptions.rs index f8ed11a28543..0bac6a26bec6 100644 --- a/crates/web-sys/src/features/gen_NetworkCommandOptions.rs +++ b/crates/web-sys/src/features/gen_NetworkCommandOptions.rs @@ -15,302 +15,431 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, getter = "cmd")] pub fn get_cmd(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `cmd` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "cmd")] - fn set_cmd(this: &NetworkCommandOptions, val: &str); + pub fn set_cmd(this: &NetworkCommandOptions, val: &str); #[doc = "Get the `curExternalIfname` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, getter = "curExternalIfname")] pub fn get_cur_external_ifname(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `curExternalIfname` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "curExternalIfname")] - fn set_cur_external_ifname(this: &NetworkCommandOptions, val: &str); + pub fn set_cur_external_ifname(this: &NetworkCommandOptions, val: &str); #[doc = "Get the `curInternalIfname` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, getter = "curInternalIfname")] pub fn get_cur_internal_ifname(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `curInternalIfname` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "curInternalIfname")] - fn set_cur_internal_ifname(this: &NetworkCommandOptions, val: &str); + pub fn set_cur_internal_ifname(this: &NetworkCommandOptions, val: &str); #[doc = "Get the `dns1` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, getter = "dns1")] pub fn get_dns1(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `dns1` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "dns1")] - fn set_dns1(this: &NetworkCommandOptions, val: &str); + pub fn set_dns1(this: &NetworkCommandOptions, val: &str); #[doc = "Get the `dns1_long` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, getter = "dns1_long")] pub fn get_dns1_long(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `dns1_long` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "dns1_long")] - fn set_dns1_long(this: &NetworkCommandOptions, val: i32); + pub fn set_dns1_long(this: &NetworkCommandOptions, val: i32); #[doc = "Get the `dns2` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, getter = "dns2")] pub fn get_dns2(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `dns2` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "dns2")] - fn set_dns2(this: &NetworkCommandOptions, val: &str); + pub fn set_dns2(this: &NetworkCommandOptions, val: &str); #[doc = "Get the `dns2_long` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, getter = "dns2_long")] pub fn get_dns2_long(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `dns2_long` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "dns2_long")] - fn set_dns2_long(this: &NetworkCommandOptions, val: i32); + pub fn set_dns2_long(this: &NetworkCommandOptions, val: i32); #[doc = "Get the `dnses` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, getter = "dnses")] pub fn get_dnses(this: &NetworkCommandOptions) -> Option<::js_sys::Array>; + #[doc = "Change the `dnses` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "dnses")] - fn set_dnses(this: &NetworkCommandOptions, val: &::wasm_bindgen::JsValue); + pub fn set_dnses(this: &NetworkCommandOptions, val: &::wasm_bindgen::JsValue); #[doc = "Get the `domain` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, getter = "domain")] pub fn get_domain(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `domain` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "domain")] - fn set_domain(this: &NetworkCommandOptions, val: &str); + pub fn set_domain(this: &NetworkCommandOptions, val: &str); #[doc = "Get the `enable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, getter = "enable")] pub fn get_enable(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `enable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "enable")] - fn set_enable(this: &NetworkCommandOptions, val: bool); + pub fn set_enable(this: &NetworkCommandOptions, val: bool); #[doc = "Get the `enabled` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, getter = "enabled")] pub fn get_enabled(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `enabled` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "enabled")] - fn set_enabled(this: &NetworkCommandOptions, val: bool); + pub fn set_enabled(this: &NetworkCommandOptions, val: bool); #[doc = "Get the `endIp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, getter = "endIp")] pub fn get_end_ip(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `endIp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "endIp")] - fn set_end_ip(this: &NetworkCommandOptions, val: &str); + pub fn set_end_ip(this: &NetworkCommandOptions, val: &str); #[doc = "Get the `externalIfname` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, getter = "externalIfname")] pub fn get_external_ifname(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `externalIfname` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "externalIfname")] - fn set_external_ifname(this: &NetworkCommandOptions, val: &str); + pub fn set_external_ifname(this: &NetworkCommandOptions, val: &str); #[doc = "Get the `gateway` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, getter = "gateway")] pub fn get_gateway(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `gateway` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "gateway")] - fn set_gateway(this: &NetworkCommandOptions, val: &str); + pub fn set_gateway(this: &NetworkCommandOptions, val: &str); #[doc = "Get the `gateway_long` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, getter = "gateway_long")] pub fn get_gateway_long(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `gateway_long` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "gateway_long")] - fn set_gateway_long(this: &NetworkCommandOptions, val: i32); + pub fn set_gateway_long(this: &NetworkCommandOptions, val: i32); #[doc = "Get the `gateways` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, getter = "gateways")] pub fn get_gateways(this: &NetworkCommandOptions) -> Option<::js_sys::Array>; + #[doc = "Change the `gateways` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "gateways")] - fn set_gateways(this: &NetworkCommandOptions, val: &::wasm_bindgen::JsValue); + pub fn set_gateways(this: &NetworkCommandOptions, val: &::wasm_bindgen::JsValue); #[doc = "Get the `id` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, getter = "id")] pub fn get_id(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "id")] - fn set_id(this: &NetworkCommandOptions, val: i32); + pub fn set_id(this: &NetworkCommandOptions, val: i32); #[doc = "Get the `ifname` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, getter = "ifname")] pub fn get_ifname(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `ifname` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "ifname")] - fn set_ifname(this: &NetworkCommandOptions, val: &str); + pub fn set_ifname(this: &NetworkCommandOptions, val: &str); #[doc = "Get the `interfaceList` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, getter = "interfaceList")] pub fn get_interface_list(this: &NetworkCommandOptions) -> Option<::js_sys::Array>; + #[doc = "Change the `interfaceList` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "interfaceList")] - fn set_interface_list(this: &NetworkCommandOptions, val: &::wasm_bindgen::JsValue); + pub fn set_interface_list(this: &NetworkCommandOptions, val: &::wasm_bindgen::JsValue); #[doc = "Get the `internalIfname` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, getter = "internalIfname")] pub fn get_internal_ifname(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `internalIfname` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "internalIfname")] - fn set_internal_ifname(this: &NetworkCommandOptions, val: &str); + pub fn set_internal_ifname(this: &NetworkCommandOptions, val: &str); #[doc = "Get the `ip` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, getter = "ip")] pub fn get_ip(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `ip` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "ip")] - fn set_ip(this: &NetworkCommandOptions, val: &str); + pub fn set_ip(this: &NetworkCommandOptions, val: &str); #[doc = "Get the `ipaddr` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, getter = "ipaddr")] pub fn get_ipaddr(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `ipaddr` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "ipaddr")] - fn set_ipaddr(this: &NetworkCommandOptions, val: i32); + pub fn set_ipaddr(this: &NetworkCommandOptions, val: i32); #[doc = "Get the `key` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, getter = "key")] pub fn get_key(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `key` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "key")] - fn set_key(this: &NetworkCommandOptions, val: &str); + pub fn set_key(this: &NetworkCommandOptions, val: &str); #[doc = "Get the `link` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, getter = "link")] pub fn get_link(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `link` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "link")] - fn set_link(this: &NetworkCommandOptions, val: &str); + pub fn set_link(this: &NetworkCommandOptions, val: &str); #[doc = "Get the `mask` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, getter = "mask")] pub fn get_mask(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `mask` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "mask")] - fn set_mask(this: &NetworkCommandOptions, val: i32); + pub fn set_mask(this: &NetworkCommandOptions, val: i32); #[doc = "Get the `maskLength` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, getter = "maskLength")] pub fn get_mask_length(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `maskLength` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "maskLength")] - fn set_mask_length(this: &NetworkCommandOptions, val: &str); + pub fn set_mask_length(this: &NetworkCommandOptions, val: &str); #[doc = "Get the `mode` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, getter = "mode")] pub fn get_mode(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `mode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "mode")] - fn set_mode(this: &NetworkCommandOptions, val: &str); + pub fn set_mode(this: &NetworkCommandOptions, val: &str); #[doc = "Get the `mtu` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, getter = "mtu")] pub fn get_mtu(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `mtu` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "mtu")] - fn set_mtu(this: &NetworkCommandOptions, val: i32); + pub fn set_mtu(this: &NetworkCommandOptions, val: i32); #[doc = "Get the `preExternalIfname` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, getter = "preExternalIfname")] pub fn get_pre_external_ifname(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `preExternalIfname` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "preExternalIfname")] - fn set_pre_external_ifname(this: &NetworkCommandOptions, val: &str); + pub fn set_pre_external_ifname(this: &NetworkCommandOptions, val: &str); #[doc = "Get the `preInternalIfname` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, getter = "preInternalIfname")] pub fn get_pre_internal_ifname(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `preInternalIfname` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "preInternalIfname")] - fn set_pre_internal_ifname(this: &NetworkCommandOptions, val: &str); + pub fn set_pre_internal_ifname(this: &NetworkCommandOptions, val: &str); #[doc = "Get the `prefix` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, getter = "prefix")] pub fn get_prefix(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `prefix` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "prefix")] - fn set_prefix(this: &NetworkCommandOptions, val: &str); + pub fn set_prefix(this: &NetworkCommandOptions, val: &str); #[doc = "Get the `prefixLength` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, getter = "prefixLength")] pub fn get_prefix_length(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `prefixLength` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "prefixLength")] - fn set_prefix_length(this: &NetworkCommandOptions, val: u32); + pub fn set_prefix_length(this: &NetworkCommandOptions, val: u32); #[doc = "Get the `report` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, getter = "report")] pub fn get_report(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `report` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "report")] - fn set_report(this: &NetworkCommandOptions, val: bool); + pub fn set_report(this: &NetworkCommandOptions, val: bool); #[doc = "Get the `security` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, getter = "security")] pub fn get_security(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `security` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "security")] - fn set_security(this: &NetworkCommandOptions, val: &str); + pub fn set_security(this: &NetworkCommandOptions, val: &str); #[doc = "Get the `serverIp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, getter = "serverIp")] pub fn get_server_ip(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `serverIp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "serverIp")] - fn set_server_ip(this: &NetworkCommandOptions, val: &str); + pub fn set_server_ip(this: &NetworkCommandOptions, val: &str); #[doc = "Get the `ssid` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, getter = "ssid")] pub fn get_ssid(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `ssid` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "ssid")] - fn set_ssid(this: &NetworkCommandOptions, val: &str); + pub fn set_ssid(this: &NetworkCommandOptions, val: &str); #[doc = "Get the `startIp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, getter = "startIp")] pub fn get_start_ip(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `startIp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "startIp")] - fn set_start_ip(this: &NetworkCommandOptions, val: &str); + pub fn set_start_ip(this: &NetworkCommandOptions, val: &str); #[doc = "Get the `threshold` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, getter = "threshold")] pub fn get_threshold(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `threshold` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "threshold")] - fn set_threshold(this: &NetworkCommandOptions, val: f64); + pub fn set_threshold(this: &NetworkCommandOptions, val: f64); #[doc = "Get the `usbEndIp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, getter = "usbEndIp")] pub fn get_usb_end_ip(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `usbEndIp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "usbEndIp")] - fn set_usb_end_ip(this: &NetworkCommandOptions, val: &str); + pub fn set_usb_end_ip(this: &NetworkCommandOptions, val: &str); #[doc = "Get the `usbStartIp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, getter = "usbStartIp")] pub fn get_usb_start_ip(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `usbStartIp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "usbStartIp")] - fn set_usb_start_ip(this: &NetworkCommandOptions, val: &str); + pub fn set_usb_start_ip(this: &NetworkCommandOptions, val: &str); #[doc = "Get the `wifiEndIp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, getter = "wifiEndIp")] pub fn get_wifi_end_ip(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `wifiEndIp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "wifiEndIp")] - fn set_wifi_end_ip(this: &NetworkCommandOptions, val: &str); + pub fn set_wifi_end_ip(this: &NetworkCommandOptions, val: &str); #[doc = "Get the `wifiStartIp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, getter = "wifiStartIp")] pub fn get_wifi_start_ip(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `wifiStartIp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "wifiStartIp")] - fn set_wifi_start_ip(this: &NetworkCommandOptions, val: &str); + pub fn set_wifi_start_ip(this: &NetworkCommandOptions, val: &str); #[doc = "Get the `wifictrlinterfacename` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, getter = "wifictrlinterfacename")] pub fn get_wifictrlinterfacename(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `wifictrlinterfacename` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "wifictrlinterfacename")] - fn set_wifictrlinterfacename(this: &NetworkCommandOptions, val: &str); + pub fn set_wifictrlinterfacename(this: &NetworkCommandOptions, val: &str); } impl NetworkCommandOptions { #[doc = "Construct a new `NetworkCommandOptions`."] @@ -321,303 +450,217 @@ impl NetworkCommandOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `cmd` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_cmd()` instead."] pub fn cmd(&mut self, val: &str) -> &mut Self { self.set_cmd(val); self } - #[doc = "Change the `curExternalIfname` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_cur_external_ifname()` instead."] pub fn cur_external_ifname(&mut self, val: &str) -> &mut Self { self.set_cur_external_ifname(val); self } - #[doc = "Change the `curInternalIfname` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_cur_internal_ifname()` instead."] pub fn cur_internal_ifname(&mut self, val: &str) -> &mut Self { self.set_cur_internal_ifname(val); self } - #[doc = "Change the `dns1` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_dns1()` instead."] pub fn dns1(&mut self, val: &str) -> &mut Self { self.set_dns1(val); self } - #[doc = "Change the `dns1_long` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_dns1_long()` instead."] pub fn dns1_long(&mut self, val: i32) -> &mut Self { self.set_dns1_long(val); self } - #[doc = "Change the `dns2` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_dns2()` instead."] pub fn dns2(&mut self, val: &str) -> &mut Self { self.set_dns2(val); self } - #[doc = "Change the `dns2_long` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_dns2_long()` instead."] pub fn dns2_long(&mut self, val: i32) -> &mut Self { self.set_dns2_long(val); self } - #[doc = "Change the `dnses` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_dnses()` instead."] pub fn dnses(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_dnses(val); self } - #[doc = "Change the `domain` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_domain()` instead."] pub fn domain(&mut self, val: &str) -> &mut Self { self.set_domain(val); self } - #[doc = "Change the `enable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_enable()` instead."] pub fn enable(&mut self, val: bool) -> &mut Self { self.set_enable(val); self } - #[doc = "Change the `enabled` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_enabled()` instead."] pub fn enabled(&mut self, val: bool) -> &mut Self { self.set_enabled(val); self } - #[doc = "Change the `endIp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_end_ip()` instead."] pub fn end_ip(&mut self, val: &str) -> &mut Self { self.set_end_ip(val); self } - #[doc = "Change the `externalIfname` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_external_ifname()` instead."] pub fn external_ifname(&mut self, val: &str) -> &mut Self { self.set_external_ifname(val); self } - #[doc = "Change the `gateway` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_gateway()` instead."] pub fn gateway(&mut self, val: &str) -> &mut Self { self.set_gateway(val); self } - #[doc = "Change the `gateway_long` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_gateway_long()` instead."] pub fn gateway_long(&mut self, val: i32) -> &mut Self { self.set_gateway_long(val); self } - #[doc = "Change the `gateways` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_gateways()` instead."] pub fn gateways(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_gateways(val); self } - #[doc = "Change the `id` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_id()` instead."] pub fn id(&mut self, val: i32) -> &mut Self { self.set_id(val); self } - #[doc = "Change the `ifname` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_ifname()` instead."] pub fn ifname(&mut self, val: &str) -> &mut Self { self.set_ifname(val); self } - #[doc = "Change the `interfaceList` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_interface_list()` instead."] pub fn interface_list(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_interface_list(val); self } - #[doc = "Change the `internalIfname` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_internal_ifname()` instead."] pub fn internal_ifname(&mut self, val: &str) -> &mut Self { self.set_internal_ifname(val); self } - #[doc = "Change the `ip` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_ip()` instead."] pub fn ip(&mut self, val: &str) -> &mut Self { self.set_ip(val); self } - #[doc = "Change the `ipaddr` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_ipaddr()` instead."] pub fn ipaddr(&mut self, val: i32) -> &mut Self { self.set_ipaddr(val); self } - #[doc = "Change the `key` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_key()` instead."] pub fn key(&mut self, val: &str) -> &mut Self { self.set_key(val); self } - #[doc = "Change the `link` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_link()` instead."] pub fn link(&mut self, val: &str) -> &mut Self { self.set_link(val); self } - #[doc = "Change the `mask` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_mask()` instead."] pub fn mask(&mut self, val: i32) -> &mut Self { self.set_mask(val); self } - #[doc = "Change the `maskLength` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_mask_length()` instead."] pub fn mask_length(&mut self, val: &str) -> &mut Self { self.set_mask_length(val); self } - #[doc = "Change the `mode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_mode()` instead."] pub fn mode(&mut self, val: &str) -> &mut Self { self.set_mode(val); self } - #[doc = "Change the `mtu` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_mtu()` instead."] pub fn mtu(&mut self, val: i32) -> &mut Self { self.set_mtu(val); self } - #[doc = "Change the `preExternalIfname` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_pre_external_ifname()` instead."] pub fn pre_external_ifname(&mut self, val: &str) -> &mut Self { self.set_pre_external_ifname(val); self } - #[doc = "Change the `preInternalIfname` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_pre_internal_ifname()` instead."] pub fn pre_internal_ifname(&mut self, val: &str) -> &mut Self { self.set_pre_internal_ifname(val); self } - #[doc = "Change the `prefix` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_prefix()` instead."] pub fn prefix(&mut self, val: &str) -> &mut Self { self.set_prefix(val); self } - #[doc = "Change the `prefixLength` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_prefix_length()` instead."] pub fn prefix_length(&mut self, val: u32) -> &mut Self { self.set_prefix_length(val); self } - #[doc = "Change the `report` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_report()` instead."] pub fn report(&mut self, val: bool) -> &mut Self { self.set_report(val); self } - #[doc = "Change the `security` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_security()` instead."] pub fn security(&mut self, val: &str) -> &mut Self { self.set_security(val); self } - #[doc = "Change the `serverIp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_server_ip()` instead."] pub fn server_ip(&mut self, val: &str) -> &mut Self { self.set_server_ip(val); self } - #[doc = "Change the `ssid` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_ssid()` instead."] pub fn ssid(&mut self, val: &str) -> &mut Self { self.set_ssid(val); self } - #[doc = "Change the `startIp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_start_ip()` instead."] pub fn start_ip(&mut self, val: &str) -> &mut Self { self.set_start_ip(val); self } - #[doc = "Change the `threshold` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_threshold()` instead."] pub fn threshold(&mut self, val: f64) -> &mut Self { self.set_threshold(val); self } - #[doc = "Change the `usbEndIp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_usb_end_ip()` instead."] pub fn usb_end_ip(&mut self, val: &str) -> &mut Self { self.set_usb_end_ip(val); self } - #[doc = "Change the `usbStartIp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_usb_start_ip()` instead."] pub fn usb_start_ip(&mut self, val: &str) -> &mut Self { self.set_usb_start_ip(val); self } - #[doc = "Change the `wifiEndIp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_wifi_end_ip()` instead."] pub fn wifi_end_ip(&mut self, val: &str) -> &mut Self { self.set_wifi_end_ip(val); self } - #[doc = "Change the `wifiStartIp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_wifi_start_ip()` instead."] pub fn wifi_start_ip(&mut self, val: &str) -> &mut Self { self.set_wifi_start_ip(val); self } - #[doc = "Change the `wifictrlinterfacename` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_wifictrlinterfacename()` instead."] pub fn wifictrlinterfacename(&mut self, val: &str) -> &mut Self { self.set_wifictrlinterfacename(val); self diff --git a/crates/web-sys/src/features/gen_NetworkResultOptions.rs b/crates/web-sys/src/features/gen_NetworkResultOptions.rs index e18edea624ff..4f4566059684 100644 --- a/crates/web-sys/src/features/gen_NetworkResultOptions.rs +++ b/crates/web-sys/src/features/gen_NetworkResultOptions.rs @@ -15,246 +15,351 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, getter = "broadcast")] pub fn get_broadcast(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `broadcast` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "broadcast")] - fn set_broadcast(this: &NetworkResultOptions, val: bool); + pub fn set_broadcast(this: &NetworkResultOptions, val: bool); #[doc = "Get the `curExternalIfname` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, getter = "curExternalIfname")] pub fn get_cur_external_ifname(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `curExternalIfname` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "curExternalIfname")] - fn set_cur_external_ifname(this: &NetworkResultOptions, val: &str); + pub fn set_cur_external_ifname(this: &NetworkResultOptions, val: &str); #[doc = "Get the `curInternalIfname` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, getter = "curInternalIfname")] pub fn get_cur_internal_ifname(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `curInternalIfname` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "curInternalIfname")] - fn set_cur_internal_ifname(this: &NetworkResultOptions, val: &str); + pub fn set_cur_internal_ifname(this: &NetworkResultOptions, val: &str); #[doc = "Get the `dns1` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, getter = "dns1")] pub fn get_dns1(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `dns1` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "dns1")] - fn set_dns1(this: &NetworkResultOptions, val: i32); + pub fn set_dns1(this: &NetworkResultOptions, val: i32); #[doc = "Get the `dns1_str` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, getter = "dns1_str")] pub fn get_dns1_str(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `dns1_str` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "dns1_str")] - fn set_dns1_str(this: &NetworkResultOptions, val: &str); + pub fn set_dns1_str(this: &NetworkResultOptions, val: &str); #[doc = "Get the `dns2` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, getter = "dns2")] pub fn get_dns2(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `dns2` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "dns2")] - fn set_dns2(this: &NetworkResultOptions, val: i32); + pub fn set_dns2(this: &NetworkResultOptions, val: i32); #[doc = "Get the `dns2_str` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, getter = "dns2_str")] pub fn get_dns2_str(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `dns2_str` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "dns2_str")] - fn set_dns2_str(this: &NetworkResultOptions, val: &str); + pub fn set_dns2_str(this: &NetworkResultOptions, val: &str); #[doc = "Get the `enable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, getter = "enable")] pub fn get_enable(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `enable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "enable")] - fn set_enable(this: &NetworkResultOptions, val: bool); + pub fn set_enable(this: &NetworkResultOptions, val: bool); #[doc = "Get the `error` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, getter = "error")] pub fn get_error(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `error` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "error")] - fn set_error(this: &NetworkResultOptions, val: bool); + pub fn set_error(this: &NetworkResultOptions, val: bool); #[doc = "Get the `flag` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, getter = "flag")] pub fn get_flag(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `flag` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "flag")] - fn set_flag(this: &NetworkResultOptions, val: &str); + pub fn set_flag(this: &NetworkResultOptions, val: &str); #[doc = "Get the `gateway` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, getter = "gateway")] pub fn get_gateway(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `gateway` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "gateway")] - fn set_gateway(this: &NetworkResultOptions, val: i32); + pub fn set_gateway(this: &NetworkResultOptions, val: i32); #[doc = "Get the `gateway_str` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, getter = "gateway_str")] pub fn get_gateway_str(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `gateway_str` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "gateway_str")] - fn set_gateway_str(this: &NetworkResultOptions, val: &str); + pub fn set_gateway_str(this: &NetworkResultOptions, val: &str); #[doc = "Get the `id` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, getter = "id")] pub fn get_id(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "id")] - fn set_id(this: &NetworkResultOptions, val: i32); + pub fn set_id(this: &NetworkResultOptions, val: i32); #[doc = "Get the `interfaceList` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, getter = "interfaceList")] pub fn get_interface_list(this: &NetworkResultOptions) -> Option<::js_sys::Array>; + #[doc = "Change the `interfaceList` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "interfaceList")] - fn set_interface_list(this: &NetworkResultOptions, val: &::wasm_bindgen::JsValue); + pub fn set_interface_list(this: &NetworkResultOptions, val: &::wasm_bindgen::JsValue); #[doc = "Get the `ipAddr` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, getter = "ipAddr")] pub fn get_ip_addr(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `ipAddr` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "ipAddr")] - fn set_ip_addr(this: &NetworkResultOptions, val: &str); + pub fn set_ip_addr(this: &NetworkResultOptions, val: &str); #[doc = "Get the `ipaddr` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, getter = "ipaddr")] pub fn get_ipaddr(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `ipaddr` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "ipaddr")] - fn set_ipaddr(this: &NetworkResultOptions, val: i32); + pub fn set_ipaddr(this: &NetworkResultOptions, val: i32); #[doc = "Get the `ipaddr_str` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, getter = "ipaddr_str")] pub fn get_ipaddr_str(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `ipaddr_str` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "ipaddr_str")] - fn set_ipaddr_str(this: &NetworkResultOptions, val: &str); + pub fn set_ipaddr_str(this: &NetworkResultOptions, val: &str); #[doc = "Get the `lease` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, getter = "lease")] pub fn get_lease(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `lease` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "lease")] - fn set_lease(this: &NetworkResultOptions, val: i32); + pub fn set_lease(this: &NetworkResultOptions, val: i32); #[doc = "Get the `macAddr` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, getter = "macAddr")] pub fn get_mac_addr(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `macAddr` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "macAddr")] - fn set_mac_addr(this: &NetworkResultOptions, val: &str); + pub fn set_mac_addr(this: &NetworkResultOptions, val: &str); #[doc = "Get the `mask` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, getter = "mask")] pub fn get_mask(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `mask` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "mask")] - fn set_mask(this: &NetworkResultOptions, val: i32); + pub fn set_mask(this: &NetworkResultOptions, val: i32); #[doc = "Get the `mask_str` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, getter = "mask_str")] pub fn get_mask_str(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `mask_str` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "mask_str")] - fn set_mask_str(this: &NetworkResultOptions, val: &str); + pub fn set_mask_str(this: &NetworkResultOptions, val: &str); #[doc = "Get the `netId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, getter = "netId")] pub fn get_net_id(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `netId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "netId")] - fn set_net_id(this: &NetworkResultOptions, val: &str); + pub fn set_net_id(this: &NetworkResultOptions, val: &str); #[doc = "Get the `prefixLength` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, getter = "prefixLength")] pub fn get_prefix_length(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `prefixLength` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "prefixLength")] - fn set_prefix_length(this: &NetworkResultOptions, val: i32); + pub fn set_prefix_length(this: &NetworkResultOptions, val: i32); #[doc = "Get the `reason` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, getter = "reason")] pub fn get_reason(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `reason` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "reason")] - fn set_reason(this: &NetworkResultOptions, val: &str); + pub fn set_reason(this: &NetworkResultOptions, val: &str); #[doc = "Get the `reply` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, getter = "reply")] pub fn get_reply(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `reply` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "reply")] - fn set_reply(this: &NetworkResultOptions, val: &str); + pub fn set_reply(this: &NetworkResultOptions, val: &str); #[doc = "Get the `result` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, getter = "result")] pub fn get_result(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `result` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "result")] - fn set_result(this: &NetworkResultOptions, val: bool); + pub fn set_result(this: &NetworkResultOptions, val: bool); #[doc = "Get the `resultCode` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, getter = "resultCode")] pub fn get_result_code(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `resultCode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "resultCode")] - fn set_result_code(this: &NetworkResultOptions, val: i32); + pub fn set_result_code(this: &NetworkResultOptions, val: i32); #[doc = "Get the `resultReason` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, getter = "resultReason")] pub fn get_result_reason(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `resultReason` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "resultReason")] - fn set_result_reason(this: &NetworkResultOptions, val: &str); + pub fn set_result_reason(this: &NetworkResultOptions, val: &str); #[doc = "Get the `ret` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, getter = "ret")] pub fn get_ret(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `ret` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "ret")] - fn set_ret(this: &NetworkResultOptions, val: bool); + pub fn set_ret(this: &NetworkResultOptions, val: bool); #[doc = "Get the `route` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, getter = "route")] pub fn get_route(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `route` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "route")] - fn set_route(this: &NetworkResultOptions, val: &str); + pub fn set_route(this: &NetworkResultOptions, val: &str); #[doc = "Get the `server` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, getter = "server")] pub fn get_server(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `server` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "server")] - fn set_server(this: &NetworkResultOptions, val: i32); + pub fn set_server(this: &NetworkResultOptions, val: i32); #[doc = "Get the `server_str` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, getter = "server_str")] pub fn get_server_str(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `server_str` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "server_str")] - fn set_server_str(this: &NetworkResultOptions, val: &str); + pub fn set_server_str(this: &NetworkResultOptions, val: &str); #[doc = "Get the `success` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, getter = "success")] pub fn get_success(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `success` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "success")] - fn set_success(this: &NetworkResultOptions, val: bool); + pub fn set_success(this: &NetworkResultOptions, val: bool); #[doc = "Get the `topic` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, getter = "topic")] pub fn get_topic(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `topic` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "topic")] - fn set_topic(this: &NetworkResultOptions, val: &str); + pub fn set_topic(this: &NetworkResultOptions, val: &str); #[doc = "Get the `vendor_str` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, getter = "vendor_str")] pub fn get_vendor_str(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `vendor_str` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "vendor_str")] - fn set_vendor_str(this: &NetworkResultOptions, val: &str); + pub fn set_vendor_str(this: &NetworkResultOptions, val: &str); } impl NetworkResultOptions { #[doc = "Construct a new `NetworkResultOptions`."] @@ -265,247 +370,177 @@ impl NetworkResultOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `broadcast` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_broadcast()` instead."] pub fn broadcast(&mut self, val: bool) -> &mut Self { self.set_broadcast(val); self } - #[doc = "Change the `curExternalIfname` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_cur_external_ifname()` instead."] pub fn cur_external_ifname(&mut self, val: &str) -> &mut Self { self.set_cur_external_ifname(val); self } - #[doc = "Change the `curInternalIfname` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_cur_internal_ifname()` instead."] pub fn cur_internal_ifname(&mut self, val: &str) -> &mut Self { self.set_cur_internal_ifname(val); self } - #[doc = "Change the `dns1` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_dns1()` instead."] pub fn dns1(&mut self, val: i32) -> &mut Self { self.set_dns1(val); self } - #[doc = "Change the `dns1_str` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_dns1_str()` instead."] pub fn dns1_str(&mut self, val: &str) -> &mut Self { self.set_dns1_str(val); self } - #[doc = "Change the `dns2` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_dns2()` instead."] pub fn dns2(&mut self, val: i32) -> &mut Self { self.set_dns2(val); self } - #[doc = "Change the `dns2_str` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_dns2_str()` instead."] pub fn dns2_str(&mut self, val: &str) -> &mut Self { self.set_dns2_str(val); self } - #[doc = "Change the `enable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_enable()` instead."] pub fn enable(&mut self, val: bool) -> &mut Self { self.set_enable(val); self } - #[doc = "Change the `error` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_error()` instead."] pub fn error(&mut self, val: bool) -> &mut Self { self.set_error(val); self } - #[doc = "Change the `flag` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_flag()` instead."] pub fn flag(&mut self, val: &str) -> &mut Self { self.set_flag(val); self } - #[doc = "Change the `gateway` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_gateway()` instead."] pub fn gateway(&mut self, val: i32) -> &mut Self { self.set_gateway(val); self } - #[doc = "Change the `gateway_str` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_gateway_str()` instead."] pub fn gateway_str(&mut self, val: &str) -> &mut Self { self.set_gateway_str(val); self } - #[doc = "Change the `id` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_id()` instead."] pub fn id(&mut self, val: i32) -> &mut Self { self.set_id(val); self } - #[doc = "Change the `interfaceList` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_interface_list()` instead."] pub fn interface_list(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_interface_list(val); self } - #[doc = "Change the `ipAddr` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_ip_addr()` instead."] pub fn ip_addr(&mut self, val: &str) -> &mut Self { self.set_ip_addr(val); self } - #[doc = "Change the `ipaddr` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_ipaddr()` instead."] pub fn ipaddr(&mut self, val: i32) -> &mut Self { self.set_ipaddr(val); self } - #[doc = "Change the `ipaddr_str` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_ipaddr_str()` instead."] pub fn ipaddr_str(&mut self, val: &str) -> &mut Self { self.set_ipaddr_str(val); self } - #[doc = "Change the `lease` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_lease()` instead."] pub fn lease(&mut self, val: i32) -> &mut Self { self.set_lease(val); self } - #[doc = "Change the `macAddr` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_mac_addr()` instead."] pub fn mac_addr(&mut self, val: &str) -> &mut Self { self.set_mac_addr(val); self } - #[doc = "Change the `mask` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_mask()` instead."] pub fn mask(&mut self, val: i32) -> &mut Self { self.set_mask(val); self } - #[doc = "Change the `mask_str` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_mask_str()` instead."] pub fn mask_str(&mut self, val: &str) -> &mut Self { self.set_mask_str(val); self } - #[doc = "Change the `netId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_net_id()` instead."] pub fn net_id(&mut self, val: &str) -> &mut Self { self.set_net_id(val); self } - #[doc = "Change the `prefixLength` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_prefix_length()` instead."] pub fn prefix_length(&mut self, val: i32) -> &mut Self { self.set_prefix_length(val); self } - #[doc = "Change the `reason` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_reason()` instead."] pub fn reason(&mut self, val: &str) -> &mut Self { self.set_reason(val); self } - #[doc = "Change the `reply` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_reply()` instead."] pub fn reply(&mut self, val: &str) -> &mut Self { self.set_reply(val); self } - #[doc = "Change the `result` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_result()` instead."] pub fn result(&mut self, val: bool) -> &mut Self { self.set_result(val); self } - #[doc = "Change the `resultCode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_result_code()` instead."] pub fn result_code(&mut self, val: i32) -> &mut Self { self.set_result_code(val); self } - #[doc = "Change the `resultReason` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_result_reason()` instead."] pub fn result_reason(&mut self, val: &str) -> &mut Self { self.set_result_reason(val); self } - #[doc = "Change the `ret` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_ret()` instead."] pub fn ret(&mut self, val: bool) -> &mut Self { self.set_ret(val); self } - #[doc = "Change the `route` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_route()` instead."] pub fn route(&mut self, val: &str) -> &mut Self { self.set_route(val); self } - #[doc = "Change the `server` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_server()` instead."] pub fn server(&mut self, val: i32) -> &mut Self { self.set_server(val); self } - #[doc = "Change the `server_str` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_server_str()` instead."] pub fn server_str(&mut self, val: &str) -> &mut Self { self.set_server_str(val); self } - #[doc = "Change the `success` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_success()` instead."] pub fn success(&mut self, val: bool) -> &mut Self { self.set_success(val); self } - #[doc = "Change the `topic` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_topic()` instead."] pub fn topic(&mut self, val: &str) -> &mut Self { self.set_topic(val); self } - #[doc = "Change the `vendor_str` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_vendor_str()` instead."] pub fn vendor_str(&mut self, val: &str) -> &mut Self { self.set_vendor_str(val); self diff --git a/crates/web-sys/src/features/gen_NodeFilter.rs b/crates/web-sys/src/features/gen_NodeFilter.rs index f3498363f847..dfc7bbf68f09 100644 --- a/crates/web-sys/src/features/gen_NodeFilter.rs +++ b/crates/web-sys/src/features/gen_NodeFilter.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `NodeFilter`*"] #[wasm_bindgen(method, getter = "acceptNode")] pub fn get_accept_node(this: &NodeFilter) -> Option<::js_sys::Function>; + #[doc = "Change the `acceptNode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NodeFilter`*"] #[wasm_bindgen(method, setter = "acceptNode")] - fn set_accept_node(this: &NodeFilter, val: &::js_sys::Function); + pub fn set_accept_node(this: &NodeFilter, val: &::js_sys::Function); } impl NodeFilter { #[doc = "Construct a new `NodeFilter`."] @@ -27,9 +30,7 @@ impl NodeFilter { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `acceptNode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NodeFilter`*"] + #[deprecated = "Use `set_accept_node()` instead."] pub fn accept_node(&mut self, val: &::js_sys::Function) -> &mut Self { self.set_accept_node(val); self diff --git a/crates/web-sys/src/features/gen_NotificationAction.rs b/crates/web-sys/src/features/gen_NotificationAction.rs index ddf34e22019c..f8fee81d8486 100644 --- a/crates/web-sys/src/features/gen_NotificationAction.rs +++ b/crates/web-sys/src/features/gen_NotificationAction.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `NotificationAction`*"] #[wasm_bindgen(method, getter = "action")] pub fn get_action(this: &NotificationAction) -> String; + #[doc = "Change the `action` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationAction`*"] #[wasm_bindgen(method, setter = "action")] - fn set_action(this: &NotificationAction, val: &str); + pub fn set_action(this: &NotificationAction, val: &str); #[doc = "Get the `icon` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NotificationAction`*"] #[wasm_bindgen(method, getter = "icon")] pub fn get_icon(this: &NotificationAction) -> Option; + #[doc = "Change the `icon` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationAction`*"] #[wasm_bindgen(method, setter = "icon")] - fn set_icon(this: &NotificationAction, val: &str); + pub fn set_icon(this: &NotificationAction, val: &str); #[doc = "Get the `title` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NotificationAction`*"] #[wasm_bindgen(method, getter = "title")] pub fn get_title(this: &NotificationAction) -> String; + #[doc = "Change the `title` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationAction`*"] #[wasm_bindgen(method, setter = "title")] - fn set_title(this: &NotificationAction, val: &str); + pub fn set_title(this: &NotificationAction, val: &str); } impl NotificationAction { #[doc = "Construct a new `NotificationAction`."] @@ -43,23 +52,17 @@ impl NotificationAction { ret.title(title); ret } - #[doc = "Change the `action` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NotificationAction`*"] + #[deprecated = "Use `set_action()` instead."] pub fn action(&mut self, val: &str) -> &mut Self { self.set_action(val); self } - #[doc = "Change the `icon` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NotificationAction`*"] + #[deprecated = "Use `set_icon()` instead."] pub fn icon(&mut self, val: &str) -> &mut Self { self.set_icon(val); self } - #[doc = "Change the `title` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NotificationAction`*"] + #[deprecated = "Use `set_title()` instead."] pub fn title(&mut self, val: &str) -> &mut Self { self.set_title(val); self diff --git a/crates/web-sys/src/features/gen_NotificationEventInit.rs b/crates/web-sys/src/features/gen_NotificationEventInit.rs index 087c250b4b51..c7b748a391fd 100644 --- a/crates/web-sys/src/features/gen_NotificationEventInit.rs +++ b/crates/web-sys/src/features/gen_NotificationEventInit.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `NotificationEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &NotificationEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &NotificationEventInit, val: bool); + pub fn set_bubbles(this: &NotificationEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NotificationEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &NotificationEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &NotificationEventInit, val: bool); + pub fn set_cancelable(this: &NotificationEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NotificationEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &NotificationEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &NotificationEventInit, val: bool); + pub fn set_composed(this: &NotificationEventInit, val: bool); #[cfg(feature = "Notification")] #[doc = "Get the `notification` field of this object."] #[doc = ""] @@ -38,8 +47,11 @@ extern "C" { #[wasm_bindgen(method, getter = "notification")] pub fn get_notification(this: &NotificationEventInit) -> Notification; #[cfg(feature = "Notification")] + #[doc = "Change the `notification` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Notification`, `NotificationEventInit`*"] #[wasm_bindgen(method, setter = "notification")] - fn set_notification(this: &NotificationEventInit, val: &Notification); + pub fn set_notification(this: &NotificationEventInit, val: &Notification); } impl NotificationEventInit { #[cfg(feature = "Notification")] @@ -52,31 +64,23 @@ impl NotificationEventInit { ret.notification(notification); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NotificationEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NotificationEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NotificationEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } #[cfg(feature = "Notification")] - #[doc = "Change the `notification` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `Notification`, `NotificationEventInit`*"] + #[deprecated = "Use `set_notification()` instead."] pub fn notification(&mut self, val: &Notification) -> &mut Self { self.set_notification(val); self diff --git a/crates/web-sys/src/features/gen_NotificationOptions.rs b/crates/web-sys/src/features/gen_NotificationOptions.rs index b61a384a3937..c8e8bc9ccbad 100644 --- a/crates/web-sys/src/features/gen_NotificationOptions.rs +++ b/crates/web-sys/src/features/gen_NotificationOptions.rs @@ -15,29 +15,41 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] #[wasm_bindgen(method, getter = "actions")] pub fn get_actions(this: &NotificationOptions) -> Option<::js_sys::Array>; + #[doc = "Change the `actions` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] #[wasm_bindgen(method, setter = "actions")] - fn set_actions(this: &NotificationOptions, val: &::wasm_bindgen::JsValue); + pub fn set_actions(this: &NotificationOptions, val: &::wasm_bindgen::JsValue); #[doc = "Get the `badge` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] #[wasm_bindgen(method, getter = "badge")] pub fn get_badge(this: &NotificationOptions) -> Option; + #[doc = "Change the `badge` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] #[wasm_bindgen(method, setter = "badge")] - fn set_badge(this: &NotificationOptions, val: &str); + pub fn set_badge(this: &NotificationOptions, val: &str); #[doc = "Get the `body` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] #[wasm_bindgen(method, getter = "body")] pub fn get_body(this: &NotificationOptions) -> Option; + #[doc = "Change the `body` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] #[wasm_bindgen(method, setter = "body")] - fn set_body(this: &NotificationOptions, val: &str); + pub fn set_body(this: &NotificationOptions, val: &str); #[doc = "Get the `data` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] #[wasm_bindgen(method, getter = "data")] pub fn get_data(this: &NotificationOptions) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] #[wasm_bindgen(method, setter = "data")] - fn set_data(this: &NotificationOptions, val: &::wasm_bindgen::JsValue); + pub fn set_data(this: &NotificationOptions, val: &::wasm_bindgen::JsValue); #[cfg(feature = "NotificationDirection")] #[doc = "Get the `dir` field of this object."] #[doc = ""] @@ -45,64 +57,91 @@ extern "C" { #[wasm_bindgen(method, getter = "dir")] pub fn get_dir(this: &NotificationOptions) -> Option; #[cfg(feature = "NotificationDirection")] + #[doc = "Change the `dir` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationDirection`, `NotificationOptions`*"] #[wasm_bindgen(method, setter = "dir")] - fn set_dir(this: &NotificationOptions, val: NotificationDirection); + pub fn set_dir(this: &NotificationOptions, val: NotificationDirection); #[doc = "Get the `icon` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] #[wasm_bindgen(method, getter = "icon")] pub fn get_icon(this: &NotificationOptions) -> Option; + #[doc = "Change the `icon` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] #[wasm_bindgen(method, setter = "icon")] - fn set_icon(this: &NotificationOptions, val: &str); + pub fn set_icon(this: &NotificationOptions, val: &str); #[doc = "Get the `image` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] #[wasm_bindgen(method, getter = "image")] pub fn get_image(this: &NotificationOptions) -> Option; + #[doc = "Change the `image` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] #[wasm_bindgen(method, setter = "image")] - fn set_image(this: &NotificationOptions, val: &str); + pub fn set_image(this: &NotificationOptions, val: &str); #[doc = "Get the `lang` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] #[wasm_bindgen(method, getter = "lang")] pub fn get_lang(this: &NotificationOptions) -> Option; + #[doc = "Change the `lang` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] #[wasm_bindgen(method, setter = "lang")] - fn set_lang(this: &NotificationOptions, val: &str); + pub fn set_lang(this: &NotificationOptions, val: &str); #[doc = "Get the `renotify` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] #[wasm_bindgen(method, getter = "renotify")] pub fn get_renotify(this: &NotificationOptions) -> Option; + #[doc = "Change the `renotify` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] #[wasm_bindgen(method, setter = "renotify")] - fn set_renotify(this: &NotificationOptions, val: bool); + pub fn set_renotify(this: &NotificationOptions, val: bool); #[doc = "Get the `requireInteraction` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] #[wasm_bindgen(method, getter = "requireInteraction")] pub fn get_require_interaction(this: &NotificationOptions) -> Option; + #[doc = "Change the `requireInteraction` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] #[wasm_bindgen(method, setter = "requireInteraction")] - fn set_require_interaction(this: &NotificationOptions, val: bool); + pub fn set_require_interaction(this: &NotificationOptions, val: bool); #[doc = "Get the `silent` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] #[wasm_bindgen(method, getter = "silent")] pub fn get_silent(this: &NotificationOptions) -> Option; + #[doc = "Change the `silent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] #[wasm_bindgen(method, setter = "silent")] - fn set_silent(this: &NotificationOptions, val: Option); + pub fn set_silent(this: &NotificationOptions, val: Option); #[doc = "Get the `tag` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] #[wasm_bindgen(method, getter = "tag")] pub fn get_tag(this: &NotificationOptions) -> Option; + #[doc = "Change the `tag` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] #[wasm_bindgen(method, setter = "tag")] - fn set_tag(this: &NotificationOptions, val: &str); + pub fn set_tag(this: &NotificationOptions, val: &str); #[doc = "Get the `timestamp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] #[wasm_bindgen(method, getter = "timestamp")] pub fn get_timestamp(this: &NotificationOptions) -> Option; + #[doc = "Change the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] #[wasm_bindgen(method, setter = "timestamp")] - fn set_timestamp(this: &NotificationOptions, val: f64); + pub fn set_timestamp(this: &NotificationOptions, val: f64); } impl NotificationOptions { #[doc = "Construct a new `NotificationOptions`."] @@ -113,94 +152,68 @@ impl NotificationOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `actions` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] + #[deprecated = "Use `set_actions()` instead."] pub fn actions(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_actions(val); self } - #[doc = "Change the `badge` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] + #[deprecated = "Use `set_badge()` instead."] pub fn badge(&mut self, val: &str) -> &mut Self { self.set_badge(val); self } - #[doc = "Change the `body` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] + #[deprecated = "Use `set_body()` instead."] pub fn body(&mut self, val: &str) -> &mut Self { self.set_body(val); self } - #[doc = "Change the `data` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] + #[deprecated = "Use `set_data()` instead."] pub fn data(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_data(val); self } #[cfg(feature = "NotificationDirection")] - #[doc = "Change the `dir` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NotificationDirection`, `NotificationOptions`*"] + #[deprecated = "Use `set_dir()` instead."] pub fn dir(&mut self, val: NotificationDirection) -> &mut Self { self.set_dir(val); self } - #[doc = "Change the `icon` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] + #[deprecated = "Use `set_icon()` instead."] pub fn icon(&mut self, val: &str) -> &mut Self { self.set_icon(val); self } - #[doc = "Change the `image` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] + #[deprecated = "Use `set_image()` instead."] pub fn image(&mut self, val: &str) -> &mut Self { self.set_image(val); self } - #[doc = "Change the `lang` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] + #[deprecated = "Use `set_lang()` instead."] pub fn lang(&mut self, val: &str) -> &mut Self { self.set_lang(val); self } - #[doc = "Change the `renotify` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] + #[deprecated = "Use `set_renotify()` instead."] pub fn renotify(&mut self, val: bool) -> &mut Self { self.set_renotify(val); self } - #[doc = "Change the `requireInteraction` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] + #[deprecated = "Use `set_require_interaction()` instead."] pub fn require_interaction(&mut self, val: bool) -> &mut Self { self.set_require_interaction(val); self } - #[doc = "Change the `silent` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] + #[deprecated = "Use `set_silent()` instead."] pub fn silent(&mut self, val: Option) -> &mut Self { self.set_silent(val); self } - #[doc = "Change the `tag` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] + #[deprecated = "Use `set_tag()` instead."] pub fn tag(&mut self, val: &str) -> &mut Self { self.set_tag(val); self } - #[doc = "Change the `timestamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] + #[deprecated = "Use `set_timestamp()` instead."] pub fn timestamp(&mut self, val: f64) -> &mut Self { self.set_timestamp(val); self diff --git a/crates/web-sys/src/features/gen_ObserverCallback.rs b/crates/web-sys/src/features/gen_ObserverCallback.rs index 58d0e1bcc51f..8fa10f9d7da6 100644 --- a/crates/web-sys/src/features/gen_ObserverCallback.rs +++ b/crates/web-sys/src/features/gen_ObserverCallback.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ObserverCallback`*"] #[wasm_bindgen(method, getter = "handleEvent")] pub fn get_handle_event(this: &ObserverCallback) -> Option<::js_sys::Function>; + #[doc = "Change the `handleEvent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ObserverCallback`*"] #[wasm_bindgen(method, setter = "handleEvent")] - fn set_handle_event(this: &ObserverCallback, val: &::js_sys::Function); + pub fn set_handle_event(this: &ObserverCallback, val: &::js_sys::Function); } impl ObserverCallback { #[doc = "Construct a new `ObserverCallback`."] @@ -27,9 +30,7 @@ impl ObserverCallback { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `handleEvent` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ObserverCallback`*"] + #[deprecated = "Use `set_handle_event()` instead."] pub fn handle_event(&mut self, val: &::js_sys::Function) -> &mut Self { self.set_handle_event(val); self diff --git a/crates/web-sys/src/features/gen_OfflineAudioCompletionEventInit.rs b/crates/web-sys/src/features/gen_OfflineAudioCompletionEventInit.rs index aaa8f8f1d0be..45043ee73a79 100644 --- a/crates/web-sys/src/features/gen_OfflineAudioCompletionEventInit.rs +++ b/crates/web-sys/src/features/gen_OfflineAudioCompletionEventInit.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `OfflineAudioCompletionEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &OfflineAudioCompletionEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OfflineAudioCompletionEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &OfflineAudioCompletionEventInit, val: bool); + pub fn set_bubbles(this: &OfflineAudioCompletionEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `OfflineAudioCompletionEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &OfflineAudioCompletionEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OfflineAudioCompletionEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &OfflineAudioCompletionEventInit, val: bool); + pub fn set_cancelable(this: &OfflineAudioCompletionEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `OfflineAudioCompletionEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &OfflineAudioCompletionEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OfflineAudioCompletionEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &OfflineAudioCompletionEventInit, val: bool); + pub fn set_composed(this: &OfflineAudioCompletionEventInit, val: bool); #[cfg(feature = "AudioBuffer")] #[doc = "Get the `renderedBuffer` field of this object."] #[doc = ""] @@ -38,8 +47,11 @@ extern "C" { #[wasm_bindgen(method, getter = "renderedBuffer")] pub fn get_rendered_buffer(this: &OfflineAudioCompletionEventInit) -> AudioBuffer; #[cfg(feature = "AudioBuffer")] + #[doc = "Change the `renderedBuffer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioBuffer`, `OfflineAudioCompletionEventInit`*"] #[wasm_bindgen(method, setter = "renderedBuffer")] - fn set_rendered_buffer(this: &OfflineAudioCompletionEventInit, val: &AudioBuffer); + pub fn set_rendered_buffer(this: &OfflineAudioCompletionEventInit, val: &AudioBuffer); } impl OfflineAudioCompletionEventInit { #[cfg(feature = "AudioBuffer")] @@ -52,31 +64,23 @@ impl OfflineAudioCompletionEventInit { ret.rendered_buffer(rendered_buffer); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `OfflineAudioCompletionEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `OfflineAudioCompletionEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `OfflineAudioCompletionEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } #[cfg(feature = "AudioBuffer")] - #[doc = "Change the `renderedBuffer` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioBuffer`, `OfflineAudioCompletionEventInit`*"] + #[deprecated = "Use `set_rendered_buffer()` instead."] pub fn rendered_buffer(&mut self, val: &AudioBuffer) -> &mut Self { self.set_rendered_buffer(val); self diff --git a/crates/web-sys/src/features/gen_OfflineAudioContextOptions.rs b/crates/web-sys/src/features/gen_OfflineAudioContextOptions.rs index 10fd4a6f102f..b1fd7829e6cf 100644 --- a/crates/web-sys/src/features/gen_OfflineAudioContextOptions.rs +++ b/crates/web-sys/src/features/gen_OfflineAudioContextOptions.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContextOptions`*"] #[wasm_bindgen(method, getter = "length")] pub fn get_length(this: &OfflineAudioContextOptions) -> u32; + #[doc = "Change the `length` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContextOptions`*"] #[wasm_bindgen(method, setter = "length")] - fn set_length(this: &OfflineAudioContextOptions, val: u32); + pub fn set_length(this: &OfflineAudioContextOptions, val: u32); #[doc = "Get the `numberOfChannels` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContextOptions`*"] #[wasm_bindgen(method, getter = "numberOfChannels")] pub fn get_number_of_channels(this: &OfflineAudioContextOptions) -> Option; + #[doc = "Change the `numberOfChannels` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContextOptions`*"] #[wasm_bindgen(method, setter = "numberOfChannels")] - fn set_number_of_channels(this: &OfflineAudioContextOptions, val: u32); + pub fn set_number_of_channels(this: &OfflineAudioContextOptions, val: u32); #[doc = "Get the `sampleRate` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContextOptions`*"] #[wasm_bindgen(method, getter = "sampleRate")] pub fn get_sample_rate(this: &OfflineAudioContextOptions) -> f32; + #[doc = "Change the `sampleRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContextOptions`*"] #[wasm_bindgen(method, setter = "sampleRate")] - fn set_sample_rate(this: &OfflineAudioContextOptions, val: f32); + pub fn set_sample_rate(this: &OfflineAudioContextOptions, val: f32); } impl OfflineAudioContextOptions { #[doc = "Construct a new `OfflineAudioContextOptions`."] @@ -43,23 +52,17 @@ impl OfflineAudioContextOptions { ret.sample_rate(sample_rate); ret } - #[doc = "Change the `length` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContextOptions`*"] + #[deprecated = "Use `set_length()` instead."] pub fn length(&mut self, val: u32) -> &mut Self { self.set_length(val); self } - #[doc = "Change the `numberOfChannels` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContextOptions`*"] + #[deprecated = "Use `set_number_of_channels()` instead."] pub fn number_of_channels(&mut self, val: u32) -> &mut Self { self.set_number_of_channels(val); self } - #[doc = "Change the `sampleRate` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContextOptions`*"] + #[deprecated = "Use `set_sample_rate()` instead."] pub fn sample_rate(&mut self, val: f32) -> &mut Self { self.set_sample_rate(val); self diff --git a/crates/web-sys/src/features/gen_OpenFilePickerOptions.rs b/crates/web-sys/src/features/gen_OpenFilePickerOptions.rs index e58b6967143d..512cc7bcace7 100644 --- a/crates/web-sys/src/features/gen_OpenFilePickerOptions.rs +++ b/crates/web-sys/src/features/gen_OpenFilePickerOptions.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "excludeAcceptAllOption")] pub fn get_exclude_accept_all_option(this: &OpenFilePickerOptions) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `excludeAcceptAllOption` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OpenFilePickerOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "excludeAcceptAllOption")] - fn set_exclude_accept_all_option(this: &OpenFilePickerOptions, val: bool); + pub fn set_exclude_accept_all_option(this: &OpenFilePickerOptions, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `id` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "id")] pub fn get_id(this: &OpenFilePickerOptions) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OpenFilePickerOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "id")] - fn set_id(this: &OpenFilePickerOptions, val: &str); + pub fn set_id(this: &OpenFilePickerOptions, val: &str); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `startIn` field of this object."] #[doc = ""] @@ -45,8 +59,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "startIn")] pub fn get_start_in(this: &OpenFilePickerOptions) -> ::wasm_bindgen::JsValue; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `startIn` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OpenFilePickerOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "startIn")] - fn set_start_in(this: &OpenFilePickerOptions, val: &::wasm_bindgen::JsValue); + pub fn set_start_in(this: &OpenFilePickerOptions, val: &::wasm_bindgen::JsValue); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `types` field of this object."] #[doc = ""] @@ -56,8 +77,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "types")] pub fn get_types(this: &OpenFilePickerOptions) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `types` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OpenFilePickerOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "types")] - fn set_types(this: &OpenFilePickerOptions, val: &::wasm_bindgen::JsValue); + pub fn set_types(this: &OpenFilePickerOptions, val: &::wasm_bindgen::JsValue); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `multiple` field of this object."] #[doc = ""] @@ -67,8 +95,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "multiple")] pub fn get_multiple(this: &OpenFilePickerOptions) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `multiple` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OpenFilePickerOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "multiple")] - fn set_multiple(this: &OpenFilePickerOptions, val: bool); + pub fn set_multiple(this: &OpenFilePickerOptions, val: bool); } #[cfg(web_sys_unstable_apis)] impl OpenFilePickerOptions { @@ -84,56 +119,31 @@ impl OpenFilePickerOptions { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `excludeAcceptAllOption` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `OpenFilePickerOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_exclude_accept_all_option()` instead."] pub fn exclude_accept_all_option(&mut self, val: bool) -> &mut Self { self.set_exclude_accept_all_option(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `id` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `OpenFilePickerOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_id()` instead."] pub fn id(&mut self, val: &str) -> &mut Self { self.set_id(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `startIn` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `OpenFilePickerOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_start_in()` instead."] pub fn start_in(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_start_in(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `types` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `OpenFilePickerOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_types()` instead."] pub fn types(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_types(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `multiple` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `OpenFilePickerOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_multiple()` instead."] pub fn multiple(&mut self, val: bool) -> &mut Self { self.set_multiple(val); self diff --git a/crates/web-sys/src/features/gen_OpenWindowEventDetail.rs b/crates/web-sys/src/features/gen_OpenWindowEventDetail.rs index 012d5ae1c965..442c35d3a4a6 100644 --- a/crates/web-sys/src/features/gen_OpenWindowEventDetail.rs +++ b/crates/web-sys/src/features/gen_OpenWindowEventDetail.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `OpenWindowEventDetail`*"] #[wasm_bindgen(method, getter = "features")] pub fn get_features(this: &OpenWindowEventDetail) -> Option; + #[doc = "Change the `features` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OpenWindowEventDetail`*"] #[wasm_bindgen(method, setter = "features")] - fn set_features(this: &OpenWindowEventDetail, val: &str); + pub fn set_features(this: &OpenWindowEventDetail, val: &str); #[cfg(feature = "Node")] #[doc = "Get the `frameElement` field of this object."] #[doc = ""] @@ -24,22 +27,31 @@ extern "C" { #[wasm_bindgen(method, getter = "frameElement")] pub fn get_frame_element(this: &OpenWindowEventDetail) -> Option; #[cfg(feature = "Node")] + #[doc = "Change the `frameElement` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Node`, `OpenWindowEventDetail`*"] #[wasm_bindgen(method, setter = "frameElement")] - fn set_frame_element(this: &OpenWindowEventDetail, val: Option<&Node>); + pub fn set_frame_element(this: &OpenWindowEventDetail, val: Option<&Node>); #[doc = "Get the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `OpenWindowEventDetail`*"] #[wasm_bindgen(method, getter = "name")] pub fn get_name(this: &OpenWindowEventDetail) -> Option; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OpenWindowEventDetail`*"] #[wasm_bindgen(method, setter = "name")] - fn set_name(this: &OpenWindowEventDetail, val: &str); + pub fn set_name(this: &OpenWindowEventDetail, val: &str); #[doc = "Get the `url` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `OpenWindowEventDetail`*"] #[wasm_bindgen(method, getter = "url")] pub fn get_url(this: &OpenWindowEventDetail) -> Option; + #[doc = "Change the `url` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OpenWindowEventDetail`*"] #[wasm_bindgen(method, setter = "url")] - fn set_url(this: &OpenWindowEventDetail, val: &str); + pub fn set_url(this: &OpenWindowEventDetail, val: &str); } impl OpenWindowEventDetail { #[doc = "Construct a new `OpenWindowEventDetail`."] @@ -50,31 +62,23 @@ impl OpenWindowEventDetail { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `features` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `OpenWindowEventDetail`*"] + #[deprecated = "Use `set_features()` instead."] pub fn features(&mut self, val: &str) -> &mut Self { self.set_features(val); self } #[cfg(feature = "Node")] - #[doc = "Change the `frameElement` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `Node`, `OpenWindowEventDetail`*"] + #[deprecated = "Use `set_frame_element()` instead."] pub fn frame_element(&mut self, val: Option<&Node>) -> &mut Self { self.set_frame_element(val); self } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `OpenWindowEventDetail`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { self.set_name(val); self } - #[doc = "Change the `url` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `OpenWindowEventDetail`*"] + #[deprecated = "Use `set_url()` instead."] pub fn url(&mut self, val: &str) -> &mut Self { self.set_url(val); self diff --git a/crates/web-sys/src/features/gen_OptionalEffectTiming.rs b/crates/web-sys/src/features/gen_OptionalEffectTiming.rs index b4faadca07ed..195e6e3e2a5b 100644 --- a/crates/web-sys/src/features/gen_OptionalEffectTiming.rs +++ b/crates/web-sys/src/features/gen_OptionalEffectTiming.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`*"] #[wasm_bindgen(method, getter = "delay")] pub fn get_delay(this: &OptionalEffectTiming) -> Option; + #[doc = "Change the `delay` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`*"] #[wasm_bindgen(method, setter = "delay")] - fn set_delay(this: &OptionalEffectTiming, val: f64); + pub fn set_delay(this: &OptionalEffectTiming, val: f64); #[cfg(feature = "PlaybackDirection")] #[doc = "Get the `direction` field of this object."] #[doc = ""] @@ -24,29 +27,41 @@ extern "C" { #[wasm_bindgen(method, getter = "direction")] pub fn get_direction(this: &OptionalEffectTiming) -> Option; #[cfg(feature = "PlaybackDirection")] + #[doc = "Change the `direction` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`, `PlaybackDirection`*"] #[wasm_bindgen(method, setter = "direction")] - fn set_direction(this: &OptionalEffectTiming, val: PlaybackDirection); + pub fn set_direction(this: &OptionalEffectTiming, val: PlaybackDirection); #[doc = "Get the `duration` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`*"] #[wasm_bindgen(method, getter = "duration")] pub fn get_duration(this: &OptionalEffectTiming) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `duration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`*"] #[wasm_bindgen(method, setter = "duration")] - fn set_duration(this: &OptionalEffectTiming, val: &::wasm_bindgen::JsValue); + pub fn set_duration(this: &OptionalEffectTiming, val: &::wasm_bindgen::JsValue); #[doc = "Get the `easing` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`*"] #[wasm_bindgen(method, getter = "easing")] pub fn get_easing(this: &OptionalEffectTiming) -> Option; + #[doc = "Change the `easing` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`*"] #[wasm_bindgen(method, setter = "easing")] - fn set_easing(this: &OptionalEffectTiming, val: &str); + pub fn set_easing(this: &OptionalEffectTiming, val: &str); #[doc = "Get the `endDelay` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`*"] #[wasm_bindgen(method, getter = "endDelay")] pub fn get_end_delay(this: &OptionalEffectTiming) -> Option; + #[doc = "Change the `endDelay` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`*"] #[wasm_bindgen(method, setter = "endDelay")] - fn set_end_delay(this: &OptionalEffectTiming, val: f64); + pub fn set_end_delay(this: &OptionalEffectTiming, val: f64); #[cfg(feature = "FillMode")] #[doc = "Get the `fill` field of this object."] #[doc = ""] @@ -54,22 +69,31 @@ extern "C" { #[wasm_bindgen(method, getter = "fill")] pub fn get_fill(this: &OptionalEffectTiming) -> Option; #[cfg(feature = "FillMode")] + #[doc = "Change the `fill` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FillMode`, `OptionalEffectTiming`*"] #[wasm_bindgen(method, setter = "fill")] - fn set_fill(this: &OptionalEffectTiming, val: FillMode); + pub fn set_fill(this: &OptionalEffectTiming, val: FillMode); #[doc = "Get the `iterationStart` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`*"] #[wasm_bindgen(method, getter = "iterationStart")] pub fn get_iteration_start(this: &OptionalEffectTiming) -> Option; + #[doc = "Change the `iterationStart` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`*"] #[wasm_bindgen(method, setter = "iterationStart")] - fn set_iteration_start(this: &OptionalEffectTiming, val: f64); + pub fn set_iteration_start(this: &OptionalEffectTiming, val: f64); #[doc = "Get the `iterations` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`*"] #[wasm_bindgen(method, getter = "iterations")] pub fn get_iterations(this: &OptionalEffectTiming) -> Option; + #[doc = "Change the `iterations` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`*"] #[wasm_bindgen(method, setter = "iterations")] - fn set_iterations(this: &OptionalEffectTiming, val: f64); + pub fn set_iterations(this: &OptionalEffectTiming, val: f64); } impl OptionalEffectTiming { #[doc = "Construct a new `OptionalEffectTiming`."] @@ -80,60 +104,44 @@ impl OptionalEffectTiming { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `delay` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`*"] + #[deprecated = "Use `set_delay()` instead."] pub fn delay(&mut self, val: f64) -> &mut Self { self.set_delay(val); self } #[cfg(feature = "PlaybackDirection")] - #[doc = "Change the `direction` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`, `PlaybackDirection`*"] + #[deprecated = "Use `set_direction()` instead."] pub fn direction(&mut self, val: PlaybackDirection) -> &mut Self { self.set_direction(val); self } - #[doc = "Change the `duration` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`*"] + #[deprecated = "Use `set_duration()` instead."] pub fn duration(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_duration(val); self } - #[doc = "Change the `easing` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`*"] + #[deprecated = "Use `set_easing()` instead."] pub fn easing(&mut self, val: &str) -> &mut Self { self.set_easing(val); self } - #[doc = "Change the `endDelay` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`*"] + #[deprecated = "Use `set_end_delay()` instead."] pub fn end_delay(&mut self, val: f64) -> &mut Self { self.set_end_delay(val); self } #[cfg(feature = "FillMode")] - #[doc = "Change the `fill` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FillMode`, `OptionalEffectTiming`*"] + #[deprecated = "Use `set_fill()` instead."] pub fn fill(&mut self, val: FillMode) -> &mut Self { self.set_fill(val); self } - #[doc = "Change the `iterationStart` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`*"] + #[deprecated = "Use `set_iteration_start()` instead."] pub fn iteration_start(&mut self, val: f64) -> &mut Self { self.set_iteration_start(val); self } - #[doc = "Change the `iterations` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`*"] + #[deprecated = "Use `set_iterations()` instead."] pub fn iterations(&mut self, val: f64) -> &mut Self { self.set_iterations(val); self diff --git a/crates/web-sys/src/features/gen_OscillatorOptions.rs b/crates/web-sys/src/features/gen_OscillatorOptions.rs index 0eb953207ac4..32f4507e5fd2 100644 --- a/crates/web-sys/src/features/gen_OscillatorOptions.rs +++ b/crates/web-sys/src/features/gen_OscillatorOptions.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `OscillatorOptions`*"] #[wasm_bindgen(method, getter = "channelCount")] pub fn get_channel_count(this: &OscillatorOptions) -> Option; + #[doc = "Change the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OscillatorOptions`*"] #[wasm_bindgen(method, setter = "channelCount")] - fn set_channel_count(this: &OscillatorOptions, val: u32); + pub fn set_channel_count(this: &OscillatorOptions, val: u32); #[cfg(feature = "ChannelCountMode")] #[doc = "Get the `channelCountMode` field of this object."] #[doc = ""] @@ -24,8 +27,11 @@ extern "C" { #[wasm_bindgen(method, getter = "channelCountMode")] pub fn get_channel_count_mode(this: &OscillatorOptions) -> Option; #[cfg(feature = "ChannelCountMode")] + #[doc = "Change the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `OscillatorOptions`*"] #[wasm_bindgen(method, setter = "channelCountMode")] - fn set_channel_count_mode(this: &OscillatorOptions, val: ChannelCountMode); + pub fn set_channel_count_mode(this: &OscillatorOptions, val: ChannelCountMode); #[cfg(feature = "ChannelInterpretation")] #[doc = "Get the `channelInterpretation` field of this object."] #[doc = ""] @@ -33,22 +39,31 @@ extern "C" { #[wasm_bindgen(method, getter = "channelInterpretation")] pub fn get_channel_interpretation(this: &OscillatorOptions) -> Option; #[cfg(feature = "ChannelInterpretation")] + #[doc = "Change the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `OscillatorOptions`*"] #[wasm_bindgen(method, setter = "channelInterpretation")] - fn set_channel_interpretation(this: &OscillatorOptions, val: ChannelInterpretation); + pub fn set_channel_interpretation(this: &OscillatorOptions, val: ChannelInterpretation); #[doc = "Get the `detune` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `OscillatorOptions`*"] #[wasm_bindgen(method, getter = "detune")] pub fn get_detune(this: &OscillatorOptions) -> Option; + #[doc = "Change the `detune` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OscillatorOptions`*"] #[wasm_bindgen(method, setter = "detune")] - fn set_detune(this: &OscillatorOptions, val: f32); + pub fn set_detune(this: &OscillatorOptions, val: f32); #[doc = "Get the `frequency` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `OscillatorOptions`*"] #[wasm_bindgen(method, getter = "frequency")] pub fn get_frequency(this: &OscillatorOptions) -> Option; + #[doc = "Change the `frequency` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OscillatorOptions`*"] #[wasm_bindgen(method, setter = "frequency")] - fn set_frequency(this: &OscillatorOptions, val: f32); + pub fn set_frequency(this: &OscillatorOptions, val: f32); #[cfg(feature = "PeriodicWave")] #[doc = "Get the `periodicWave` field of this object."] #[doc = ""] @@ -56,8 +71,11 @@ extern "C" { #[wasm_bindgen(method, getter = "periodicWave")] pub fn get_periodic_wave(this: &OscillatorOptions) -> Option; #[cfg(feature = "PeriodicWave")] + #[doc = "Change the `periodicWave` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OscillatorOptions`, `PeriodicWave`*"] #[wasm_bindgen(method, setter = "periodicWave")] - fn set_periodic_wave(this: &OscillatorOptions, val: &PeriodicWave); + pub fn set_periodic_wave(this: &OscillatorOptions, val: &PeriodicWave); #[cfg(feature = "OscillatorType")] #[doc = "Get the `type` field of this object."] #[doc = ""] @@ -65,8 +83,11 @@ extern "C" { #[wasm_bindgen(method, getter = "type")] pub fn get_type(this: &OscillatorOptions) -> Option; #[cfg(feature = "OscillatorType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OscillatorOptions`, `OscillatorType`*"] #[wasm_bindgen(method, setter = "type")] - fn set_type(this: &OscillatorOptions, val: OscillatorType); + pub fn set_type(this: &OscillatorOptions, val: OscillatorType); } impl OscillatorOptions { #[doc = "Construct a new `OscillatorOptions`."] @@ -77,55 +98,41 @@ impl OscillatorOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `channelCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `OscillatorOptions`*"] + #[deprecated = "Use `set_channel_count()` instead."] pub fn channel_count(&mut self, val: u32) -> &mut Self { self.set_channel_count(val); self } #[cfg(feature = "ChannelCountMode")] - #[doc = "Change the `channelCountMode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `OscillatorOptions`*"] + #[deprecated = "Use `set_channel_count_mode()` instead."] pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self { self.set_channel_count_mode(val); self } #[cfg(feature = "ChannelInterpretation")] - #[doc = "Change the `channelInterpretation` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `OscillatorOptions`*"] + #[deprecated = "Use `set_channel_interpretation()` instead."] pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self { self.set_channel_interpretation(val); self } - #[doc = "Change the `detune` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `OscillatorOptions`*"] + #[deprecated = "Use `set_detune()` instead."] pub fn detune(&mut self, val: f32) -> &mut Self { self.set_detune(val); self } - #[doc = "Change the `frequency` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `OscillatorOptions`*"] + #[deprecated = "Use `set_frequency()` instead."] pub fn frequency(&mut self, val: f32) -> &mut Self { self.set_frequency(val); self } #[cfg(feature = "PeriodicWave")] - #[doc = "Change the `periodicWave` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `OscillatorOptions`, `PeriodicWave`*"] + #[deprecated = "Use `set_periodic_wave()` instead."] pub fn periodic_wave(&mut self, val: &PeriodicWave) -> &mut Self { self.set_periodic_wave(val); self } #[cfg(feature = "OscillatorType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `OscillatorOptions`, `OscillatorType`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: OscillatorType) -> &mut Self { self.set_type(val); self diff --git a/crates/web-sys/src/features/gen_PageTransitionEventInit.rs b/crates/web-sys/src/features/gen_PageTransitionEventInit.rs index 6e8381efde7a..28e3cbeba68c 100644 --- a/crates/web-sys/src/features/gen_PageTransitionEventInit.rs +++ b/crates/web-sys/src/features/gen_PageTransitionEventInit.rs @@ -15,36 +15,51 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `PageTransitionEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &PageTransitionEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PageTransitionEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &PageTransitionEventInit, val: bool); + pub fn set_bubbles(this: &PageTransitionEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PageTransitionEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &PageTransitionEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PageTransitionEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &PageTransitionEventInit, val: bool); + pub fn set_cancelable(this: &PageTransitionEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PageTransitionEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &PageTransitionEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PageTransitionEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &PageTransitionEventInit, val: bool); + pub fn set_composed(this: &PageTransitionEventInit, val: bool); #[doc = "Get the `inFrameSwap` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PageTransitionEventInit`*"] #[wasm_bindgen(method, getter = "inFrameSwap")] pub fn get_in_frame_swap(this: &PageTransitionEventInit) -> Option; + #[doc = "Change the `inFrameSwap` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PageTransitionEventInit`*"] #[wasm_bindgen(method, setter = "inFrameSwap")] - fn set_in_frame_swap(this: &PageTransitionEventInit, val: bool); + pub fn set_in_frame_swap(this: &PageTransitionEventInit, val: bool); #[doc = "Get the `persisted` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PageTransitionEventInit`*"] #[wasm_bindgen(method, getter = "persisted")] pub fn get_persisted(this: &PageTransitionEventInit) -> Option; + #[doc = "Change the `persisted` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PageTransitionEventInit`*"] #[wasm_bindgen(method, setter = "persisted")] - fn set_persisted(this: &PageTransitionEventInit, val: bool); + pub fn set_persisted(this: &PageTransitionEventInit, val: bool); } impl PageTransitionEventInit { #[doc = "Construct a new `PageTransitionEventInit`."] @@ -55,37 +70,27 @@ impl PageTransitionEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PageTransitionEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PageTransitionEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PageTransitionEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } - #[doc = "Change the `inFrameSwap` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PageTransitionEventInit`*"] + #[deprecated = "Use `set_in_frame_swap()` instead."] pub fn in_frame_swap(&mut self, val: bool) -> &mut Self { self.set_in_frame_swap(val); self } - #[doc = "Change the `persisted` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PageTransitionEventInit`*"] + #[deprecated = "Use `set_persisted()` instead."] pub fn persisted(&mut self, val: bool) -> &mut Self { self.set_persisted(val); self diff --git a/crates/web-sys/src/features/gen_PannerOptions.rs b/crates/web-sys/src/features/gen_PannerOptions.rs index e6390b810cda..2447947c572b 100644 --- a/crates/web-sys/src/features/gen_PannerOptions.rs +++ b/crates/web-sys/src/features/gen_PannerOptions.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] #[wasm_bindgen(method, getter = "channelCount")] pub fn get_channel_count(this: &PannerOptions) -> Option; + #[doc = "Change the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] #[wasm_bindgen(method, setter = "channelCount")] - fn set_channel_count(this: &PannerOptions, val: u32); + pub fn set_channel_count(this: &PannerOptions, val: u32); #[cfg(feature = "ChannelCountMode")] #[doc = "Get the `channelCountMode` field of this object."] #[doc = ""] @@ -24,8 +27,11 @@ extern "C" { #[wasm_bindgen(method, getter = "channelCountMode")] pub fn get_channel_count_mode(this: &PannerOptions) -> Option; #[cfg(feature = "ChannelCountMode")] + #[doc = "Change the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `PannerOptions`*"] #[wasm_bindgen(method, setter = "channelCountMode")] - fn set_channel_count_mode(this: &PannerOptions, val: ChannelCountMode); + pub fn set_channel_count_mode(this: &PannerOptions, val: ChannelCountMode); #[cfg(feature = "ChannelInterpretation")] #[doc = "Get the `channelInterpretation` field of this object."] #[doc = ""] @@ -33,29 +39,41 @@ extern "C" { #[wasm_bindgen(method, getter = "channelInterpretation")] pub fn get_channel_interpretation(this: &PannerOptions) -> Option; #[cfg(feature = "ChannelInterpretation")] + #[doc = "Change the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `PannerOptions`*"] #[wasm_bindgen(method, setter = "channelInterpretation")] - fn set_channel_interpretation(this: &PannerOptions, val: ChannelInterpretation); + pub fn set_channel_interpretation(this: &PannerOptions, val: ChannelInterpretation); #[doc = "Get the `coneInnerAngle` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] #[wasm_bindgen(method, getter = "coneInnerAngle")] pub fn get_cone_inner_angle(this: &PannerOptions) -> Option; + #[doc = "Change the `coneInnerAngle` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] #[wasm_bindgen(method, setter = "coneInnerAngle")] - fn set_cone_inner_angle(this: &PannerOptions, val: f64); + pub fn set_cone_inner_angle(this: &PannerOptions, val: f64); #[doc = "Get the `coneOuterAngle` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] #[wasm_bindgen(method, getter = "coneOuterAngle")] pub fn get_cone_outer_angle(this: &PannerOptions) -> Option; + #[doc = "Change the `coneOuterAngle` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] #[wasm_bindgen(method, setter = "coneOuterAngle")] - fn set_cone_outer_angle(this: &PannerOptions, val: f64); + pub fn set_cone_outer_angle(this: &PannerOptions, val: f64); #[doc = "Get the `coneOuterGain` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] #[wasm_bindgen(method, getter = "coneOuterGain")] pub fn get_cone_outer_gain(this: &PannerOptions) -> Option; + #[doc = "Change the `coneOuterGain` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] #[wasm_bindgen(method, setter = "coneOuterGain")] - fn set_cone_outer_gain(this: &PannerOptions, val: f64); + pub fn set_cone_outer_gain(this: &PannerOptions, val: f64); #[cfg(feature = "DistanceModelType")] #[doc = "Get the `distanceModel` field of this object."] #[doc = ""] @@ -63,36 +81,51 @@ extern "C" { #[wasm_bindgen(method, getter = "distanceModel")] pub fn get_distance_model(this: &PannerOptions) -> Option; #[cfg(feature = "DistanceModelType")] + #[doc = "Change the `distanceModel` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DistanceModelType`, `PannerOptions`*"] #[wasm_bindgen(method, setter = "distanceModel")] - fn set_distance_model(this: &PannerOptions, val: DistanceModelType); + pub fn set_distance_model(this: &PannerOptions, val: DistanceModelType); #[doc = "Get the `maxDistance` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] #[wasm_bindgen(method, getter = "maxDistance")] pub fn get_max_distance(this: &PannerOptions) -> Option; + #[doc = "Change the `maxDistance` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] #[wasm_bindgen(method, setter = "maxDistance")] - fn set_max_distance(this: &PannerOptions, val: f64); + pub fn set_max_distance(this: &PannerOptions, val: f64); #[doc = "Get the `orientationX` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] #[wasm_bindgen(method, getter = "orientationX")] pub fn get_orientation_x(this: &PannerOptions) -> Option; + #[doc = "Change the `orientationX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] #[wasm_bindgen(method, setter = "orientationX")] - fn set_orientation_x(this: &PannerOptions, val: f32); + pub fn set_orientation_x(this: &PannerOptions, val: f32); #[doc = "Get the `orientationY` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] #[wasm_bindgen(method, getter = "orientationY")] pub fn get_orientation_y(this: &PannerOptions) -> Option; + #[doc = "Change the `orientationY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] #[wasm_bindgen(method, setter = "orientationY")] - fn set_orientation_y(this: &PannerOptions, val: f32); + pub fn set_orientation_y(this: &PannerOptions, val: f32); #[doc = "Get the `orientationZ` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] #[wasm_bindgen(method, getter = "orientationZ")] pub fn get_orientation_z(this: &PannerOptions) -> Option; + #[doc = "Change the `orientationZ` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] #[wasm_bindgen(method, setter = "orientationZ")] - fn set_orientation_z(this: &PannerOptions, val: f32); + pub fn set_orientation_z(this: &PannerOptions, val: f32); #[cfg(feature = "PanningModelType")] #[doc = "Get the `panningModel` field of this object."] #[doc = ""] @@ -100,43 +133,61 @@ extern "C" { #[wasm_bindgen(method, getter = "panningModel")] pub fn get_panning_model(this: &PannerOptions) -> Option; #[cfg(feature = "PanningModelType")] + #[doc = "Change the `panningModel` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PannerOptions`, `PanningModelType`*"] #[wasm_bindgen(method, setter = "panningModel")] - fn set_panning_model(this: &PannerOptions, val: PanningModelType); + pub fn set_panning_model(this: &PannerOptions, val: PanningModelType); #[doc = "Get the `positionX` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] #[wasm_bindgen(method, getter = "positionX")] pub fn get_position_x(this: &PannerOptions) -> Option; + #[doc = "Change the `positionX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] #[wasm_bindgen(method, setter = "positionX")] - fn set_position_x(this: &PannerOptions, val: f32); + pub fn set_position_x(this: &PannerOptions, val: f32); #[doc = "Get the `positionY` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] #[wasm_bindgen(method, getter = "positionY")] pub fn get_position_y(this: &PannerOptions) -> Option; + #[doc = "Change the `positionY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] #[wasm_bindgen(method, setter = "positionY")] - fn set_position_y(this: &PannerOptions, val: f32); + pub fn set_position_y(this: &PannerOptions, val: f32); #[doc = "Get the `positionZ` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] #[wasm_bindgen(method, getter = "positionZ")] pub fn get_position_z(this: &PannerOptions) -> Option; + #[doc = "Change the `positionZ` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] #[wasm_bindgen(method, setter = "positionZ")] - fn set_position_z(this: &PannerOptions, val: f32); + pub fn set_position_z(this: &PannerOptions, val: f32); #[doc = "Get the `refDistance` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] #[wasm_bindgen(method, getter = "refDistance")] pub fn get_ref_distance(this: &PannerOptions) -> Option; + #[doc = "Change the `refDistance` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] #[wasm_bindgen(method, setter = "refDistance")] - fn set_ref_distance(this: &PannerOptions, val: f64); + pub fn set_ref_distance(this: &PannerOptions, val: f64); #[doc = "Get the `rolloffFactor` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] #[wasm_bindgen(method, getter = "rolloffFactor")] pub fn get_rolloff_factor(this: &PannerOptions) -> Option; + #[doc = "Change the `rolloffFactor` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] #[wasm_bindgen(method, setter = "rolloffFactor")] - fn set_rolloff_factor(this: &PannerOptions, val: f64); + pub fn set_rolloff_factor(this: &PannerOptions, val: f64); } impl PannerOptions { #[doc = "Construct a new `PannerOptions`."] @@ -147,125 +198,91 @@ impl PannerOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `channelCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] + #[deprecated = "Use `set_channel_count()` instead."] pub fn channel_count(&mut self, val: u32) -> &mut Self { self.set_channel_count(val); self } #[cfg(feature = "ChannelCountMode")] - #[doc = "Change the `channelCountMode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `PannerOptions`*"] + #[deprecated = "Use `set_channel_count_mode()` instead."] pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self { self.set_channel_count_mode(val); self } #[cfg(feature = "ChannelInterpretation")] - #[doc = "Change the `channelInterpretation` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `PannerOptions`*"] + #[deprecated = "Use `set_channel_interpretation()` instead."] pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self { self.set_channel_interpretation(val); self } - #[doc = "Change the `coneInnerAngle` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] + #[deprecated = "Use `set_cone_inner_angle()` instead."] pub fn cone_inner_angle(&mut self, val: f64) -> &mut Self { self.set_cone_inner_angle(val); self } - #[doc = "Change the `coneOuterAngle` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] + #[deprecated = "Use `set_cone_outer_angle()` instead."] pub fn cone_outer_angle(&mut self, val: f64) -> &mut Self { self.set_cone_outer_angle(val); self } - #[doc = "Change the `coneOuterGain` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] + #[deprecated = "Use `set_cone_outer_gain()` instead."] pub fn cone_outer_gain(&mut self, val: f64) -> &mut Self { self.set_cone_outer_gain(val); self } #[cfg(feature = "DistanceModelType")] - #[doc = "Change the `distanceModel` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DistanceModelType`, `PannerOptions`*"] + #[deprecated = "Use `set_distance_model()` instead."] pub fn distance_model(&mut self, val: DistanceModelType) -> &mut Self { self.set_distance_model(val); self } - #[doc = "Change the `maxDistance` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] + #[deprecated = "Use `set_max_distance()` instead."] pub fn max_distance(&mut self, val: f64) -> &mut Self { self.set_max_distance(val); self } - #[doc = "Change the `orientationX` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] + #[deprecated = "Use `set_orientation_x()` instead."] pub fn orientation_x(&mut self, val: f32) -> &mut Self { self.set_orientation_x(val); self } - #[doc = "Change the `orientationY` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] + #[deprecated = "Use `set_orientation_y()` instead."] pub fn orientation_y(&mut self, val: f32) -> &mut Self { self.set_orientation_y(val); self } - #[doc = "Change the `orientationZ` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] + #[deprecated = "Use `set_orientation_z()` instead."] pub fn orientation_z(&mut self, val: f32) -> &mut Self { self.set_orientation_z(val); self } #[cfg(feature = "PanningModelType")] - #[doc = "Change the `panningModel` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PannerOptions`, `PanningModelType`*"] + #[deprecated = "Use `set_panning_model()` instead."] pub fn panning_model(&mut self, val: PanningModelType) -> &mut Self { self.set_panning_model(val); self } - #[doc = "Change the `positionX` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] + #[deprecated = "Use `set_position_x()` instead."] pub fn position_x(&mut self, val: f32) -> &mut Self { self.set_position_x(val); self } - #[doc = "Change the `positionY` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] + #[deprecated = "Use `set_position_y()` instead."] pub fn position_y(&mut self, val: f32) -> &mut Self { self.set_position_y(val); self } - #[doc = "Change the `positionZ` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] + #[deprecated = "Use `set_position_z()` instead."] pub fn position_z(&mut self, val: f32) -> &mut Self { self.set_position_z(val); self } - #[doc = "Change the `refDistance` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] + #[deprecated = "Use `set_ref_distance()` instead."] pub fn ref_distance(&mut self, val: f64) -> &mut Self { self.set_ref_distance(val); self } - #[doc = "Change the `rolloffFactor` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] + #[deprecated = "Use `set_rolloff_factor()` instead."] pub fn rolloff_factor(&mut self, val: f64) -> &mut Self { self.set_rolloff_factor(val); self diff --git a/crates/web-sys/src/features/gen_PaymentMethodChangeEventInit.rs b/crates/web-sys/src/features/gen_PaymentMethodChangeEventInit.rs index 45d918732f8a..704c8b3e6dec 100644 --- a/crates/web-sys/src/features/gen_PaymentMethodChangeEventInit.rs +++ b/crates/web-sys/src/features/gen_PaymentMethodChangeEventInit.rs @@ -15,36 +15,51 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &PaymentMethodChangeEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &PaymentMethodChangeEventInit, val: bool); + pub fn set_bubbles(this: &PaymentMethodChangeEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &PaymentMethodChangeEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &PaymentMethodChangeEventInit, val: bool); + pub fn set_cancelable(this: &PaymentMethodChangeEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &PaymentMethodChangeEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &PaymentMethodChangeEventInit, val: bool); + pub fn set_composed(this: &PaymentMethodChangeEventInit, val: bool); #[doc = "Get the `methodDetails` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEventInit`*"] #[wasm_bindgen(method, getter = "methodDetails")] pub fn get_method_details(this: &PaymentMethodChangeEventInit) -> Option<::js_sys::Object>; + #[doc = "Change the `methodDetails` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEventInit`*"] #[wasm_bindgen(method, setter = "methodDetails")] - fn set_method_details(this: &PaymentMethodChangeEventInit, val: Option<&::js_sys::Object>); + pub fn set_method_details(this: &PaymentMethodChangeEventInit, val: Option<&::js_sys::Object>); #[doc = "Get the `methodName` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEventInit`*"] #[wasm_bindgen(method, getter = "methodName")] pub fn get_method_name(this: &PaymentMethodChangeEventInit) -> String; + #[doc = "Change the `methodName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEventInit`*"] #[wasm_bindgen(method, setter = "methodName")] - fn set_method_name(this: &PaymentMethodChangeEventInit, val: &str); + pub fn set_method_name(this: &PaymentMethodChangeEventInit, val: &str); } impl PaymentMethodChangeEventInit { #[doc = "Construct a new `PaymentMethodChangeEventInit`."] @@ -56,37 +71,27 @@ impl PaymentMethodChangeEventInit { ret.method_name(method_name); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } - #[doc = "Change the `methodDetails` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEventInit`*"] + #[deprecated = "Use `set_method_details()` instead."] pub fn method_details(&mut self, val: Option<&::js_sys::Object>) -> &mut Self { self.set_method_details(val); self } - #[doc = "Change the `methodName` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEventInit`*"] + #[deprecated = "Use `set_method_name()` instead."] pub fn method_name(&mut self, val: &str) -> &mut Self { self.set_method_name(val); self diff --git a/crates/web-sys/src/features/gen_PaymentRequestUpdateEventInit.rs b/crates/web-sys/src/features/gen_PaymentRequestUpdateEventInit.rs index 5023c01e0031..1ee2b7155321 100644 --- a/crates/web-sys/src/features/gen_PaymentRequestUpdateEventInit.rs +++ b/crates/web-sys/src/features/gen_PaymentRequestUpdateEventInit.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `PaymentRequestUpdateEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &PaymentRequestUpdateEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PaymentRequestUpdateEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &PaymentRequestUpdateEventInit, val: bool); + pub fn set_bubbles(this: &PaymentRequestUpdateEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PaymentRequestUpdateEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &PaymentRequestUpdateEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PaymentRequestUpdateEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &PaymentRequestUpdateEventInit, val: bool); + pub fn set_cancelable(this: &PaymentRequestUpdateEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PaymentRequestUpdateEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &PaymentRequestUpdateEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PaymentRequestUpdateEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &PaymentRequestUpdateEventInit, val: bool); + pub fn set_composed(this: &PaymentRequestUpdateEventInit, val: bool); } impl PaymentRequestUpdateEventInit { #[doc = "Construct a new `PaymentRequestUpdateEventInit`."] @@ -41,23 +50,17 @@ impl PaymentRequestUpdateEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PaymentRequestUpdateEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PaymentRequestUpdateEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PaymentRequestUpdateEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self diff --git a/crates/web-sys/src/features/gen_Pbkdf2Params.rs b/crates/web-sys/src/features/gen_Pbkdf2Params.rs index 3b5fc92d9dee..633188415805 100644 --- a/crates/web-sys/src/features/gen_Pbkdf2Params.rs +++ b/crates/web-sys/src/features/gen_Pbkdf2Params.rs @@ -15,29 +15,41 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `Pbkdf2Params`*"] #[wasm_bindgen(method, getter = "name")] pub fn get_name(this: &Pbkdf2Params) -> String; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Pbkdf2Params`*"] #[wasm_bindgen(method, setter = "name")] - fn set_name(this: &Pbkdf2Params, val: &str); + pub fn set_name(this: &Pbkdf2Params, val: &str); #[doc = "Get the `hash` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `Pbkdf2Params`*"] #[wasm_bindgen(method, getter = "hash")] pub fn get_hash(this: &Pbkdf2Params) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `hash` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Pbkdf2Params`*"] #[wasm_bindgen(method, setter = "hash")] - fn set_hash(this: &Pbkdf2Params, val: &::wasm_bindgen::JsValue); + pub fn set_hash(this: &Pbkdf2Params, val: &::wasm_bindgen::JsValue); #[doc = "Get the `iterations` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `Pbkdf2Params`*"] #[wasm_bindgen(method, getter = "iterations")] pub fn get_iterations(this: &Pbkdf2Params) -> u32; + #[doc = "Change the `iterations` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Pbkdf2Params`*"] #[wasm_bindgen(method, setter = "iterations")] - fn set_iterations(this: &Pbkdf2Params, val: u32); + pub fn set_iterations(this: &Pbkdf2Params, val: u32); #[doc = "Get the `salt` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `Pbkdf2Params`*"] #[wasm_bindgen(method, getter = "salt")] pub fn get_salt(this: &Pbkdf2Params) -> ::js_sys::Object; + #[doc = "Change the `salt` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Pbkdf2Params`*"] #[wasm_bindgen(method, setter = "salt")] - fn set_salt(this: &Pbkdf2Params, val: &::js_sys::Object); + pub fn set_salt(this: &Pbkdf2Params, val: &::js_sys::Object); } impl Pbkdf2Params { #[doc = "Construct a new `Pbkdf2Params`."] @@ -57,30 +69,22 @@ impl Pbkdf2Params { ret.salt(salt); ret } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `Pbkdf2Params`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { self.set_name(val); self } - #[doc = "Change the `hash` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `Pbkdf2Params`*"] + #[deprecated = "Use `set_hash()` instead."] pub fn hash(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_hash(val); self } - #[doc = "Change the `iterations` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `Pbkdf2Params`*"] + #[deprecated = "Use `set_iterations()` instead."] pub fn iterations(&mut self, val: u32) -> &mut Self { self.set_iterations(val); self } - #[doc = "Change the `salt` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `Pbkdf2Params`*"] + #[deprecated = "Use `set_salt()` instead."] pub fn salt(&mut self, val: &::js_sys::Object) -> &mut Self { self.set_salt(val); self diff --git a/crates/web-sys/src/features/gen_PerformanceEntryEventInit.rs b/crates/web-sys/src/features/gen_PerformanceEntryEventInit.rs index 8abee203d176..a8c4e2a9e28a 100644 --- a/crates/web-sys/src/features/gen_PerformanceEntryEventInit.rs +++ b/crates/web-sys/src/features/gen_PerformanceEntryEventInit.rs @@ -15,64 +15,91 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &PerformanceEntryEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &PerformanceEntryEventInit, val: bool); + pub fn set_bubbles(this: &PerformanceEntryEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &PerformanceEntryEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &PerformanceEntryEventInit, val: bool); + pub fn set_cancelable(this: &PerformanceEntryEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &PerformanceEntryEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &PerformanceEntryEventInit, val: bool); + pub fn set_composed(this: &PerformanceEntryEventInit, val: bool); #[doc = "Get the `duration` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] #[wasm_bindgen(method, getter = "duration")] pub fn get_duration(this: &PerformanceEntryEventInit) -> Option; + #[doc = "Change the `duration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] #[wasm_bindgen(method, setter = "duration")] - fn set_duration(this: &PerformanceEntryEventInit, val: f64); + pub fn set_duration(this: &PerformanceEntryEventInit, val: f64); #[doc = "Get the `entryType` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] #[wasm_bindgen(method, getter = "entryType")] pub fn get_entry_type(this: &PerformanceEntryEventInit) -> Option; + #[doc = "Change the `entryType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] #[wasm_bindgen(method, setter = "entryType")] - fn set_entry_type(this: &PerformanceEntryEventInit, val: &str); + pub fn set_entry_type(this: &PerformanceEntryEventInit, val: &str); #[doc = "Get the `epoch` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] #[wasm_bindgen(method, getter = "epoch")] pub fn get_epoch(this: &PerformanceEntryEventInit) -> Option; + #[doc = "Change the `epoch` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] #[wasm_bindgen(method, setter = "epoch")] - fn set_epoch(this: &PerformanceEntryEventInit, val: f64); + pub fn set_epoch(this: &PerformanceEntryEventInit, val: f64); #[doc = "Get the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] #[wasm_bindgen(method, getter = "name")] pub fn get_name(this: &PerformanceEntryEventInit) -> Option; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] #[wasm_bindgen(method, setter = "name")] - fn set_name(this: &PerformanceEntryEventInit, val: &str); + pub fn set_name(this: &PerformanceEntryEventInit, val: &str); #[doc = "Get the `origin` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] #[wasm_bindgen(method, getter = "origin")] pub fn get_origin(this: &PerformanceEntryEventInit) -> Option; + #[doc = "Change the `origin` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] #[wasm_bindgen(method, setter = "origin")] - fn set_origin(this: &PerformanceEntryEventInit, val: &str); + pub fn set_origin(this: &PerformanceEntryEventInit, val: &str); #[doc = "Get the `startTime` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] #[wasm_bindgen(method, getter = "startTime")] pub fn get_start_time(this: &PerformanceEntryEventInit) -> Option; + #[doc = "Change the `startTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] #[wasm_bindgen(method, setter = "startTime")] - fn set_start_time(this: &PerformanceEntryEventInit, val: f64); + pub fn set_start_time(this: &PerformanceEntryEventInit, val: f64); } impl PerformanceEntryEventInit { #[doc = "Construct a new `PerformanceEntryEventInit`."] @@ -83,65 +110,47 @@ impl PerformanceEntryEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } - #[doc = "Change the `duration` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] + #[deprecated = "Use `set_duration()` instead."] pub fn duration(&mut self, val: f64) -> &mut Self { self.set_duration(val); self } - #[doc = "Change the `entryType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] + #[deprecated = "Use `set_entry_type()` instead."] pub fn entry_type(&mut self, val: &str) -> &mut Self { self.set_entry_type(val); self } - #[doc = "Change the `epoch` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] + #[deprecated = "Use `set_epoch()` instead."] pub fn epoch(&mut self, val: f64) -> &mut Self { self.set_epoch(val); self } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { self.set_name(val); self } - #[doc = "Change the `origin` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] + #[deprecated = "Use `set_origin()` instead."] pub fn origin(&mut self, val: &str) -> &mut Self { self.set_origin(val); self } - #[doc = "Change the `startTime` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] + #[deprecated = "Use `set_start_time()` instead."] pub fn start_time(&mut self, val: f64) -> &mut Self { self.set_start_time(val); self diff --git a/crates/web-sys/src/features/gen_PerformanceEntryFilterOptions.rs b/crates/web-sys/src/features/gen_PerformanceEntryFilterOptions.rs index 2b1807c92b22..9300c84489a8 100644 --- a/crates/web-sys/src/features/gen_PerformanceEntryFilterOptions.rs +++ b/crates/web-sys/src/features/gen_PerformanceEntryFilterOptions.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryFilterOptions`*"] #[wasm_bindgen(method, getter = "entryType")] pub fn get_entry_type(this: &PerformanceEntryFilterOptions) -> Option; + #[doc = "Change the `entryType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryFilterOptions`*"] #[wasm_bindgen(method, setter = "entryType")] - fn set_entry_type(this: &PerformanceEntryFilterOptions, val: &str); + pub fn set_entry_type(this: &PerformanceEntryFilterOptions, val: &str); #[doc = "Get the `initiatorType` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryFilterOptions`*"] #[wasm_bindgen(method, getter = "initiatorType")] pub fn get_initiator_type(this: &PerformanceEntryFilterOptions) -> Option; + #[doc = "Change the `initiatorType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryFilterOptions`*"] #[wasm_bindgen(method, setter = "initiatorType")] - fn set_initiator_type(this: &PerformanceEntryFilterOptions, val: &str); + pub fn set_initiator_type(this: &PerformanceEntryFilterOptions, val: &str); #[doc = "Get the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryFilterOptions`*"] #[wasm_bindgen(method, getter = "name")] pub fn get_name(this: &PerformanceEntryFilterOptions) -> Option; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryFilterOptions`*"] #[wasm_bindgen(method, setter = "name")] - fn set_name(this: &PerformanceEntryFilterOptions, val: &str); + pub fn set_name(this: &PerformanceEntryFilterOptions, val: &str); } impl PerformanceEntryFilterOptions { #[doc = "Construct a new `PerformanceEntryFilterOptions`."] @@ -41,23 +50,17 @@ impl PerformanceEntryFilterOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `entryType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryFilterOptions`*"] + #[deprecated = "Use `set_entry_type()` instead."] pub fn entry_type(&mut self, val: &str) -> &mut Self { self.set_entry_type(val); self } - #[doc = "Change the `initiatorType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryFilterOptions`*"] + #[deprecated = "Use `set_initiator_type()` instead."] pub fn initiator_type(&mut self, val: &str) -> &mut Self { self.set_initiator_type(val); self } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryFilterOptions`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { self.set_name(val); self diff --git a/crates/web-sys/src/features/gen_PerformanceObserverInit.rs b/crates/web-sys/src/features/gen_PerformanceObserverInit.rs index 10221039c8ec..5a09e11a3910 100644 --- a/crates/web-sys/src/features/gen_PerformanceObserverInit.rs +++ b/crates/web-sys/src/features/gen_PerformanceObserverInit.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `PerformanceObserverInit`*"] #[wasm_bindgen(method, getter = "buffered")] pub fn get_buffered(this: &PerformanceObserverInit) -> Option; + #[doc = "Change the `buffered` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PerformanceObserverInit`*"] #[wasm_bindgen(method, setter = "buffered")] - fn set_buffered(this: &PerformanceObserverInit, val: bool); + pub fn set_buffered(this: &PerformanceObserverInit, val: bool); #[doc = "Get the `entryTypes` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PerformanceObserverInit`*"] #[wasm_bindgen(method, getter = "entryTypes")] pub fn get_entry_types(this: &PerformanceObserverInit) -> ::js_sys::Array; + #[doc = "Change the `entryTypes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PerformanceObserverInit`*"] #[wasm_bindgen(method, setter = "entryTypes")] - fn set_entry_types(this: &PerformanceObserverInit, val: &::wasm_bindgen::JsValue); + pub fn set_entry_types(this: &PerformanceObserverInit, val: &::wasm_bindgen::JsValue); } impl PerformanceObserverInit { #[doc = "Construct a new `PerformanceObserverInit`."] @@ -35,16 +41,12 @@ impl PerformanceObserverInit { ret.entry_types(entry_types); ret } - #[doc = "Change the `buffered` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PerformanceObserverInit`*"] + #[deprecated = "Use `set_buffered()` instead."] pub fn buffered(&mut self, val: bool) -> &mut Self { self.set_buffered(val); self } - #[doc = "Change the `entryTypes` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PerformanceObserverInit`*"] + #[deprecated = "Use `set_entry_types()` instead."] pub fn entry_types(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_entry_types(val); self diff --git a/crates/web-sys/src/features/gen_PeriodicWaveConstraints.rs b/crates/web-sys/src/features/gen_PeriodicWaveConstraints.rs index 3f246cc73f96..d861b30c1382 100644 --- a/crates/web-sys/src/features/gen_PeriodicWaveConstraints.rs +++ b/crates/web-sys/src/features/gen_PeriodicWaveConstraints.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `PeriodicWaveConstraints`*"] #[wasm_bindgen(method, getter = "disableNormalization")] pub fn get_disable_normalization(this: &PeriodicWaveConstraints) -> Option; + #[doc = "Change the `disableNormalization` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PeriodicWaveConstraints`*"] #[wasm_bindgen(method, setter = "disableNormalization")] - fn set_disable_normalization(this: &PeriodicWaveConstraints, val: bool); + pub fn set_disable_normalization(this: &PeriodicWaveConstraints, val: bool); } impl PeriodicWaveConstraints { #[doc = "Construct a new `PeriodicWaveConstraints`."] @@ -27,9 +30,7 @@ impl PeriodicWaveConstraints { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `disableNormalization` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PeriodicWaveConstraints`*"] + #[deprecated = "Use `set_disable_normalization()` instead."] pub fn disable_normalization(&mut self, val: bool) -> &mut Self { self.set_disable_normalization(val); self diff --git a/crates/web-sys/src/features/gen_PeriodicWaveOptions.rs b/crates/web-sys/src/features/gen_PeriodicWaveOptions.rs index 83b742963bf5..d2adf3247e46 100644 --- a/crates/web-sys/src/features/gen_PeriodicWaveOptions.rs +++ b/crates/web-sys/src/features/gen_PeriodicWaveOptions.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `PeriodicWaveOptions`*"] #[wasm_bindgen(method, getter = "disableNormalization")] pub fn get_disable_normalization(this: &PeriodicWaveOptions) -> Option; + #[doc = "Change the `disableNormalization` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PeriodicWaveOptions`*"] #[wasm_bindgen(method, setter = "disableNormalization")] - fn set_disable_normalization(this: &PeriodicWaveOptions, val: bool); + pub fn set_disable_normalization(this: &PeriodicWaveOptions, val: bool); #[doc = "Get the `imag` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PeriodicWaveOptions`*"] #[wasm_bindgen(method, getter = "imag")] pub fn get_imag(this: &PeriodicWaveOptions) -> Option<::js_sys::Array>; + #[doc = "Change the `imag` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PeriodicWaveOptions`*"] #[wasm_bindgen(method, setter = "imag")] - fn set_imag(this: &PeriodicWaveOptions, val: &::wasm_bindgen::JsValue); + pub fn set_imag(this: &PeriodicWaveOptions, val: &::wasm_bindgen::JsValue); #[doc = "Get the `real` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PeriodicWaveOptions`*"] #[wasm_bindgen(method, getter = "real")] pub fn get_real(this: &PeriodicWaveOptions) -> Option<::js_sys::Array>; + #[doc = "Change the `real` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PeriodicWaveOptions`*"] #[wasm_bindgen(method, setter = "real")] - fn set_real(this: &PeriodicWaveOptions, val: &::wasm_bindgen::JsValue); + pub fn set_real(this: &PeriodicWaveOptions, val: &::wasm_bindgen::JsValue); } impl PeriodicWaveOptions { #[doc = "Construct a new `PeriodicWaveOptions`."] @@ -41,23 +50,17 @@ impl PeriodicWaveOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `disableNormalization` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PeriodicWaveOptions`*"] + #[deprecated = "Use `set_disable_normalization()` instead."] pub fn disable_normalization(&mut self, val: bool) -> &mut Self { self.set_disable_normalization(val); self } - #[doc = "Change the `imag` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PeriodicWaveOptions`*"] + #[deprecated = "Use `set_imag()` instead."] pub fn imag(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_imag(val); self } - #[doc = "Change the `real` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PeriodicWaveOptions`*"] + #[deprecated = "Use `set_real()` instead."] pub fn real(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_real(val); self diff --git a/crates/web-sys/src/features/gen_PermissionDescriptor.rs b/crates/web-sys/src/features/gen_PermissionDescriptor.rs index 051b4669a00e..23005e4591f5 100644 --- a/crates/web-sys/src/features/gen_PermissionDescriptor.rs +++ b/crates/web-sys/src/features/gen_PermissionDescriptor.rs @@ -17,8 +17,11 @@ extern "C" { #[wasm_bindgen(method, getter = "name")] pub fn get_name(this: &PermissionDescriptor) -> PermissionName; #[cfg(feature = "PermissionName")] + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PermissionDescriptor`, `PermissionName`*"] #[wasm_bindgen(method, setter = "name")] - fn set_name(this: &PermissionDescriptor, val: PermissionName); + pub fn set_name(this: &PermissionDescriptor, val: PermissionName); } impl PermissionDescriptor { #[cfg(feature = "PermissionName")] @@ -32,9 +35,7 @@ impl PermissionDescriptor { ret } #[cfg(feature = "PermissionName")] - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PermissionDescriptor`, `PermissionName`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: PermissionName) -> &mut Self { self.set_name(val); self diff --git a/crates/web-sys/src/features/gen_PlaneLayout.rs b/crates/web-sys/src/features/gen_PlaneLayout.rs index e3d6acfde697..5b6df33cc86a 100644 --- a/crates/web-sys/src/features/gen_PlaneLayout.rs +++ b/crates/web-sys/src/features/gen_PlaneLayout.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "offset")] pub fn get_offset(this: &PlaneLayout) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `offset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PlaneLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "offset")] - fn set_offset(this: &PlaneLayout, val: u32); + pub fn set_offset(this: &PlaneLayout, val: u32); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `stride` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "stride")] pub fn get_stride(this: &PlaneLayout) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `stride` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PlaneLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "stride")] - fn set_stride(this: &PlaneLayout, val: u32); + pub fn set_stride(this: &PlaneLayout, val: u32); } #[cfg(web_sys_unstable_apis)] impl PlaneLayout { @@ -53,23 +67,13 @@ impl PlaneLayout { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `offset` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PlaneLayout`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_offset()` instead."] pub fn offset(&mut self, val: u32) -> &mut Self { self.set_offset(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `stride` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PlaneLayout`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_stride()` instead."] pub fn stride(&mut self, val: u32) -> &mut Self { self.set_stride(val); self diff --git a/crates/web-sys/src/features/gen_PluginCrashedEventInit.rs b/crates/web-sys/src/features/gen_PluginCrashedEventInit.rs index b74495a61c71..ec2914c4923c 100644 --- a/crates/web-sys/src/features/gen_PluginCrashedEventInit.rs +++ b/crates/web-sys/src/features/gen_PluginCrashedEventInit.rs @@ -15,71 +15,101 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &PluginCrashedEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &PluginCrashedEventInit, val: bool); + pub fn set_bubbles(this: &PluginCrashedEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &PluginCrashedEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &PluginCrashedEventInit, val: bool); + pub fn set_cancelable(this: &PluginCrashedEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &PluginCrashedEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &PluginCrashedEventInit, val: bool); + pub fn set_composed(this: &PluginCrashedEventInit, val: bool); #[doc = "Get the `browserDumpID` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] #[wasm_bindgen(method, getter = "browserDumpID")] pub fn get_browser_dump_id(this: &PluginCrashedEventInit) -> Option; + #[doc = "Change the `browserDumpID` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] #[wasm_bindgen(method, setter = "browserDumpID")] - fn set_browser_dump_id(this: &PluginCrashedEventInit, val: Option<&str>); + pub fn set_browser_dump_id(this: &PluginCrashedEventInit, val: Option<&str>); #[doc = "Get the `gmpPlugin` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] #[wasm_bindgen(method, getter = "gmpPlugin")] pub fn get_gmp_plugin(this: &PluginCrashedEventInit) -> Option; + #[doc = "Change the `gmpPlugin` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] #[wasm_bindgen(method, setter = "gmpPlugin")] - fn set_gmp_plugin(this: &PluginCrashedEventInit, val: bool); + pub fn set_gmp_plugin(this: &PluginCrashedEventInit, val: bool); #[doc = "Get the `pluginDumpID` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] #[wasm_bindgen(method, getter = "pluginDumpID")] pub fn get_plugin_dump_id(this: &PluginCrashedEventInit) -> Option; + #[doc = "Change the `pluginDumpID` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] #[wasm_bindgen(method, setter = "pluginDumpID")] - fn set_plugin_dump_id(this: &PluginCrashedEventInit, val: &str); + pub fn set_plugin_dump_id(this: &PluginCrashedEventInit, val: &str); #[doc = "Get the `pluginFilename` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] #[wasm_bindgen(method, getter = "pluginFilename")] pub fn get_plugin_filename(this: &PluginCrashedEventInit) -> Option; + #[doc = "Change the `pluginFilename` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] #[wasm_bindgen(method, setter = "pluginFilename")] - fn set_plugin_filename(this: &PluginCrashedEventInit, val: Option<&str>); + pub fn set_plugin_filename(this: &PluginCrashedEventInit, val: Option<&str>); #[doc = "Get the `pluginID` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] #[wasm_bindgen(method, getter = "pluginID")] pub fn get_plugin_id(this: &PluginCrashedEventInit) -> Option; + #[doc = "Change the `pluginID` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] #[wasm_bindgen(method, setter = "pluginID")] - fn set_plugin_id(this: &PluginCrashedEventInit, val: u32); + pub fn set_plugin_id(this: &PluginCrashedEventInit, val: u32); #[doc = "Get the `pluginName` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] #[wasm_bindgen(method, getter = "pluginName")] pub fn get_plugin_name(this: &PluginCrashedEventInit) -> Option; + #[doc = "Change the `pluginName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] #[wasm_bindgen(method, setter = "pluginName")] - fn set_plugin_name(this: &PluginCrashedEventInit, val: &str); + pub fn set_plugin_name(this: &PluginCrashedEventInit, val: &str); #[doc = "Get the `submittedCrashReport` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] #[wasm_bindgen(method, getter = "submittedCrashReport")] pub fn get_submitted_crash_report(this: &PluginCrashedEventInit) -> Option; + #[doc = "Change the `submittedCrashReport` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] #[wasm_bindgen(method, setter = "submittedCrashReport")] - fn set_submitted_crash_report(this: &PluginCrashedEventInit, val: bool); + pub fn set_submitted_crash_report(this: &PluginCrashedEventInit, val: bool); } impl PluginCrashedEventInit { #[doc = "Construct a new `PluginCrashedEventInit`."] @@ -90,72 +120,52 @@ impl PluginCrashedEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } - #[doc = "Change the `browserDumpID` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] + #[deprecated = "Use `set_browser_dump_id()` instead."] pub fn browser_dump_id(&mut self, val: Option<&str>) -> &mut Self { self.set_browser_dump_id(val); self } - #[doc = "Change the `gmpPlugin` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] + #[deprecated = "Use `set_gmp_plugin()` instead."] pub fn gmp_plugin(&mut self, val: bool) -> &mut Self { self.set_gmp_plugin(val); self } - #[doc = "Change the `pluginDumpID` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] + #[deprecated = "Use `set_plugin_dump_id()` instead."] pub fn plugin_dump_id(&mut self, val: &str) -> &mut Self { self.set_plugin_dump_id(val); self } - #[doc = "Change the `pluginFilename` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] + #[deprecated = "Use `set_plugin_filename()` instead."] pub fn plugin_filename(&mut self, val: Option<&str>) -> &mut Self { self.set_plugin_filename(val); self } - #[doc = "Change the `pluginID` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] + #[deprecated = "Use `set_plugin_id()` instead."] pub fn plugin_id(&mut self, val: u32) -> &mut Self { self.set_plugin_id(val); self } - #[doc = "Change the `pluginName` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] + #[deprecated = "Use `set_plugin_name()` instead."] pub fn plugin_name(&mut self, val: &str) -> &mut Self { self.set_plugin_name(val); self } - #[doc = "Change the `submittedCrashReport` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] + #[deprecated = "Use `set_submitted_crash_report()` instead."] pub fn submitted_crash_report(&mut self, val: bool) -> &mut Self { self.set_submitted_crash_report(val); self diff --git a/crates/web-sys/src/features/gen_PointerEventInit.rs b/crates/web-sys/src/features/gen_PointerEventInit.rs index 03a0e5b34a90..c07ee4a26d43 100644 --- a/crates/web-sys/src/features/gen_PointerEventInit.rs +++ b/crates/web-sys/src/features/gen_PointerEventInit.rs @@ -15,29 +15,41 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &PointerEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &PointerEventInit, val: bool); + pub fn set_bubbles(this: &PointerEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &PointerEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &PointerEventInit, val: bool); + pub fn set_cancelable(this: &PointerEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &PointerEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &PointerEventInit, val: bool); + pub fn set_composed(this: &PointerEventInit, val: bool); #[doc = "Get the `detail` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, getter = "detail")] pub fn get_detail(this: &PointerEventInit) -> Option; + #[doc = "Change the `detail` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "detail")] - fn set_detail(this: &PointerEventInit, val: i32); + pub fn set_detail(this: &PointerEventInit, val: i32); #[cfg(feature = "Window")] #[doc = "Get the `view` field of this object."] #[doc = ""] @@ -45,141 +57,201 @@ extern "C" { #[wasm_bindgen(method, getter = "view")] pub fn get_view(this: &PointerEventInit) -> Option; #[cfg(feature = "Window")] + #[doc = "Change the `view` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`, `Window`*"] #[wasm_bindgen(method, setter = "view")] - fn set_view(this: &PointerEventInit, val: Option<&Window>); + pub fn set_view(this: &PointerEventInit, val: Option<&Window>); #[doc = "Get the `altKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, getter = "altKey")] pub fn get_alt_key(this: &PointerEventInit) -> Option; + #[doc = "Change the `altKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "altKey")] - fn set_alt_key(this: &PointerEventInit, val: bool); + pub fn set_alt_key(this: &PointerEventInit, val: bool); #[doc = "Get the `ctrlKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, getter = "ctrlKey")] pub fn get_ctrl_key(this: &PointerEventInit) -> Option; + #[doc = "Change the `ctrlKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "ctrlKey")] - fn set_ctrl_key(this: &PointerEventInit, val: bool); + pub fn set_ctrl_key(this: &PointerEventInit, val: bool); #[doc = "Get the `metaKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, getter = "metaKey")] pub fn get_meta_key(this: &PointerEventInit) -> Option; + #[doc = "Change the `metaKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "metaKey")] - fn set_meta_key(this: &PointerEventInit, val: bool); + pub fn set_meta_key(this: &PointerEventInit, val: bool); #[doc = "Get the `modifierAltGraph` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, getter = "modifierAltGraph")] pub fn get_modifier_alt_graph(this: &PointerEventInit) -> Option; + #[doc = "Change the `modifierAltGraph` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "modifierAltGraph")] - fn set_modifier_alt_graph(this: &PointerEventInit, val: bool); + pub fn set_modifier_alt_graph(this: &PointerEventInit, val: bool); #[doc = "Get the `modifierCapsLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, getter = "modifierCapsLock")] pub fn get_modifier_caps_lock(this: &PointerEventInit) -> Option; + #[doc = "Change the `modifierCapsLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "modifierCapsLock")] - fn set_modifier_caps_lock(this: &PointerEventInit, val: bool); + pub fn set_modifier_caps_lock(this: &PointerEventInit, val: bool); #[doc = "Get the `modifierFn` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, getter = "modifierFn")] pub fn get_modifier_fn(this: &PointerEventInit) -> Option; + #[doc = "Change the `modifierFn` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "modifierFn")] - fn set_modifier_fn(this: &PointerEventInit, val: bool); + pub fn set_modifier_fn(this: &PointerEventInit, val: bool); #[doc = "Get the `modifierFnLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, getter = "modifierFnLock")] pub fn get_modifier_fn_lock(this: &PointerEventInit) -> Option; + #[doc = "Change the `modifierFnLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "modifierFnLock")] - fn set_modifier_fn_lock(this: &PointerEventInit, val: bool); + pub fn set_modifier_fn_lock(this: &PointerEventInit, val: bool); #[doc = "Get the `modifierNumLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, getter = "modifierNumLock")] pub fn get_modifier_num_lock(this: &PointerEventInit) -> Option; + #[doc = "Change the `modifierNumLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "modifierNumLock")] - fn set_modifier_num_lock(this: &PointerEventInit, val: bool); + pub fn set_modifier_num_lock(this: &PointerEventInit, val: bool); #[doc = "Get the `modifierOS` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, getter = "modifierOS")] pub fn get_modifier_os(this: &PointerEventInit) -> Option; + #[doc = "Change the `modifierOS` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "modifierOS")] - fn set_modifier_os(this: &PointerEventInit, val: bool); + pub fn set_modifier_os(this: &PointerEventInit, val: bool); #[doc = "Get the `modifierScrollLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, getter = "modifierScrollLock")] pub fn get_modifier_scroll_lock(this: &PointerEventInit) -> Option; + #[doc = "Change the `modifierScrollLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "modifierScrollLock")] - fn set_modifier_scroll_lock(this: &PointerEventInit, val: bool); + pub fn set_modifier_scroll_lock(this: &PointerEventInit, val: bool); #[doc = "Get the `modifierSymbol` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, getter = "modifierSymbol")] pub fn get_modifier_symbol(this: &PointerEventInit) -> Option; + #[doc = "Change the `modifierSymbol` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "modifierSymbol")] - fn set_modifier_symbol(this: &PointerEventInit, val: bool); + pub fn set_modifier_symbol(this: &PointerEventInit, val: bool); #[doc = "Get the `modifierSymbolLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, getter = "modifierSymbolLock")] pub fn get_modifier_symbol_lock(this: &PointerEventInit) -> Option; + #[doc = "Change the `modifierSymbolLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "modifierSymbolLock")] - fn set_modifier_symbol_lock(this: &PointerEventInit, val: bool); + pub fn set_modifier_symbol_lock(this: &PointerEventInit, val: bool); #[doc = "Get the `shiftKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, getter = "shiftKey")] pub fn get_shift_key(this: &PointerEventInit) -> Option; + #[doc = "Change the `shiftKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "shiftKey")] - fn set_shift_key(this: &PointerEventInit, val: bool); + pub fn set_shift_key(this: &PointerEventInit, val: bool); #[doc = "Get the `button` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, getter = "button")] pub fn get_button(this: &PointerEventInit) -> Option; + #[doc = "Change the `button` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "button")] - fn set_button(this: &PointerEventInit, val: i16); + pub fn set_button(this: &PointerEventInit, val: i16); #[doc = "Get the `buttons` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, getter = "buttons")] pub fn get_buttons(this: &PointerEventInit) -> Option; + #[doc = "Change the `buttons` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "buttons")] - fn set_buttons(this: &PointerEventInit, val: u16); + pub fn set_buttons(this: &PointerEventInit, val: u16); #[doc = "Get the `clientX` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, getter = "clientX")] pub fn get_client_x(this: &PointerEventInit) -> Option; + #[doc = "Change the `clientX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "clientX")] - fn set_client_x(this: &PointerEventInit, val: i32); + pub fn set_client_x(this: &PointerEventInit, val: i32); #[doc = "Get the `clientY` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, getter = "clientY")] pub fn get_client_y(this: &PointerEventInit) -> Option; + #[doc = "Change the `clientY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "clientY")] - fn set_client_y(this: &PointerEventInit, val: i32); + pub fn set_client_y(this: &PointerEventInit, val: i32); #[doc = "Get the `movementX` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, getter = "movementX")] pub fn get_movement_x(this: &PointerEventInit) -> Option; + #[doc = "Change the `movementX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "movementX")] - fn set_movement_x(this: &PointerEventInit, val: i32); + pub fn set_movement_x(this: &PointerEventInit, val: i32); #[doc = "Get the `movementY` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, getter = "movementY")] pub fn get_movement_y(this: &PointerEventInit) -> Option; + #[doc = "Change the `movementY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "movementY")] - fn set_movement_y(this: &PointerEventInit, val: i32); + pub fn set_movement_y(this: &PointerEventInit, val: i32); #[cfg(feature = "EventTarget")] #[doc = "Get the `relatedTarget` field of this object."] #[doc = ""] @@ -187,99 +259,141 @@ extern "C" { #[wasm_bindgen(method, getter = "relatedTarget")] pub fn get_related_target(this: &PointerEventInit) -> Option; #[cfg(feature = "EventTarget")] + #[doc = "Change the `relatedTarget` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventTarget`, `PointerEventInit`*"] #[wasm_bindgen(method, setter = "relatedTarget")] - fn set_related_target(this: &PointerEventInit, val: Option<&EventTarget>); + pub fn set_related_target(this: &PointerEventInit, val: Option<&EventTarget>); #[doc = "Get the `screenX` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, getter = "screenX")] pub fn get_screen_x(this: &PointerEventInit) -> Option; + #[doc = "Change the `screenX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "screenX")] - fn set_screen_x(this: &PointerEventInit, val: i32); + pub fn set_screen_x(this: &PointerEventInit, val: i32); #[doc = "Get the `screenY` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, getter = "screenY")] pub fn get_screen_y(this: &PointerEventInit) -> Option; + #[doc = "Change the `screenY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "screenY")] - fn set_screen_y(this: &PointerEventInit, val: i32); + pub fn set_screen_y(this: &PointerEventInit, val: i32); #[doc = "Get the `coalescedEvents` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, getter = "coalescedEvents")] pub fn get_coalesced_events(this: &PointerEventInit) -> Option<::js_sys::Array>; + #[doc = "Change the `coalescedEvents` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "coalescedEvents")] - fn set_coalesced_events(this: &PointerEventInit, val: &::wasm_bindgen::JsValue); + pub fn set_coalesced_events(this: &PointerEventInit, val: &::wasm_bindgen::JsValue); #[doc = "Get the `height` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, getter = "height")] pub fn get_height(this: &PointerEventInit) -> Option; + #[doc = "Change the `height` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "height")] - fn set_height(this: &PointerEventInit, val: i32); + pub fn set_height(this: &PointerEventInit, val: i32); #[doc = "Get the `isPrimary` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, getter = "isPrimary")] pub fn get_is_primary(this: &PointerEventInit) -> Option; + #[doc = "Change the `isPrimary` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "isPrimary")] - fn set_is_primary(this: &PointerEventInit, val: bool); + pub fn set_is_primary(this: &PointerEventInit, val: bool); #[doc = "Get the `pointerId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, getter = "pointerId")] pub fn get_pointer_id(this: &PointerEventInit) -> Option; + #[doc = "Change the `pointerId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "pointerId")] - fn set_pointer_id(this: &PointerEventInit, val: i32); + pub fn set_pointer_id(this: &PointerEventInit, val: i32); #[doc = "Get the `pointerType` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, getter = "pointerType")] pub fn get_pointer_type(this: &PointerEventInit) -> Option; + #[doc = "Change the `pointerType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "pointerType")] - fn set_pointer_type(this: &PointerEventInit, val: &str); + pub fn set_pointer_type(this: &PointerEventInit, val: &str); #[doc = "Get the `pressure` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, getter = "pressure")] pub fn get_pressure(this: &PointerEventInit) -> Option; + #[doc = "Change the `pressure` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "pressure")] - fn set_pressure(this: &PointerEventInit, val: f32); + pub fn set_pressure(this: &PointerEventInit, val: f32); #[doc = "Get the `tangentialPressure` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, getter = "tangentialPressure")] pub fn get_tangential_pressure(this: &PointerEventInit) -> Option; + #[doc = "Change the `tangentialPressure` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "tangentialPressure")] - fn set_tangential_pressure(this: &PointerEventInit, val: f32); + pub fn set_tangential_pressure(this: &PointerEventInit, val: f32); #[doc = "Get the `tiltX` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, getter = "tiltX")] pub fn get_tilt_x(this: &PointerEventInit) -> Option; + #[doc = "Change the `tiltX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "tiltX")] - fn set_tilt_x(this: &PointerEventInit, val: i32); + pub fn set_tilt_x(this: &PointerEventInit, val: i32); #[doc = "Get the `tiltY` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, getter = "tiltY")] pub fn get_tilt_y(this: &PointerEventInit) -> Option; + #[doc = "Change the `tiltY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "tiltY")] - fn set_tilt_y(this: &PointerEventInit, val: i32); + pub fn set_tilt_y(this: &PointerEventInit, val: i32); #[doc = "Get the `twist` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, getter = "twist")] pub fn get_twist(this: &PointerEventInit) -> Option; + #[doc = "Change the `twist` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "twist")] - fn set_twist(this: &PointerEventInit, val: i32); + pub fn set_twist(this: &PointerEventInit, val: i32); #[doc = "Get the `width` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, getter = "width")] pub fn get_width(this: &PointerEventInit) -> Option; + #[doc = "Change the `width` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "width")] - fn set_width(this: &PointerEventInit, val: i32); + pub fn set_width(this: &PointerEventInit, val: i32); } impl PointerEventInit { #[doc = "Construct a new `PointerEventInit`."] @@ -290,270 +404,194 @@ impl PointerEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } - #[doc = "Change the `detail` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_detail()` instead."] pub fn detail(&mut self, val: i32) -> &mut Self { self.set_detail(val); self } #[cfg(feature = "Window")] - #[doc = "Change the `view` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`, `Window`*"] + #[deprecated = "Use `set_view()` instead."] pub fn view(&mut self, val: Option<&Window>) -> &mut Self { self.set_view(val); self } - #[doc = "Change the `altKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_alt_key()` instead."] pub fn alt_key(&mut self, val: bool) -> &mut Self { self.set_alt_key(val); self } - #[doc = "Change the `ctrlKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_ctrl_key()` instead."] pub fn ctrl_key(&mut self, val: bool) -> &mut Self { self.set_ctrl_key(val); self } - #[doc = "Change the `metaKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_meta_key()` instead."] pub fn meta_key(&mut self, val: bool) -> &mut Self { self.set_meta_key(val); self } - #[doc = "Change the `modifierAltGraph` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_modifier_alt_graph()` instead."] pub fn modifier_alt_graph(&mut self, val: bool) -> &mut Self { self.set_modifier_alt_graph(val); self } - #[doc = "Change the `modifierCapsLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_modifier_caps_lock()` instead."] pub fn modifier_caps_lock(&mut self, val: bool) -> &mut Self { self.set_modifier_caps_lock(val); self } - #[doc = "Change the `modifierFn` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_modifier_fn()` instead."] pub fn modifier_fn(&mut self, val: bool) -> &mut Self { self.set_modifier_fn(val); self } - #[doc = "Change the `modifierFnLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_modifier_fn_lock()` instead."] pub fn modifier_fn_lock(&mut self, val: bool) -> &mut Self { self.set_modifier_fn_lock(val); self } - #[doc = "Change the `modifierNumLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_modifier_num_lock()` instead."] pub fn modifier_num_lock(&mut self, val: bool) -> &mut Self { self.set_modifier_num_lock(val); self } - #[doc = "Change the `modifierOS` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_modifier_os()` instead."] pub fn modifier_os(&mut self, val: bool) -> &mut Self { self.set_modifier_os(val); self } - #[doc = "Change the `modifierScrollLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_modifier_scroll_lock()` instead."] pub fn modifier_scroll_lock(&mut self, val: bool) -> &mut Self { self.set_modifier_scroll_lock(val); self } - #[doc = "Change the `modifierSymbol` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_modifier_symbol()` instead."] pub fn modifier_symbol(&mut self, val: bool) -> &mut Self { self.set_modifier_symbol(val); self } - #[doc = "Change the `modifierSymbolLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_modifier_symbol_lock()` instead."] pub fn modifier_symbol_lock(&mut self, val: bool) -> &mut Self { self.set_modifier_symbol_lock(val); self } - #[doc = "Change the `shiftKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_shift_key()` instead."] pub fn shift_key(&mut self, val: bool) -> &mut Self { self.set_shift_key(val); self } - #[doc = "Change the `button` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_button()` instead."] pub fn button(&mut self, val: i16) -> &mut Self { self.set_button(val); self } - #[doc = "Change the `buttons` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_buttons()` instead."] pub fn buttons(&mut self, val: u16) -> &mut Self { self.set_buttons(val); self } - #[doc = "Change the `clientX` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_client_x()` instead."] pub fn client_x(&mut self, val: i32) -> &mut Self { self.set_client_x(val); self } - #[doc = "Change the `clientY` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_client_y()` instead."] pub fn client_y(&mut self, val: i32) -> &mut Self { self.set_client_y(val); self } - #[doc = "Change the `movementX` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_movement_x()` instead."] pub fn movement_x(&mut self, val: i32) -> &mut Self { self.set_movement_x(val); self } - #[doc = "Change the `movementY` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_movement_y()` instead."] pub fn movement_y(&mut self, val: i32) -> &mut Self { self.set_movement_y(val); self } #[cfg(feature = "EventTarget")] - #[doc = "Change the `relatedTarget` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventTarget`, `PointerEventInit`*"] + #[deprecated = "Use `set_related_target()` instead."] pub fn related_target(&mut self, val: Option<&EventTarget>) -> &mut Self { self.set_related_target(val); self } - #[doc = "Change the `screenX` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_screen_x()` instead."] pub fn screen_x(&mut self, val: i32) -> &mut Self { self.set_screen_x(val); self } - #[doc = "Change the `screenY` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_screen_y()` instead."] pub fn screen_y(&mut self, val: i32) -> &mut Self { self.set_screen_y(val); self } - #[doc = "Change the `coalescedEvents` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_coalesced_events()` instead."] pub fn coalesced_events(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_coalesced_events(val); self } - #[doc = "Change the `height` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_height()` instead."] pub fn height(&mut self, val: i32) -> &mut Self { self.set_height(val); self } - #[doc = "Change the `isPrimary` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_is_primary()` instead."] pub fn is_primary(&mut self, val: bool) -> &mut Self { self.set_is_primary(val); self } - #[doc = "Change the `pointerId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_pointer_id()` instead."] pub fn pointer_id(&mut self, val: i32) -> &mut Self { self.set_pointer_id(val); self } - #[doc = "Change the `pointerType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_pointer_type()` instead."] pub fn pointer_type(&mut self, val: &str) -> &mut Self { self.set_pointer_type(val); self } - #[doc = "Change the `pressure` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_pressure()` instead."] pub fn pressure(&mut self, val: f32) -> &mut Self { self.set_pressure(val); self } - #[doc = "Change the `tangentialPressure` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_tangential_pressure()` instead."] pub fn tangential_pressure(&mut self, val: f32) -> &mut Self { self.set_tangential_pressure(val); self } - #[doc = "Change the `tiltX` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_tilt_x()` instead."] pub fn tilt_x(&mut self, val: i32) -> &mut Self { self.set_tilt_x(val); self } - #[doc = "Change the `tiltY` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_tilt_y()` instead."] pub fn tilt_y(&mut self, val: i32) -> &mut Self { self.set_tilt_y(val); self } - #[doc = "Change the `twist` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_twist()` instead."] pub fn twist(&mut self, val: i32) -> &mut Self { self.set_twist(val); self } - #[doc = "Change the `width` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_width()` instead."] pub fn width(&mut self, val: i32) -> &mut Self { self.set_width(val); self diff --git a/crates/web-sys/src/features/gen_PopStateEventInit.rs b/crates/web-sys/src/features/gen_PopStateEventInit.rs index fa2ec6502eff..61178cc017e1 100644 --- a/crates/web-sys/src/features/gen_PopStateEventInit.rs +++ b/crates/web-sys/src/features/gen_PopStateEventInit.rs @@ -15,29 +15,41 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `PopStateEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &PopStateEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PopStateEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &PopStateEventInit, val: bool); + pub fn set_bubbles(this: &PopStateEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PopStateEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &PopStateEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PopStateEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &PopStateEventInit, val: bool); + pub fn set_cancelable(this: &PopStateEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PopStateEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &PopStateEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PopStateEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &PopStateEventInit, val: bool); + pub fn set_composed(this: &PopStateEventInit, val: bool); #[doc = "Get the `state` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PopStateEventInit`*"] #[wasm_bindgen(method, getter = "state")] pub fn get_state(this: &PopStateEventInit) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `state` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PopStateEventInit`*"] #[wasm_bindgen(method, setter = "state")] - fn set_state(this: &PopStateEventInit, val: &::wasm_bindgen::JsValue); + pub fn set_state(this: &PopStateEventInit, val: &::wasm_bindgen::JsValue); } impl PopStateEventInit { #[doc = "Construct a new `PopStateEventInit`."] @@ -48,30 +60,22 @@ impl PopStateEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PopStateEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PopStateEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PopStateEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } - #[doc = "Change the `state` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PopStateEventInit`*"] + #[deprecated = "Use `set_state()` instead."] pub fn state(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_state(val); self diff --git a/crates/web-sys/src/features/gen_PopupBlockedEventInit.rs b/crates/web-sys/src/features/gen_PopupBlockedEventInit.rs index 8af8a2b0dc9c..94ae9d2c24d0 100644 --- a/crates/web-sys/src/features/gen_PopupBlockedEventInit.rs +++ b/crates/web-sys/src/features/gen_PopupBlockedEventInit.rs @@ -15,36 +15,51 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &PopupBlockedEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &PopupBlockedEventInit, val: bool); + pub fn set_bubbles(this: &PopupBlockedEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &PopupBlockedEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &PopupBlockedEventInit, val: bool); + pub fn set_cancelable(this: &PopupBlockedEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &PopupBlockedEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &PopupBlockedEventInit, val: bool); + pub fn set_composed(this: &PopupBlockedEventInit, val: bool); #[doc = "Get the `popupWindowFeatures` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"] #[wasm_bindgen(method, getter = "popupWindowFeatures")] pub fn get_popup_window_features(this: &PopupBlockedEventInit) -> Option; + #[doc = "Change the `popupWindowFeatures` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"] #[wasm_bindgen(method, setter = "popupWindowFeatures")] - fn set_popup_window_features(this: &PopupBlockedEventInit, val: &str); + pub fn set_popup_window_features(this: &PopupBlockedEventInit, val: &str); #[doc = "Get the `popupWindowName` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"] #[wasm_bindgen(method, getter = "popupWindowName")] pub fn get_popup_window_name(this: &PopupBlockedEventInit) -> Option; + #[doc = "Change the `popupWindowName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"] #[wasm_bindgen(method, setter = "popupWindowName")] - fn set_popup_window_name(this: &PopupBlockedEventInit, val: &str); + pub fn set_popup_window_name(this: &PopupBlockedEventInit, val: &str); #[cfg(feature = "Window")] #[doc = "Get the `requestingWindow` field of this object."] #[doc = ""] @@ -52,8 +67,11 @@ extern "C" { #[wasm_bindgen(method, getter = "requestingWindow")] pub fn get_requesting_window(this: &PopupBlockedEventInit) -> Option; #[cfg(feature = "Window")] + #[doc = "Change the `requestingWindow` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`, `Window`*"] #[wasm_bindgen(method, setter = "requestingWindow")] - fn set_requesting_window(this: &PopupBlockedEventInit, val: Option<&Window>); + pub fn set_requesting_window(this: &PopupBlockedEventInit, val: Option<&Window>); } impl PopupBlockedEventInit { #[doc = "Construct a new `PopupBlockedEventInit`."] @@ -64,45 +82,33 @@ impl PopupBlockedEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } - #[doc = "Change the `popupWindowFeatures` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"] + #[deprecated = "Use `set_popup_window_features()` instead."] pub fn popup_window_features(&mut self, val: &str) -> &mut Self { self.set_popup_window_features(val); self } - #[doc = "Change the `popupWindowName` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"] + #[deprecated = "Use `set_popup_window_name()` instead."] pub fn popup_window_name(&mut self, val: &str) -> &mut Self { self.set_popup_window_name(val); self } #[cfg(feature = "Window")] - #[doc = "Change the `requestingWindow` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`, `Window`*"] + #[deprecated = "Use `set_requesting_window()` instead."] pub fn requesting_window(&mut self, val: Option<&Window>) -> &mut Self { self.set_requesting_window(val); self diff --git a/crates/web-sys/src/features/gen_PositionOptions.rs b/crates/web-sys/src/features/gen_PositionOptions.rs index fd811c246de8..63806556d61d 100644 --- a/crates/web-sys/src/features/gen_PositionOptions.rs +++ b/crates/web-sys/src/features/gen_PositionOptions.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `PositionOptions`*"] #[wasm_bindgen(method, getter = "enableHighAccuracy")] pub fn get_enable_high_accuracy(this: &PositionOptions) -> Option; + #[doc = "Change the `enableHighAccuracy` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PositionOptions`*"] #[wasm_bindgen(method, setter = "enableHighAccuracy")] - fn set_enable_high_accuracy(this: &PositionOptions, val: bool); + pub fn set_enable_high_accuracy(this: &PositionOptions, val: bool); #[doc = "Get the `maximumAge` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PositionOptions`*"] #[wasm_bindgen(method, getter = "maximumAge")] pub fn get_maximum_age(this: &PositionOptions) -> Option; + #[doc = "Change the `maximumAge` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PositionOptions`*"] #[wasm_bindgen(method, setter = "maximumAge")] - fn set_maximum_age(this: &PositionOptions, val: u32); + pub fn set_maximum_age(this: &PositionOptions, val: u32); #[doc = "Get the `timeout` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PositionOptions`*"] #[wasm_bindgen(method, getter = "timeout")] pub fn get_timeout(this: &PositionOptions) -> Option; + #[doc = "Change the `timeout` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PositionOptions`*"] #[wasm_bindgen(method, setter = "timeout")] - fn set_timeout(this: &PositionOptions, val: u32); + pub fn set_timeout(this: &PositionOptions, val: u32); } impl PositionOptions { #[doc = "Construct a new `PositionOptions`."] @@ -41,23 +50,17 @@ impl PositionOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `enableHighAccuracy` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PositionOptions`*"] + #[deprecated = "Use `set_enable_high_accuracy()` instead."] pub fn enable_high_accuracy(&mut self, val: bool) -> &mut Self { self.set_enable_high_accuracy(val); self } - #[doc = "Change the `maximumAge` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PositionOptions`*"] + #[deprecated = "Use `set_maximum_age()` instead."] pub fn maximum_age(&mut self, val: u32) -> &mut Self { self.set_maximum_age(val); self } - #[doc = "Change the `timeout` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PositionOptions`*"] + #[deprecated = "Use `set_timeout()` instead."] pub fn timeout(&mut self, val: u32) -> &mut Self { self.set_timeout(val); self diff --git a/crates/web-sys/src/features/gen_PresentationConnectionAvailableEventInit.rs b/crates/web-sys/src/features/gen_PresentationConnectionAvailableEventInit.rs index 94aef45ed15f..22ef4de372d8 100644 --- a/crates/web-sys/src/features/gen_PresentationConnectionAvailableEventInit.rs +++ b/crates/web-sys/src/features/gen_PresentationConnectionAvailableEventInit.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionAvailableEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &PresentationConnectionAvailableEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionAvailableEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &PresentationConnectionAvailableEventInit, val: bool); + pub fn set_bubbles(this: &PresentationConnectionAvailableEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionAvailableEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &PresentationConnectionAvailableEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionAvailableEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &PresentationConnectionAvailableEventInit, val: bool); + pub fn set_cancelable(this: &PresentationConnectionAvailableEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionAvailableEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &PresentationConnectionAvailableEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionAvailableEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &PresentationConnectionAvailableEventInit, val: bool); + pub fn set_composed(this: &PresentationConnectionAvailableEventInit, val: bool); #[cfg(feature = "PresentationConnection")] #[doc = "Get the `connection` field of this object."] #[doc = ""] @@ -40,8 +49,11 @@ extern "C" { this: &PresentationConnectionAvailableEventInit, ) -> PresentationConnection; #[cfg(feature = "PresentationConnection")] + #[doc = "Change the `connection` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PresentationConnection`, `PresentationConnectionAvailableEventInit`*"] #[wasm_bindgen(method, setter = "connection")] - fn set_connection( + pub fn set_connection( this: &PresentationConnectionAvailableEventInit, val: &PresentationConnection, ); @@ -57,31 +69,23 @@ impl PresentationConnectionAvailableEventInit { ret.connection(connection); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionAvailableEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionAvailableEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionAvailableEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } #[cfg(feature = "PresentationConnection")] - #[doc = "Change the `connection` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PresentationConnection`, `PresentationConnectionAvailableEventInit`*"] + #[deprecated = "Use `set_connection()` instead."] pub fn connection(&mut self, val: &PresentationConnection) -> &mut Self { self.set_connection(val); self diff --git a/crates/web-sys/src/features/gen_PresentationConnectionCloseEventInit.rs b/crates/web-sys/src/features/gen_PresentationConnectionCloseEventInit.rs index 077f9e79a01f..aef67635b740 100644 --- a/crates/web-sys/src/features/gen_PresentationConnectionCloseEventInit.rs +++ b/crates/web-sys/src/features/gen_PresentationConnectionCloseEventInit.rs @@ -15,29 +15,41 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionCloseEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &PresentationConnectionCloseEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionCloseEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &PresentationConnectionCloseEventInit, val: bool); + pub fn set_bubbles(this: &PresentationConnectionCloseEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionCloseEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &PresentationConnectionCloseEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionCloseEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &PresentationConnectionCloseEventInit, val: bool); + pub fn set_cancelable(this: &PresentationConnectionCloseEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionCloseEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &PresentationConnectionCloseEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionCloseEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &PresentationConnectionCloseEventInit, val: bool); + pub fn set_composed(this: &PresentationConnectionCloseEventInit, val: bool); #[doc = "Get the `message` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionCloseEventInit`*"] #[wasm_bindgen(method, getter = "message")] pub fn get_message(this: &PresentationConnectionCloseEventInit) -> Option; + #[doc = "Change the `message` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionCloseEventInit`*"] #[wasm_bindgen(method, setter = "message")] - fn set_message(this: &PresentationConnectionCloseEventInit, val: &str); + pub fn set_message(this: &PresentationConnectionCloseEventInit, val: &str); #[cfg(feature = "PresentationConnectionClosedReason")] #[doc = "Get the `reason` field of this object."] #[doc = ""] @@ -47,8 +59,11 @@ extern "C" { this: &PresentationConnectionCloseEventInit, ) -> PresentationConnectionClosedReason; #[cfg(feature = "PresentationConnectionClosedReason")] + #[doc = "Change the `reason` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionCloseEventInit`, `PresentationConnectionClosedReason`*"] #[wasm_bindgen(method, setter = "reason")] - fn set_reason( + pub fn set_reason( this: &PresentationConnectionCloseEventInit, val: PresentationConnectionClosedReason, ); @@ -64,38 +79,28 @@ impl PresentationConnectionCloseEventInit { ret.reason(reason); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionCloseEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionCloseEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionCloseEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } - #[doc = "Change the `message` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionCloseEventInit`*"] + #[deprecated = "Use `set_message()` instead."] pub fn message(&mut self, val: &str) -> &mut Self { self.set_message(val); self } #[cfg(feature = "PresentationConnectionClosedReason")] - #[doc = "Change the `reason` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionCloseEventInit`, `PresentationConnectionClosedReason`*"] + #[deprecated = "Use `set_reason()` instead."] pub fn reason(&mut self, val: PresentationConnectionClosedReason) -> &mut Self { self.set_reason(val); self diff --git a/crates/web-sys/src/features/gen_ProfileTimelineLayerRect.rs b/crates/web-sys/src/features/gen_ProfileTimelineLayerRect.rs index d7304f14f638..7dc5738b2d8e 100644 --- a/crates/web-sys/src/features/gen_ProfileTimelineLayerRect.rs +++ b/crates/web-sys/src/features/gen_ProfileTimelineLayerRect.rs @@ -15,29 +15,41 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineLayerRect`*"] #[wasm_bindgen(method, getter = "height")] pub fn get_height(this: &ProfileTimelineLayerRect) -> Option; + #[doc = "Change the `height` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineLayerRect`*"] #[wasm_bindgen(method, setter = "height")] - fn set_height(this: &ProfileTimelineLayerRect, val: i32); + pub fn set_height(this: &ProfileTimelineLayerRect, val: i32); #[doc = "Get the `width` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineLayerRect`*"] #[wasm_bindgen(method, getter = "width")] pub fn get_width(this: &ProfileTimelineLayerRect) -> Option; + #[doc = "Change the `width` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineLayerRect`*"] #[wasm_bindgen(method, setter = "width")] - fn set_width(this: &ProfileTimelineLayerRect, val: i32); + pub fn set_width(this: &ProfileTimelineLayerRect, val: i32); #[doc = "Get the `x` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineLayerRect`*"] #[wasm_bindgen(method, getter = "x")] pub fn get_x(this: &ProfileTimelineLayerRect) -> Option; + #[doc = "Change the `x` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineLayerRect`*"] #[wasm_bindgen(method, setter = "x")] - fn set_x(this: &ProfileTimelineLayerRect, val: i32); + pub fn set_x(this: &ProfileTimelineLayerRect, val: i32); #[doc = "Get the `y` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineLayerRect`*"] #[wasm_bindgen(method, getter = "y")] pub fn get_y(this: &ProfileTimelineLayerRect) -> Option; + #[doc = "Change the `y` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineLayerRect`*"] #[wasm_bindgen(method, setter = "y")] - fn set_y(this: &ProfileTimelineLayerRect, val: i32); + pub fn set_y(this: &ProfileTimelineLayerRect, val: i32); } impl ProfileTimelineLayerRect { #[doc = "Construct a new `ProfileTimelineLayerRect`."] @@ -48,30 +60,22 @@ impl ProfileTimelineLayerRect { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `height` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineLayerRect`*"] + #[deprecated = "Use `set_height()` instead."] pub fn height(&mut self, val: i32) -> &mut Self { self.set_height(val); self } - #[doc = "Change the `width` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineLayerRect`*"] + #[deprecated = "Use `set_width()` instead."] pub fn width(&mut self, val: i32) -> &mut Self { self.set_width(val); self } - #[doc = "Change the `x` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineLayerRect`*"] + #[deprecated = "Use `set_x()` instead."] pub fn x(&mut self, val: i32) -> &mut Self { self.set_x(val); self } - #[doc = "Change the `y` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineLayerRect`*"] + #[deprecated = "Use `set_y()` instead."] pub fn y(&mut self, val: i32) -> &mut Self { self.set_y(val); self diff --git a/crates/web-sys/src/features/gen_ProfileTimelineMarker.rs b/crates/web-sys/src/features/gen_ProfileTimelineMarker.rs index 720b01b1dbfe..0aa2993c14a3 100644 --- a/crates/web-sys/src/features/gen_ProfileTimelineMarker.rs +++ b/crates/web-sys/src/features/gen_ProfileTimelineMarker.rs @@ -15,43 +15,61 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] #[wasm_bindgen(method, getter = "causeName")] pub fn get_cause_name(this: &ProfileTimelineMarker) -> Option; + #[doc = "Change the `causeName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] #[wasm_bindgen(method, setter = "causeName")] - fn set_cause_name(this: &ProfileTimelineMarker, val: &str); + pub fn set_cause_name(this: &ProfileTimelineMarker, val: &str); #[doc = "Get the `end` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] #[wasm_bindgen(method, getter = "end")] pub fn get_end(this: &ProfileTimelineMarker) -> Option; + #[doc = "Change the `end` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] #[wasm_bindgen(method, setter = "end")] - fn set_end(this: &ProfileTimelineMarker, val: f64); + pub fn set_end(this: &ProfileTimelineMarker, val: f64); #[doc = "Get the `endStack` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] #[wasm_bindgen(method, getter = "endStack")] pub fn get_end_stack(this: &ProfileTimelineMarker) -> Option<::js_sys::Object>; + #[doc = "Change the `endStack` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] #[wasm_bindgen(method, setter = "endStack")] - fn set_end_stack(this: &ProfileTimelineMarker, val: Option<&::js_sys::Object>); + pub fn set_end_stack(this: &ProfileTimelineMarker, val: Option<&::js_sys::Object>); #[doc = "Get the `eventPhase` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] #[wasm_bindgen(method, getter = "eventPhase")] pub fn get_event_phase(this: &ProfileTimelineMarker) -> Option; + #[doc = "Change the `eventPhase` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] #[wasm_bindgen(method, setter = "eventPhase")] - fn set_event_phase(this: &ProfileTimelineMarker, val: u16); + pub fn set_event_phase(this: &ProfileTimelineMarker, val: u16); #[doc = "Get the `isAnimationOnly` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] #[wasm_bindgen(method, getter = "isAnimationOnly")] pub fn get_is_animation_only(this: &ProfileTimelineMarker) -> Option; + #[doc = "Change the `isAnimationOnly` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] #[wasm_bindgen(method, setter = "isAnimationOnly")] - fn set_is_animation_only(this: &ProfileTimelineMarker, val: bool); + pub fn set_is_animation_only(this: &ProfileTimelineMarker, val: bool); #[doc = "Get the `isOffMainThread` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] #[wasm_bindgen(method, getter = "isOffMainThread")] pub fn get_is_off_main_thread(this: &ProfileTimelineMarker) -> Option; + #[doc = "Change the `isOffMainThread` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] #[wasm_bindgen(method, setter = "isOffMainThread")] - fn set_is_off_main_thread(this: &ProfileTimelineMarker, val: bool); + pub fn set_is_off_main_thread(this: &ProfileTimelineMarker, val: bool); #[cfg(feature = "ProfileTimelineMessagePortOperationType")] #[doc = "Get the `messagePortOperation` field of this object."] #[doc = ""] @@ -61,8 +79,11 @@ extern "C" { this: &ProfileTimelineMarker, ) -> Option; #[cfg(feature = "ProfileTimelineMessagePortOperationType")] + #[doc = "Change the `messagePortOperation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`, `ProfileTimelineMessagePortOperationType`*"] #[wasm_bindgen(method, setter = "messagePortOperation")] - fn set_message_port_operation( + pub fn set_message_port_operation( this: &ProfileTimelineMarker, val: ProfileTimelineMessagePortOperationType, ); @@ -71,50 +92,71 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] #[wasm_bindgen(method, getter = "name")] pub fn get_name(this: &ProfileTimelineMarker) -> Option; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] #[wasm_bindgen(method, setter = "name")] - fn set_name(this: &ProfileTimelineMarker, val: &str); + pub fn set_name(this: &ProfileTimelineMarker, val: &str); #[doc = "Get the `processType` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] #[wasm_bindgen(method, getter = "processType")] pub fn get_process_type(this: &ProfileTimelineMarker) -> Option; + #[doc = "Change the `processType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] #[wasm_bindgen(method, setter = "processType")] - fn set_process_type(this: &ProfileTimelineMarker, val: u16); + pub fn set_process_type(this: &ProfileTimelineMarker, val: u16); #[doc = "Get the `rectangles` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] #[wasm_bindgen(method, getter = "rectangles")] pub fn get_rectangles(this: &ProfileTimelineMarker) -> Option<::js_sys::Array>; + #[doc = "Change the `rectangles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] #[wasm_bindgen(method, setter = "rectangles")] - fn set_rectangles(this: &ProfileTimelineMarker, val: &::wasm_bindgen::JsValue); + pub fn set_rectangles(this: &ProfileTimelineMarker, val: &::wasm_bindgen::JsValue); #[doc = "Get the `stack` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] #[wasm_bindgen(method, getter = "stack")] pub fn get_stack(this: &ProfileTimelineMarker) -> Option<::js_sys::Object>; + #[doc = "Change the `stack` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] #[wasm_bindgen(method, setter = "stack")] - fn set_stack(this: &ProfileTimelineMarker, val: Option<&::js_sys::Object>); + pub fn set_stack(this: &ProfileTimelineMarker, val: Option<&::js_sys::Object>); #[doc = "Get the `start` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] #[wasm_bindgen(method, getter = "start")] pub fn get_start(this: &ProfileTimelineMarker) -> Option; + #[doc = "Change the `start` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] #[wasm_bindgen(method, setter = "start")] - fn set_start(this: &ProfileTimelineMarker, val: f64); + pub fn set_start(this: &ProfileTimelineMarker, val: f64); #[doc = "Get the `type` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] #[wasm_bindgen(method, getter = "type")] pub fn get_type(this: &ProfileTimelineMarker) -> Option; + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] #[wasm_bindgen(method, setter = "type")] - fn set_type(this: &ProfileTimelineMarker, val: &str); + pub fn set_type(this: &ProfileTimelineMarker, val: &str); #[doc = "Get the `unixTime` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] #[wasm_bindgen(method, getter = "unixTime")] pub fn get_unix_time(this: &ProfileTimelineMarker) -> Option; + #[doc = "Change the `unixTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] #[wasm_bindgen(method, setter = "unixTime")] - fn set_unix_time(this: &ProfileTimelineMarker, val: f64); + pub fn set_unix_time(this: &ProfileTimelineMarker, val: f64); #[cfg(feature = "ProfileTimelineWorkerOperationType")] #[doc = "Get the `workerOperation` field of this object."] #[doc = ""] @@ -124,8 +166,14 @@ extern "C" { this: &ProfileTimelineMarker, ) -> Option; #[cfg(feature = "ProfileTimelineWorkerOperationType")] + #[doc = "Change the `workerOperation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`, `ProfileTimelineWorkerOperationType`*"] #[wasm_bindgen(method, setter = "workerOperation")] - fn set_worker_operation(this: &ProfileTimelineMarker, val: ProfileTimelineWorkerOperationType); + pub fn set_worker_operation( + this: &ProfileTimelineMarker, + val: ProfileTimelineWorkerOperationType, + ); } impl ProfileTimelineMarker { #[doc = "Construct a new `ProfileTimelineMarker`."] @@ -136,52 +184,38 @@ impl ProfileTimelineMarker { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `causeName` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] + #[deprecated = "Use `set_cause_name()` instead."] pub fn cause_name(&mut self, val: &str) -> &mut Self { self.set_cause_name(val); self } - #[doc = "Change the `end` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] + #[deprecated = "Use `set_end()` instead."] pub fn end(&mut self, val: f64) -> &mut Self { self.set_end(val); self } - #[doc = "Change the `endStack` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] + #[deprecated = "Use `set_end_stack()` instead."] pub fn end_stack(&mut self, val: Option<&::js_sys::Object>) -> &mut Self { self.set_end_stack(val); self } - #[doc = "Change the `eventPhase` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] + #[deprecated = "Use `set_event_phase()` instead."] pub fn event_phase(&mut self, val: u16) -> &mut Self { self.set_event_phase(val); self } - #[doc = "Change the `isAnimationOnly` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] + #[deprecated = "Use `set_is_animation_only()` instead."] pub fn is_animation_only(&mut self, val: bool) -> &mut Self { self.set_is_animation_only(val); self } - #[doc = "Change the `isOffMainThread` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] + #[deprecated = "Use `set_is_off_main_thread()` instead."] pub fn is_off_main_thread(&mut self, val: bool) -> &mut Self { self.set_is_off_main_thread(val); self } #[cfg(feature = "ProfileTimelineMessagePortOperationType")] - #[doc = "Change the `messagePortOperation` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`, `ProfileTimelineMessagePortOperationType`*"] + #[deprecated = "Use `set_message_port_operation()` instead."] pub fn message_port_operation( &mut self, val: ProfileTimelineMessagePortOperationType, @@ -189,59 +223,43 @@ impl ProfileTimelineMarker { self.set_message_port_operation(val); self } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { self.set_name(val); self } - #[doc = "Change the `processType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] + #[deprecated = "Use `set_process_type()` instead."] pub fn process_type(&mut self, val: u16) -> &mut Self { self.set_process_type(val); self } - #[doc = "Change the `rectangles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] + #[deprecated = "Use `set_rectangles()` instead."] pub fn rectangles(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_rectangles(val); self } - #[doc = "Change the `stack` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] + #[deprecated = "Use `set_stack()` instead."] pub fn stack(&mut self, val: Option<&::js_sys::Object>) -> &mut Self { self.set_stack(val); self } - #[doc = "Change the `start` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] + #[deprecated = "Use `set_start()` instead."] pub fn start(&mut self, val: f64) -> &mut Self { self.set_start(val); self } - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: &str) -> &mut Self { self.set_type(val); self } - #[doc = "Change the `unixTime` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] + #[deprecated = "Use `set_unix_time()` instead."] pub fn unix_time(&mut self, val: f64) -> &mut Self { self.set_unix_time(val); self } #[cfg(feature = "ProfileTimelineWorkerOperationType")] - #[doc = "Change the `workerOperation` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`, `ProfileTimelineWorkerOperationType`*"] + #[deprecated = "Use `set_worker_operation()` instead."] pub fn worker_operation(&mut self, val: ProfileTimelineWorkerOperationType) -> &mut Self { self.set_worker_operation(val); self diff --git a/crates/web-sys/src/features/gen_ProfileTimelineStackFrame.rs b/crates/web-sys/src/features/gen_ProfileTimelineStackFrame.rs index 8f78172d565c..0c0181b6eee6 100644 --- a/crates/web-sys/src/features/gen_ProfileTimelineStackFrame.rs +++ b/crates/web-sys/src/features/gen_ProfileTimelineStackFrame.rs @@ -15,50 +15,71 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] #[wasm_bindgen(method, getter = "asyncCause")] pub fn get_async_cause(this: &ProfileTimelineStackFrame) -> Option; + #[doc = "Change the `asyncCause` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] #[wasm_bindgen(method, setter = "asyncCause")] - fn set_async_cause(this: &ProfileTimelineStackFrame, val: &str); + pub fn set_async_cause(this: &ProfileTimelineStackFrame, val: &str); #[doc = "Get the `asyncParent` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] #[wasm_bindgen(method, getter = "asyncParent")] pub fn get_async_parent(this: &ProfileTimelineStackFrame) -> Option<::js_sys::Object>; + #[doc = "Change the `asyncParent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] #[wasm_bindgen(method, setter = "asyncParent")] - fn set_async_parent(this: &ProfileTimelineStackFrame, val: Option<&::js_sys::Object>); + pub fn set_async_parent(this: &ProfileTimelineStackFrame, val: Option<&::js_sys::Object>); #[doc = "Get the `column` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] #[wasm_bindgen(method, getter = "column")] pub fn get_column(this: &ProfileTimelineStackFrame) -> Option; + #[doc = "Change the `column` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] #[wasm_bindgen(method, setter = "column")] - fn set_column(this: &ProfileTimelineStackFrame, val: i32); + pub fn set_column(this: &ProfileTimelineStackFrame, val: i32); #[doc = "Get the `functionDisplayName` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] #[wasm_bindgen(method, getter = "functionDisplayName")] pub fn get_function_display_name(this: &ProfileTimelineStackFrame) -> Option; + #[doc = "Change the `functionDisplayName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] #[wasm_bindgen(method, setter = "functionDisplayName")] - fn set_function_display_name(this: &ProfileTimelineStackFrame, val: &str); + pub fn set_function_display_name(this: &ProfileTimelineStackFrame, val: &str); #[doc = "Get the `line` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] #[wasm_bindgen(method, getter = "line")] pub fn get_line(this: &ProfileTimelineStackFrame) -> Option; + #[doc = "Change the `line` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] #[wasm_bindgen(method, setter = "line")] - fn set_line(this: &ProfileTimelineStackFrame, val: i32); + pub fn set_line(this: &ProfileTimelineStackFrame, val: i32); #[doc = "Get the `parent` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] #[wasm_bindgen(method, getter = "parent")] pub fn get_parent(this: &ProfileTimelineStackFrame) -> Option<::js_sys::Object>; + #[doc = "Change the `parent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] #[wasm_bindgen(method, setter = "parent")] - fn set_parent(this: &ProfileTimelineStackFrame, val: Option<&::js_sys::Object>); + pub fn set_parent(this: &ProfileTimelineStackFrame, val: Option<&::js_sys::Object>); #[doc = "Get the `source` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] #[wasm_bindgen(method, getter = "source")] pub fn get_source(this: &ProfileTimelineStackFrame) -> Option; + #[doc = "Change the `source` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] #[wasm_bindgen(method, setter = "source")] - fn set_source(this: &ProfileTimelineStackFrame, val: &str); + pub fn set_source(this: &ProfileTimelineStackFrame, val: &str); } impl ProfileTimelineStackFrame { #[doc = "Construct a new `ProfileTimelineStackFrame`."] @@ -69,51 +90,37 @@ impl ProfileTimelineStackFrame { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `asyncCause` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] + #[deprecated = "Use `set_async_cause()` instead."] pub fn async_cause(&mut self, val: &str) -> &mut Self { self.set_async_cause(val); self } - #[doc = "Change the `asyncParent` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] + #[deprecated = "Use `set_async_parent()` instead."] pub fn async_parent(&mut self, val: Option<&::js_sys::Object>) -> &mut Self { self.set_async_parent(val); self } - #[doc = "Change the `column` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] + #[deprecated = "Use `set_column()` instead."] pub fn column(&mut self, val: i32) -> &mut Self { self.set_column(val); self } - #[doc = "Change the `functionDisplayName` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] + #[deprecated = "Use `set_function_display_name()` instead."] pub fn function_display_name(&mut self, val: &str) -> &mut Self { self.set_function_display_name(val); self } - #[doc = "Change the `line` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] + #[deprecated = "Use `set_line()` instead."] pub fn line(&mut self, val: i32) -> &mut Self { self.set_line(val); self } - #[doc = "Change the `parent` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] + #[deprecated = "Use `set_parent()` instead."] pub fn parent(&mut self, val: Option<&::js_sys::Object>) -> &mut Self { self.set_parent(val); self } - #[doc = "Change the `source` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] + #[deprecated = "Use `set_source()` instead."] pub fn source(&mut self, val: &str) -> &mut Self { self.set_source(val); self diff --git a/crates/web-sys/src/features/gen_ProgressEventInit.rs b/crates/web-sys/src/features/gen_ProgressEventInit.rs index e14fd10d3809..97a1fed65f76 100644 --- a/crates/web-sys/src/features/gen_ProgressEventInit.rs +++ b/crates/web-sys/src/features/gen_ProgressEventInit.rs @@ -15,43 +15,61 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &ProgressEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &ProgressEventInit, val: bool); + pub fn set_bubbles(this: &ProgressEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &ProgressEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &ProgressEventInit, val: bool); + pub fn set_cancelable(this: &ProgressEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &ProgressEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &ProgressEventInit, val: bool); + pub fn set_composed(this: &ProgressEventInit, val: bool); #[doc = "Get the `lengthComputable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"] #[wasm_bindgen(method, getter = "lengthComputable")] pub fn get_length_computable(this: &ProgressEventInit) -> Option; + #[doc = "Change the `lengthComputable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"] #[wasm_bindgen(method, setter = "lengthComputable")] - fn set_length_computable(this: &ProgressEventInit, val: bool); + pub fn set_length_computable(this: &ProgressEventInit, val: bool); #[doc = "Get the `loaded` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"] #[wasm_bindgen(method, getter = "loaded")] pub fn get_loaded(this: &ProgressEventInit) -> Option; + #[doc = "Change the `loaded` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"] #[wasm_bindgen(method, setter = "loaded")] - fn set_loaded(this: &ProgressEventInit, val: f64); + pub fn set_loaded(this: &ProgressEventInit, val: f64); #[doc = "Get the `total` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"] #[wasm_bindgen(method, getter = "total")] pub fn get_total(this: &ProgressEventInit) -> Option; + #[doc = "Change the `total` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"] #[wasm_bindgen(method, setter = "total")] - fn set_total(this: &ProgressEventInit, val: f64); + pub fn set_total(this: &ProgressEventInit, val: f64); } impl ProgressEventInit { #[doc = "Construct a new `ProgressEventInit`."] @@ -62,44 +80,32 @@ impl ProgressEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } - #[doc = "Change the `lengthComputable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"] + #[deprecated = "Use `set_length_computable()` instead."] pub fn length_computable(&mut self, val: bool) -> &mut Self { self.set_length_computable(val); self } - #[doc = "Change the `loaded` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"] + #[deprecated = "Use `set_loaded()` instead."] pub fn loaded(&mut self, val: f64) -> &mut Self { self.set_loaded(val); self } - #[doc = "Change the `total` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"] + #[deprecated = "Use `set_total()` instead."] pub fn total(&mut self, val: f64) -> &mut Self { self.set_total(val); self diff --git a/crates/web-sys/src/features/gen_PromiseRejectionEventInit.rs b/crates/web-sys/src/features/gen_PromiseRejectionEventInit.rs index 0401a4bcde4f..328fbe073186 100644 --- a/crates/web-sys/src/features/gen_PromiseRejectionEventInit.rs +++ b/crates/web-sys/src/features/gen_PromiseRejectionEventInit.rs @@ -15,36 +15,51 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `PromiseRejectionEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &PromiseRejectionEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PromiseRejectionEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &PromiseRejectionEventInit, val: bool); + pub fn set_bubbles(this: &PromiseRejectionEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PromiseRejectionEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &PromiseRejectionEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PromiseRejectionEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &PromiseRejectionEventInit, val: bool); + pub fn set_cancelable(this: &PromiseRejectionEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PromiseRejectionEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &PromiseRejectionEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PromiseRejectionEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &PromiseRejectionEventInit, val: bool); + pub fn set_composed(this: &PromiseRejectionEventInit, val: bool); #[doc = "Get the `promise` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PromiseRejectionEventInit`*"] #[wasm_bindgen(method, getter = "promise")] pub fn get_promise(this: &PromiseRejectionEventInit) -> ::js_sys::Promise; + #[doc = "Change the `promise` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PromiseRejectionEventInit`*"] #[wasm_bindgen(method, setter = "promise")] - fn set_promise(this: &PromiseRejectionEventInit, val: &::js_sys::Promise); + pub fn set_promise(this: &PromiseRejectionEventInit, val: &::js_sys::Promise); #[doc = "Get the `reason` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PromiseRejectionEventInit`*"] #[wasm_bindgen(method, getter = "reason")] pub fn get_reason(this: &PromiseRejectionEventInit) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `reason` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PromiseRejectionEventInit`*"] #[wasm_bindgen(method, setter = "reason")] - fn set_reason(this: &PromiseRejectionEventInit, val: &::wasm_bindgen::JsValue); + pub fn set_reason(this: &PromiseRejectionEventInit, val: &::wasm_bindgen::JsValue); } impl PromiseRejectionEventInit { #[doc = "Construct a new `PromiseRejectionEventInit`."] @@ -56,37 +71,27 @@ impl PromiseRejectionEventInit { ret.promise(promise); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PromiseRejectionEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PromiseRejectionEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PromiseRejectionEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } - #[doc = "Change the `promise` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PromiseRejectionEventInit`*"] + #[deprecated = "Use `set_promise()` instead."] pub fn promise(&mut self, val: &::js_sys::Promise) -> &mut Self { self.set_promise(val); self } - #[doc = "Change the `reason` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PromiseRejectionEventInit`*"] + #[deprecated = "Use `set_reason()` instead."] pub fn reason(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_reason(val); self diff --git a/crates/web-sys/src/features/gen_PublicKeyCredentialCreationOptions.rs b/crates/web-sys/src/features/gen_PublicKeyCredentialCreationOptions.rs index 99c146801561..630f3e6547a6 100644 --- a/crates/web-sys/src/features/gen_PublicKeyCredentialCreationOptions.rs +++ b/crates/web-sys/src/features/gen_PublicKeyCredentialCreationOptions.rs @@ -19,8 +19,11 @@ extern "C" { this: &PublicKeyCredentialCreationOptions, ) -> Option; #[cfg(feature = "AttestationConveyancePreference")] + #[doc = "Change the `attestation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AttestationConveyancePreference`, `PublicKeyCredentialCreationOptions`*"] #[wasm_bindgen(method, setter = "attestation")] - fn set_attestation( + pub fn set_attestation( this: &PublicKeyCredentialCreationOptions, val: AttestationConveyancePreference, ); @@ -33,8 +36,11 @@ extern "C" { this: &PublicKeyCredentialCreationOptions, ) -> Option; #[cfg(feature = "AuthenticatorSelectionCriteria")] + #[doc = "Change the `authenticatorSelection` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AuthenticatorSelectionCriteria`, `PublicKeyCredentialCreationOptions`*"] #[wasm_bindgen(method, setter = "authenticatorSelection")] - fn set_authenticator_selection( + pub fn set_authenticator_selection( this: &PublicKeyCredentialCreationOptions, val: &AuthenticatorSelectionCriteria, ); @@ -43,8 +49,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialCreationOptions`*"] #[wasm_bindgen(method, getter = "challenge")] pub fn get_challenge(this: &PublicKeyCredentialCreationOptions) -> ::js_sys::Object; + #[doc = "Change the `challenge` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialCreationOptions`*"] #[wasm_bindgen(method, setter = "challenge")] - fn set_challenge(this: &PublicKeyCredentialCreationOptions, val: &::js_sys::Object); + pub fn set_challenge(this: &PublicKeyCredentialCreationOptions, val: &::js_sys::Object); #[doc = "Get the `excludeCredentials` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialCreationOptions`*"] @@ -52,8 +61,11 @@ extern "C" { pub fn get_exclude_credentials( this: &PublicKeyCredentialCreationOptions, ) -> Option<::js_sys::Array>; + #[doc = "Change the `excludeCredentials` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialCreationOptions`*"] #[wasm_bindgen(method, setter = "excludeCredentials")] - fn set_exclude_credentials( + pub fn set_exclude_credentials( this: &PublicKeyCredentialCreationOptions, val: &::wasm_bindgen::JsValue, ); @@ -66,8 +78,11 @@ extern "C" { this: &PublicKeyCredentialCreationOptions, ) -> Option; #[cfg(feature = "AuthenticationExtensionsClientInputs")] + #[doc = "Change the `extensions` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientInputs`, `PublicKeyCredentialCreationOptions`*"] #[wasm_bindgen(method, setter = "extensions")] - fn set_extensions( + pub fn set_extensions( this: &PublicKeyCredentialCreationOptions, val: &AuthenticationExtensionsClientInputs, ); @@ -76,8 +91,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialCreationOptions`*"] #[wasm_bindgen(method, getter = "pubKeyCredParams")] pub fn get_pub_key_cred_params(this: &PublicKeyCredentialCreationOptions) -> ::js_sys::Array; + #[doc = "Change the `pubKeyCredParams` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialCreationOptions`*"] #[wasm_bindgen(method, setter = "pubKeyCredParams")] - fn set_pub_key_cred_params( + pub fn set_pub_key_cred_params( this: &PublicKeyCredentialCreationOptions, val: &::wasm_bindgen::JsValue, ); @@ -88,15 +106,21 @@ extern "C" { #[wasm_bindgen(method, getter = "rp")] pub fn get_rp(this: &PublicKeyCredentialCreationOptions) -> PublicKeyCredentialRpEntity; #[cfg(feature = "PublicKeyCredentialRpEntity")] + #[doc = "Change the `rp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialCreationOptions`, `PublicKeyCredentialRpEntity`*"] #[wasm_bindgen(method, setter = "rp")] - fn set_rp(this: &PublicKeyCredentialCreationOptions, val: &PublicKeyCredentialRpEntity); + pub fn set_rp(this: &PublicKeyCredentialCreationOptions, val: &PublicKeyCredentialRpEntity); #[doc = "Get the `timeout` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialCreationOptions`*"] #[wasm_bindgen(method, getter = "timeout")] pub fn get_timeout(this: &PublicKeyCredentialCreationOptions) -> Option; + #[doc = "Change the `timeout` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialCreationOptions`*"] #[wasm_bindgen(method, setter = "timeout")] - fn set_timeout(this: &PublicKeyCredentialCreationOptions, val: u32); + pub fn set_timeout(this: &PublicKeyCredentialCreationOptions, val: u32); #[cfg(feature = "PublicKeyCredentialUserEntity")] #[doc = "Get the `user` field of this object."] #[doc = ""] @@ -104,8 +128,11 @@ extern "C" { #[wasm_bindgen(method, getter = "user")] pub fn get_user(this: &PublicKeyCredentialCreationOptions) -> PublicKeyCredentialUserEntity; #[cfg(feature = "PublicKeyCredentialUserEntity")] + #[doc = "Change the `user` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialCreationOptions`, `PublicKeyCredentialUserEntity`*"] #[wasm_bindgen(method, setter = "user")] - fn set_user(this: &PublicKeyCredentialCreationOptions, val: &PublicKeyCredentialUserEntity); + pub fn set_user(this: &PublicKeyCredentialCreationOptions, val: &PublicKeyCredentialUserEntity); } impl PublicKeyCredentialCreationOptions { #[cfg(all( @@ -130,69 +157,51 @@ impl PublicKeyCredentialCreationOptions { ret } #[cfg(feature = "AttestationConveyancePreference")] - #[doc = "Change the `attestation` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AttestationConveyancePreference`, `PublicKeyCredentialCreationOptions`*"] + #[deprecated = "Use `set_attestation()` instead."] pub fn attestation(&mut self, val: AttestationConveyancePreference) -> &mut Self { self.set_attestation(val); self } #[cfg(feature = "AuthenticatorSelectionCriteria")] - #[doc = "Change the `authenticatorSelection` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AuthenticatorSelectionCriteria`, `PublicKeyCredentialCreationOptions`*"] + #[deprecated = "Use `set_authenticator_selection()` instead."] pub fn authenticator_selection(&mut self, val: &AuthenticatorSelectionCriteria) -> &mut Self { self.set_authenticator_selection(val); self } - #[doc = "Change the `challenge` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialCreationOptions`*"] + #[deprecated = "Use `set_challenge()` instead."] pub fn challenge(&mut self, val: &::js_sys::Object) -> &mut Self { self.set_challenge(val); self } - #[doc = "Change the `excludeCredentials` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialCreationOptions`*"] + #[deprecated = "Use `set_exclude_credentials()` instead."] pub fn exclude_credentials(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_exclude_credentials(val); self } #[cfg(feature = "AuthenticationExtensionsClientInputs")] - #[doc = "Change the `extensions` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientInputs`, `PublicKeyCredentialCreationOptions`*"] + #[deprecated = "Use `set_extensions()` instead."] pub fn extensions(&mut self, val: &AuthenticationExtensionsClientInputs) -> &mut Self { self.set_extensions(val); self } - #[doc = "Change the `pubKeyCredParams` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialCreationOptions`*"] + #[deprecated = "Use `set_pub_key_cred_params()` instead."] pub fn pub_key_cred_params(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_pub_key_cred_params(val); self } #[cfg(feature = "PublicKeyCredentialRpEntity")] - #[doc = "Change the `rp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialCreationOptions`, `PublicKeyCredentialRpEntity`*"] + #[deprecated = "Use `set_rp()` instead."] pub fn rp(&mut self, val: &PublicKeyCredentialRpEntity) -> &mut Self { self.set_rp(val); self } - #[doc = "Change the `timeout` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialCreationOptions`*"] + #[deprecated = "Use `set_timeout()` instead."] pub fn timeout(&mut self, val: u32) -> &mut Self { self.set_timeout(val); self } #[cfg(feature = "PublicKeyCredentialUserEntity")] - #[doc = "Change the `user` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialCreationOptions`, `PublicKeyCredentialUserEntity`*"] + #[deprecated = "Use `set_user()` instead."] pub fn user(&mut self, val: &PublicKeyCredentialUserEntity) -> &mut Self { self.set_user(val); self diff --git a/crates/web-sys/src/features/gen_PublicKeyCredentialDescriptor.rs b/crates/web-sys/src/features/gen_PublicKeyCredentialDescriptor.rs index 65c447cec196..3781622c4b30 100644 --- a/crates/web-sys/src/features/gen_PublicKeyCredentialDescriptor.rs +++ b/crates/web-sys/src/features/gen_PublicKeyCredentialDescriptor.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialDescriptor`*"] #[wasm_bindgen(method, getter = "id")] pub fn get_id(this: &PublicKeyCredentialDescriptor) -> ::js_sys::Object; + #[doc = "Change the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialDescriptor`*"] #[wasm_bindgen(method, setter = "id")] - fn set_id(this: &PublicKeyCredentialDescriptor, val: &::js_sys::Object); + pub fn set_id(this: &PublicKeyCredentialDescriptor, val: &::js_sys::Object); #[doc = "Get the `transports` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialDescriptor`*"] #[wasm_bindgen(method, getter = "transports")] pub fn get_transports(this: &PublicKeyCredentialDescriptor) -> Option<::js_sys::Array>; + #[doc = "Change the `transports` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialDescriptor`*"] #[wasm_bindgen(method, setter = "transports")] - fn set_transports(this: &PublicKeyCredentialDescriptor, val: &::wasm_bindgen::JsValue); + pub fn set_transports(this: &PublicKeyCredentialDescriptor, val: &::wasm_bindgen::JsValue); #[cfg(feature = "PublicKeyCredentialType")] #[doc = "Get the `type` field of this object."] #[doc = ""] @@ -31,8 +37,11 @@ extern "C" { #[wasm_bindgen(method, getter = "type")] pub fn get_type(this: &PublicKeyCredentialDescriptor) -> PublicKeyCredentialType; #[cfg(feature = "PublicKeyCredentialType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialDescriptor`, `PublicKeyCredentialType`*"] #[wasm_bindgen(method, setter = "type")] - fn set_type(this: &PublicKeyCredentialDescriptor, val: PublicKeyCredentialType); + pub fn set_type(this: &PublicKeyCredentialDescriptor, val: PublicKeyCredentialType); } impl PublicKeyCredentialDescriptor { #[cfg(feature = "PublicKeyCredentialType")] @@ -46,24 +55,18 @@ impl PublicKeyCredentialDescriptor { ret.type_(type_); ret } - #[doc = "Change the `id` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialDescriptor`*"] + #[deprecated = "Use `set_id()` instead."] pub fn id(&mut self, val: &::js_sys::Object) -> &mut Self { self.set_id(val); self } - #[doc = "Change the `transports` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialDescriptor`*"] + #[deprecated = "Use `set_transports()` instead."] pub fn transports(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_transports(val); self } #[cfg(feature = "PublicKeyCredentialType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialDescriptor`, `PublicKeyCredentialType`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: PublicKeyCredentialType) -> &mut Self { self.set_type(val); self diff --git a/crates/web-sys/src/features/gen_PublicKeyCredentialEntity.rs b/crates/web-sys/src/features/gen_PublicKeyCredentialEntity.rs index 83c9db51fe6c..f16bcd84e132 100644 --- a/crates/web-sys/src/features/gen_PublicKeyCredentialEntity.rs +++ b/crates/web-sys/src/features/gen_PublicKeyCredentialEntity.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialEntity`*"] #[wasm_bindgen(method, getter = "icon")] pub fn get_icon(this: &PublicKeyCredentialEntity) -> Option; + #[doc = "Change the `icon` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialEntity`*"] #[wasm_bindgen(method, setter = "icon")] - fn set_icon(this: &PublicKeyCredentialEntity, val: &str); + pub fn set_icon(this: &PublicKeyCredentialEntity, val: &str); #[doc = "Get the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialEntity`*"] #[wasm_bindgen(method, getter = "name")] pub fn get_name(this: &PublicKeyCredentialEntity) -> String; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialEntity`*"] #[wasm_bindgen(method, setter = "name")] - fn set_name(this: &PublicKeyCredentialEntity, val: &str); + pub fn set_name(this: &PublicKeyCredentialEntity, val: &str); } impl PublicKeyCredentialEntity { #[doc = "Construct a new `PublicKeyCredentialEntity`."] @@ -35,16 +41,12 @@ impl PublicKeyCredentialEntity { ret.name(name); ret } - #[doc = "Change the `icon` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialEntity`*"] + #[deprecated = "Use `set_icon()` instead."] pub fn icon(&mut self, val: &str) -> &mut Self { self.set_icon(val); self } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialEntity`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { self.set_name(val); self diff --git a/crates/web-sys/src/features/gen_PublicKeyCredentialParameters.rs b/crates/web-sys/src/features/gen_PublicKeyCredentialParameters.rs index 7fdcb7419fb2..a2903ffb8f2a 100644 --- a/crates/web-sys/src/features/gen_PublicKeyCredentialParameters.rs +++ b/crates/web-sys/src/features/gen_PublicKeyCredentialParameters.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialParameters`*"] #[wasm_bindgen(method, getter = "alg")] pub fn get_alg(this: &PublicKeyCredentialParameters) -> i32; + #[doc = "Change the `alg` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialParameters`*"] #[wasm_bindgen(method, setter = "alg")] - fn set_alg(this: &PublicKeyCredentialParameters, val: i32); + pub fn set_alg(this: &PublicKeyCredentialParameters, val: i32); #[cfg(feature = "PublicKeyCredentialType")] #[doc = "Get the `type` field of this object."] #[doc = ""] @@ -24,8 +27,11 @@ extern "C" { #[wasm_bindgen(method, getter = "type")] pub fn get_type(this: &PublicKeyCredentialParameters) -> PublicKeyCredentialType; #[cfg(feature = "PublicKeyCredentialType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialParameters`, `PublicKeyCredentialType`*"] #[wasm_bindgen(method, setter = "type")] - fn set_type(this: &PublicKeyCredentialParameters, val: PublicKeyCredentialType); + pub fn set_type(this: &PublicKeyCredentialParameters, val: PublicKeyCredentialType); } impl PublicKeyCredentialParameters { #[cfg(feature = "PublicKeyCredentialType")] @@ -39,17 +45,13 @@ impl PublicKeyCredentialParameters { ret.type_(type_); ret } - #[doc = "Change the `alg` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialParameters`*"] + #[deprecated = "Use `set_alg()` instead."] pub fn alg(&mut self, val: i32) -> &mut Self { self.set_alg(val); self } #[cfg(feature = "PublicKeyCredentialType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialParameters`, `PublicKeyCredentialType`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: PublicKeyCredentialType) -> &mut Self { self.set_type(val); self diff --git a/crates/web-sys/src/features/gen_PublicKeyCredentialRequestOptions.rs b/crates/web-sys/src/features/gen_PublicKeyCredentialRequestOptions.rs index ba88e1d3dc5a..8f42a289bd54 100644 --- a/crates/web-sys/src/features/gen_PublicKeyCredentialRequestOptions.rs +++ b/crates/web-sys/src/features/gen_PublicKeyCredentialRequestOptions.rs @@ -17,8 +17,11 @@ extern "C" { pub fn get_allow_credentials( this: &PublicKeyCredentialRequestOptions, ) -> Option<::js_sys::Array>; + #[doc = "Change the `allowCredentials` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptions`*"] #[wasm_bindgen(method, setter = "allowCredentials")] - fn set_allow_credentials( + pub fn set_allow_credentials( this: &PublicKeyCredentialRequestOptions, val: &::wasm_bindgen::JsValue, ); @@ -27,8 +30,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptions`*"] #[wasm_bindgen(method, getter = "challenge")] pub fn get_challenge(this: &PublicKeyCredentialRequestOptions) -> ::js_sys::Object; + #[doc = "Change the `challenge` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptions`*"] #[wasm_bindgen(method, setter = "challenge")] - fn set_challenge(this: &PublicKeyCredentialRequestOptions, val: &::js_sys::Object); + pub fn set_challenge(this: &PublicKeyCredentialRequestOptions, val: &::js_sys::Object); #[cfg(feature = "AuthenticationExtensionsClientInputs")] #[doc = "Get the `extensions` field of this object."] #[doc = ""] @@ -38,8 +44,11 @@ extern "C" { this: &PublicKeyCredentialRequestOptions, ) -> Option; #[cfg(feature = "AuthenticationExtensionsClientInputs")] + #[doc = "Change the `extensions` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientInputs`, `PublicKeyCredentialRequestOptions`*"] #[wasm_bindgen(method, setter = "extensions")] - fn set_extensions( + pub fn set_extensions( this: &PublicKeyCredentialRequestOptions, val: &AuthenticationExtensionsClientInputs, ); @@ -48,15 +57,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptions`*"] #[wasm_bindgen(method, getter = "rpId")] pub fn get_rp_id(this: &PublicKeyCredentialRequestOptions) -> Option; + #[doc = "Change the `rpId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptions`*"] #[wasm_bindgen(method, setter = "rpId")] - fn set_rp_id(this: &PublicKeyCredentialRequestOptions, val: &str); + pub fn set_rp_id(this: &PublicKeyCredentialRequestOptions, val: &str); #[doc = "Get the `timeout` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptions`*"] #[wasm_bindgen(method, getter = "timeout")] pub fn get_timeout(this: &PublicKeyCredentialRequestOptions) -> Option; + #[doc = "Change the `timeout` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptions`*"] #[wasm_bindgen(method, setter = "timeout")] - fn set_timeout(this: &PublicKeyCredentialRequestOptions, val: u32); + pub fn set_timeout(this: &PublicKeyCredentialRequestOptions, val: u32); #[cfg(feature = "UserVerificationRequirement")] #[doc = "Get the `userVerification` field of this object."] #[doc = ""] @@ -66,8 +81,11 @@ extern "C" { this: &PublicKeyCredentialRequestOptions, ) -> Option; #[cfg(feature = "UserVerificationRequirement")] + #[doc = "Change the `userVerification` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptions`, `UserVerificationRequirement`*"] #[wasm_bindgen(method, setter = "userVerification")] - fn set_user_verification( + pub fn set_user_verification( this: &PublicKeyCredentialRequestOptions, val: UserVerificationRequirement, ); @@ -82,46 +100,34 @@ impl PublicKeyCredentialRequestOptions { ret.challenge(challenge); ret } - #[doc = "Change the `allowCredentials` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptions`*"] + #[deprecated = "Use `set_allow_credentials()` instead."] pub fn allow_credentials(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_allow_credentials(val); self } - #[doc = "Change the `challenge` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptions`*"] + #[deprecated = "Use `set_challenge()` instead."] pub fn challenge(&mut self, val: &::js_sys::Object) -> &mut Self { self.set_challenge(val); self } #[cfg(feature = "AuthenticationExtensionsClientInputs")] - #[doc = "Change the `extensions` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientInputs`, `PublicKeyCredentialRequestOptions`*"] + #[deprecated = "Use `set_extensions()` instead."] pub fn extensions(&mut self, val: &AuthenticationExtensionsClientInputs) -> &mut Self { self.set_extensions(val); self } - #[doc = "Change the `rpId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptions`*"] + #[deprecated = "Use `set_rp_id()` instead."] pub fn rp_id(&mut self, val: &str) -> &mut Self { self.set_rp_id(val); self } - #[doc = "Change the `timeout` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptions`*"] + #[deprecated = "Use `set_timeout()` instead."] pub fn timeout(&mut self, val: u32) -> &mut Self { self.set_timeout(val); self } #[cfg(feature = "UserVerificationRequirement")] - #[doc = "Change the `userVerification` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptions`, `UserVerificationRequirement`*"] + #[deprecated = "Use `set_user_verification()` instead."] pub fn user_verification(&mut self, val: UserVerificationRequirement) -> &mut Self { self.set_user_verification(val); self diff --git a/crates/web-sys/src/features/gen_PublicKeyCredentialRpEntity.rs b/crates/web-sys/src/features/gen_PublicKeyCredentialRpEntity.rs index 2e340a6f8465..1cfba5695b18 100644 --- a/crates/web-sys/src/features/gen_PublicKeyCredentialRpEntity.rs +++ b/crates/web-sys/src/features/gen_PublicKeyCredentialRpEntity.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRpEntity`*"] #[wasm_bindgen(method, getter = "icon")] pub fn get_icon(this: &PublicKeyCredentialRpEntity) -> Option; + #[doc = "Change the `icon` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRpEntity`*"] #[wasm_bindgen(method, setter = "icon")] - fn set_icon(this: &PublicKeyCredentialRpEntity, val: &str); + pub fn set_icon(this: &PublicKeyCredentialRpEntity, val: &str); #[doc = "Get the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRpEntity`*"] #[wasm_bindgen(method, getter = "name")] pub fn get_name(this: &PublicKeyCredentialRpEntity) -> String; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRpEntity`*"] #[wasm_bindgen(method, setter = "name")] - fn set_name(this: &PublicKeyCredentialRpEntity, val: &str); + pub fn set_name(this: &PublicKeyCredentialRpEntity, val: &str); #[doc = "Get the `id` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRpEntity`*"] #[wasm_bindgen(method, getter = "id")] pub fn get_id(this: &PublicKeyCredentialRpEntity) -> Option; + #[doc = "Change the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRpEntity`*"] #[wasm_bindgen(method, setter = "id")] - fn set_id(this: &PublicKeyCredentialRpEntity, val: &str); + pub fn set_id(this: &PublicKeyCredentialRpEntity, val: &str); } impl PublicKeyCredentialRpEntity { #[doc = "Construct a new `PublicKeyCredentialRpEntity`."] @@ -42,23 +51,17 @@ impl PublicKeyCredentialRpEntity { ret.name(name); ret } - #[doc = "Change the `icon` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRpEntity`*"] + #[deprecated = "Use `set_icon()` instead."] pub fn icon(&mut self, val: &str) -> &mut Self { self.set_icon(val); self } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRpEntity`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { self.set_name(val); self } - #[doc = "Change the `id` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRpEntity`*"] + #[deprecated = "Use `set_id()` instead."] pub fn id(&mut self, val: &str) -> &mut Self { self.set_id(val); self diff --git a/crates/web-sys/src/features/gen_PublicKeyCredentialUserEntity.rs b/crates/web-sys/src/features/gen_PublicKeyCredentialUserEntity.rs index c39d060185f6..017f546fcc9d 100644 --- a/crates/web-sys/src/features/gen_PublicKeyCredentialUserEntity.rs +++ b/crates/web-sys/src/features/gen_PublicKeyCredentialUserEntity.rs @@ -15,29 +15,41 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialUserEntity`*"] #[wasm_bindgen(method, getter = "icon")] pub fn get_icon(this: &PublicKeyCredentialUserEntity) -> Option; + #[doc = "Change the `icon` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialUserEntity`*"] #[wasm_bindgen(method, setter = "icon")] - fn set_icon(this: &PublicKeyCredentialUserEntity, val: &str); + pub fn set_icon(this: &PublicKeyCredentialUserEntity, val: &str); #[doc = "Get the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialUserEntity`*"] #[wasm_bindgen(method, getter = "name")] pub fn get_name(this: &PublicKeyCredentialUserEntity) -> String; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialUserEntity`*"] #[wasm_bindgen(method, setter = "name")] - fn set_name(this: &PublicKeyCredentialUserEntity, val: &str); + pub fn set_name(this: &PublicKeyCredentialUserEntity, val: &str); #[doc = "Get the `displayName` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialUserEntity`*"] #[wasm_bindgen(method, getter = "displayName")] pub fn get_display_name(this: &PublicKeyCredentialUserEntity) -> String; + #[doc = "Change the `displayName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialUserEntity`*"] #[wasm_bindgen(method, setter = "displayName")] - fn set_display_name(this: &PublicKeyCredentialUserEntity, val: &str); + pub fn set_display_name(this: &PublicKeyCredentialUserEntity, val: &str); #[doc = "Get the `id` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialUserEntity`*"] #[wasm_bindgen(method, getter = "id")] pub fn get_id(this: &PublicKeyCredentialUserEntity) -> ::js_sys::Object; + #[doc = "Change the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialUserEntity`*"] #[wasm_bindgen(method, setter = "id")] - fn set_id(this: &PublicKeyCredentialUserEntity, val: &::js_sys::Object); + pub fn set_id(this: &PublicKeyCredentialUserEntity, val: &::js_sys::Object); } impl PublicKeyCredentialUserEntity { #[doc = "Construct a new `PublicKeyCredentialUserEntity`."] @@ -51,30 +63,22 @@ impl PublicKeyCredentialUserEntity { ret.id(id); ret } - #[doc = "Change the `icon` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialUserEntity`*"] + #[deprecated = "Use `set_icon()` instead."] pub fn icon(&mut self, val: &str) -> &mut Self { self.set_icon(val); self } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialUserEntity`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { self.set_name(val); self } - #[doc = "Change the `displayName` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialUserEntity`*"] + #[deprecated = "Use `set_display_name()` instead."] pub fn display_name(&mut self, val: &str) -> &mut Self { self.set_display_name(val); self } - #[doc = "Change the `id` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialUserEntity`*"] + #[deprecated = "Use `set_id()` instead."] pub fn id(&mut self, val: &::js_sys::Object) -> &mut Self { self.set_id(val); self diff --git a/crates/web-sys/src/features/gen_PushEventInit.rs b/crates/web-sys/src/features/gen_PushEventInit.rs index ecf446e8a77c..80f525bbe2d1 100644 --- a/crates/web-sys/src/features/gen_PushEventInit.rs +++ b/crates/web-sys/src/features/gen_PushEventInit.rs @@ -15,29 +15,41 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `PushEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &PushEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &PushEventInit, val: bool); + pub fn set_bubbles(this: &PushEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PushEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &PushEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &PushEventInit, val: bool); + pub fn set_cancelable(this: &PushEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PushEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &PushEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &PushEventInit, val: bool); + pub fn set_composed(this: &PushEventInit, val: bool); #[doc = "Get the `data` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PushEventInit`*"] #[wasm_bindgen(method, getter = "data")] pub fn get_data(this: &PushEventInit) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushEventInit`*"] #[wasm_bindgen(method, setter = "data")] - fn set_data(this: &PushEventInit, val: &::wasm_bindgen::JsValue); + pub fn set_data(this: &PushEventInit, val: &::wasm_bindgen::JsValue); } impl PushEventInit { #[doc = "Construct a new `PushEventInit`."] @@ -48,30 +60,22 @@ impl PushEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PushEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PushEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PushEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } - #[doc = "Change the `data` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PushEventInit`*"] + #[deprecated = "Use `set_data()` instead."] pub fn data(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_data(val); self diff --git a/crates/web-sys/src/features/gen_PushSubscriptionInit.rs b/crates/web-sys/src/features/gen_PushSubscriptionInit.rs index 0a928a4a6612..5ad982d96cac 100644 --- a/crates/web-sys/src/features/gen_PushSubscriptionInit.rs +++ b/crates/web-sys/src/features/gen_PushSubscriptionInit.rs @@ -15,36 +15,51 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionInit`*"] #[wasm_bindgen(method, getter = "appServerKey")] pub fn get_app_server_key(this: &PushSubscriptionInit) -> Option<::js_sys::Object>; + #[doc = "Change the `appServerKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionInit`*"] #[wasm_bindgen(method, setter = "appServerKey")] - fn set_app_server_key(this: &PushSubscriptionInit, val: Option<&::js_sys::Object>); + pub fn set_app_server_key(this: &PushSubscriptionInit, val: Option<&::js_sys::Object>); #[doc = "Get the `authSecret` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionInit`*"] #[wasm_bindgen(method, getter = "authSecret")] pub fn get_auth_secret(this: &PushSubscriptionInit) -> Option<::js_sys::ArrayBuffer>; + #[doc = "Change the `authSecret` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionInit`*"] #[wasm_bindgen(method, setter = "authSecret")] - fn set_auth_secret(this: &PushSubscriptionInit, val: Option<&::js_sys::ArrayBuffer>); + pub fn set_auth_secret(this: &PushSubscriptionInit, val: Option<&::js_sys::ArrayBuffer>); #[doc = "Get the `endpoint` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionInit`*"] #[wasm_bindgen(method, getter = "endpoint")] pub fn get_endpoint(this: &PushSubscriptionInit) -> String; + #[doc = "Change the `endpoint` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionInit`*"] #[wasm_bindgen(method, setter = "endpoint")] - fn set_endpoint(this: &PushSubscriptionInit, val: &str); + pub fn set_endpoint(this: &PushSubscriptionInit, val: &str); #[doc = "Get the `p256dhKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionInit`*"] #[wasm_bindgen(method, getter = "p256dhKey")] pub fn get_p256dh_key(this: &PushSubscriptionInit) -> Option<::js_sys::ArrayBuffer>; + #[doc = "Change the `p256dhKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionInit`*"] #[wasm_bindgen(method, setter = "p256dhKey")] - fn set_p256dh_key(this: &PushSubscriptionInit, val: Option<&::js_sys::ArrayBuffer>); + pub fn set_p256dh_key(this: &PushSubscriptionInit, val: Option<&::js_sys::ArrayBuffer>); #[doc = "Get the `scope` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionInit`*"] #[wasm_bindgen(method, getter = "scope")] pub fn get_scope(this: &PushSubscriptionInit) -> String; + #[doc = "Change the `scope` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionInit`*"] #[wasm_bindgen(method, setter = "scope")] - fn set_scope(this: &PushSubscriptionInit, val: &str); + pub fn set_scope(this: &PushSubscriptionInit, val: &str); } impl PushSubscriptionInit { #[doc = "Construct a new `PushSubscriptionInit`."] @@ -57,37 +72,27 @@ impl PushSubscriptionInit { ret.scope(scope); ret } - #[doc = "Change the `appServerKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionInit`*"] + #[deprecated = "Use `set_app_server_key()` instead."] pub fn app_server_key(&mut self, val: Option<&::js_sys::Object>) -> &mut Self { self.set_app_server_key(val); self } - #[doc = "Change the `authSecret` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionInit`*"] + #[deprecated = "Use `set_auth_secret()` instead."] pub fn auth_secret(&mut self, val: Option<&::js_sys::ArrayBuffer>) -> &mut Self { self.set_auth_secret(val); self } - #[doc = "Change the `endpoint` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionInit`*"] + #[deprecated = "Use `set_endpoint()` instead."] pub fn endpoint(&mut self, val: &str) -> &mut Self { self.set_endpoint(val); self } - #[doc = "Change the `p256dhKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionInit`*"] + #[deprecated = "Use `set_p256dh_key()` instead."] pub fn p256dh_key(&mut self, val: Option<&::js_sys::ArrayBuffer>) -> &mut Self { self.set_p256dh_key(val); self } - #[doc = "Change the `scope` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionInit`*"] + #[deprecated = "Use `set_scope()` instead."] pub fn scope(&mut self, val: &str) -> &mut Self { self.set_scope(val); self diff --git a/crates/web-sys/src/features/gen_PushSubscriptionJson.rs b/crates/web-sys/src/features/gen_PushSubscriptionJson.rs index f8fb56e0cf9c..c3b04f9af297 100644 --- a/crates/web-sys/src/features/gen_PushSubscriptionJson.rs +++ b/crates/web-sys/src/features/gen_PushSubscriptionJson.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionJson`*"] #[wasm_bindgen(method, getter = "endpoint")] pub fn get_endpoint(this: &PushSubscriptionJson) -> Option; + #[doc = "Change the `endpoint` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionJson`*"] #[wasm_bindgen(method, setter = "endpoint")] - fn set_endpoint(this: &PushSubscriptionJson, val: &str); + pub fn set_endpoint(this: &PushSubscriptionJson, val: &str); #[cfg(feature = "PushSubscriptionKeys")] #[doc = "Get the `keys` field of this object."] #[doc = ""] @@ -24,8 +27,11 @@ extern "C" { #[wasm_bindgen(method, getter = "keys")] pub fn get_keys(this: &PushSubscriptionJson) -> Option; #[cfg(feature = "PushSubscriptionKeys")] + #[doc = "Change the `keys` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionJson`, `PushSubscriptionKeys`*"] #[wasm_bindgen(method, setter = "keys")] - fn set_keys(this: &PushSubscriptionJson, val: &PushSubscriptionKeys); + pub fn set_keys(this: &PushSubscriptionJson, val: &PushSubscriptionKeys); } impl PushSubscriptionJson { #[doc = "Construct a new `PushSubscriptionJson`."] @@ -36,17 +42,13 @@ impl PushSubscriptionJson { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `endpoint` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionJson`*"] + #[deprecated = "Use `set_endpoint()` instead."] pub fn endpoint(&mut self, val: &str) -> &mut Self { self.set_endpoint(val); self } #[cfg(feature = "PushSubscriptionKeys")] - #[doc = "Change the `keys` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionJson`, `PushSubscriptionKeys`*"] + #[deprecated = "Use `set_keys()` instead."] pub fn keys(&mut self, val: &PushSubscriptionKeys) -> &mut Self { self.set_keys(val); self diff --git a/crates/web-sys/src/features/gen_PushSubscriptionKeys.rs b/crates/web-sys/src/features/gen_PushSubscriptionKeys.rs index a6d35dc969f8..80a07f5ef6c6 100644 --- a/crates/web-sys/src/features/gen_PushSubscriptionKeys.rs +++ b/crates/web-sys/src/features/gen_PushSubscriptionKeys.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionKeys`*"] #[wasm_bindgen(method, getter = "auth")] pub fn get_auth(this: &PushSubscriptionKeys) -> Option; + #[doc = "Change the `auth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionKeys`*"] #[wasm_bindgen(method, setter = "auth")] - fn set_auth(this: &PushSubscriptionKeys, val: &str); + pub fn set_auth(this: &PushSubscriptionKeys, val: &str); #[doc = "Get the `p256dh` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionKeys`*"] #[wasm_bindgen(method, getter = "p256dh")] pub fn get_p256dh(this: &PushSubscriptionKeys) -> Option; + #[doc = "Change the `p256dh` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionKeys`*"] #[wasm_bindgen(method, setter = "p256dh")] - fn set_p256dh(this: &PushSubscriptionKeys, val: &str); + pub fn set_p256dh(this: &PushSubscriptionKeys, val: &str); } impl PushSubscriptionKeys { #[doc = "Construct a new `PushSubscriptionKeys`."] @@ -34,16 +40,12 @@ impl PushSubscriptionKeys { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `auth` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionKeys`*"] + #[deprecated = "Use `set_auth()` instead."] pub fn auth(&mut self, val: &str) -> &mut Self { self.set_auth(val); self } - #[doc = "Change the `p256dh` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionKeys`*"] + #[deprecated = "Use `set_p256dh()` instead."] pub fn p256dh(&mut self, val: &str) -> &mut Self { self.set_p256dh(val); self diff --git a/crates/web-sys/src/features/gen_PushSubscriptionOptionsInit.rs b/crates/web-sys/src/features/gen_PushSubscriptionOptionsInit.rs index 9aeb10147e4c..507884a5c681 100644 --- a/crates/web-sys/src/features/gen_PushSubscriptionOptionsInit.rs +++ b/crates/web-sys/src/features/gen_PushSubscriptionOptionsInit.rs @@ -17,8 +17,11 @@ extern "C" { pub fn get_application_server_key( this: &PushSubscriptionOptionsInit, ) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `applicationServerKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionOptionsInit`*"] #[wasm_bindgen(method, setter = "applicationServerKey")] - fn set_application_server_key( + pub fn set_application_server_key( this: &PushSubscriptionOptionsInit, val: &::wasm_bindgen::JsValue, ); @@ -27,8 +30,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionOptionsInit`*"] #[wasm_bindgen(method, getter = "userVisibleOnly")] pub fn get_user_visible_only(this: &PushSubscriptionOptionsInit) -> Option; + #[doc = "Change the `userVisibleOnly` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionOptionsInit`*"] #[wasm_bindgen(method, setter = "userVisibleOnly")] - fn set_user_visible_only(this: &PushSubscriptionOptionsInit, val: bool); + pub fn set_user_visible_only(this: &PushSubscriptionOptionsInit, val: bool); } impl PushSubscriptionOptionsInit { #[doc = "Construct a new `PushSubscriptionOptionsInit`."] @@ -39,16 +45,12 @@ impl PushSubscriptionOptionsInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `applicationServerKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionOptionsInit`*"] + #[deprecated = "Use `set_application_server_key()` instead."] pub fn application_server_key(&mut self, val: Option<&::wasm_bindgen::JsValue>) -> &mut Self { self.set_application_server_key(val.unwrap_or(&::wasm_bindgen::JsValue::NULL)); self } - #[doc = "Change the `userVisibleOnly` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionOptionsInit`*"] + #[deprecated = "Use `set_user_visible_only()` instead."] pub fn user_visible_only(&mut self, val: bool) -> &mut Self { self.set_user_visible_only(val); self diff --git a/crates/web-sys/src/features/gen_QueryOptions.rs b/crates/web-sys/src/features/gen_QueryOptions.rs index c5f37fa1514f..b1a58c5a5642 100644 --- a/crates/web-sys/src/features/gen_QueryOptions.rs +++ b/crates/web-sys/src/features/gen_QueryOptions.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "postscriptNames")] pub fn get_postscript_names(this: &QueryOptions) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `postscriptNames` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `QueryOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "postscriptNames")] - fn set_postscript_names(this: &QueryOptions, val: &::wasm_bindgen::JsValue); + pub fn set_postscript_names(this: &QueryOptions, val: &::wasm_bindgen::JsValue); } #[cfg(web_sys_unstable_apis)] impl QueryOptions { @@ -40,12 +47,7 @@ impl QueryOptions { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `postscriptNames` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `QueryOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_postscript_names()` instead."] pub fn postscript_names(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_postscript_names(val); self diff --git a/crates/web-sys/src/features/gen_QueuingStrategy.rs b/crates/web-sys/src/features/gen_QueuingStrategy.rs index b321126c1ea0..6d22b29060a2 100644 --- a/crates/web-sys/src/features/gen_QueuingStrategy.rs +++ b/crates/web-sys/src/features/gen_QueuingStrategy.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `QueuingStrategy`*"] #[wasm_bindgen(method, getter = "highWaterMark")] pub fn get_high_water_mark(this: &QueuingStrategy) -> Option; + #[doc = "Change the `highWaterMark` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `QueuingStrategy`*"] #[wasm_bindgen(method, setter = "highWaterMark")] - fn set_high_water_mark(this: &QueuingStrategy, val: f64); + pub fn set_high_water_mark(this: &QueuingStrategy, val: f64); #[doc = "Get the `size` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `QueuingStrategy`*"] #[wasm_bindgen(method, getter = "size")] pub fn get_size(this: &QueuingStrategy) -> Option<::js_sys::Function>; + #[doc = "Change the `size` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `QueuingStrategy`*"] #[wasm_bindgen(method, setter = "size")] - fn set_size(this: &QueuingStrategy, val: &::js_sys::Function); + pub fn set_size(this: &QueuingStrategy, val: &::js_sys::Function); } impl QueuingStrategy { #[doc = "Construct a new `QueuingStrategy`."] @@ -34,16 +40,12 @@ impl QueuingStrategy { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `highWaterMark` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `QueuingStrategy`*"] + #[deprecated = "Use `set_high_water_mark()` instead."] pub fn high_water_mark(&mut self, val: f64) -> &mut Self { self.set_high_water_mark(val); self } - #[doc = "Change the `size` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `QueuingStrategy`*"] + #[deprecated = "Use `set_size()` instead."] pub fn size(&mut self, val: &::js_sys::Function) -> &mut Self { self.set_size(val); self diff --git a/crates/web-sys/src/features/gen_QueuingStrategyInit.rs b/crates/web-sys/src/features/gen_QueuingStrategyInit.rs index 492111768cf0..e917016bf965 100644 --- a/crates/web-sys/src/features/gen_QueuingStrategyInit.rs +++ b/crates/web-sys/src/features/gen_QueuingStrategyInit.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `QueuingStrategyInit`*"] #[wasm_bindgen(method, getter = "highWaterMark")] pub fn get_high_water_mark(this: &QueuingStrategyInit) -> f64; + #[doc = "Change the `highWaterMark` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `QueuingStrategyInit`*"] #[wasm_bindgen(method, setter = "highWaterMark")] - fn set_high_water_mark(this: &QueuingStrategyInit, val: f64); + pub fn set_high_water_mark(this: &QueuingStrategyInit, val: f64); } impl QueuingStrategyInit { #[doc = "Construct a new `QueuingStrategyInit`."] @@ -28,9 +31,7 @@ impl QueuingStrategyInit { ret.high_water_mark(high_water_mark); ret } - #[doc = "Change the `highWaterMark` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `QueuingStrategyInit`*"] + #[deprecated = "Use `set_high_water_mark()` instead."] pub fn high_water_mark(&mut self, val: f64) -> &mut Self { self.set_high_water_mark(val); self diff --git a/crates/web-sys/src/features/gen_RcwnPerfStats.rs b/crates/web-sys/src/features/gen_RcwnPerfStats.rs index 29baee062d6b..b3cb7fd5b11f 100644 --- a/crates/web-sys/src/features/gen_RcwnPerfStats.rs +++ b/crates/web-sys/src/features/gen_RcwnPerfStats.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RcwnPerfStats`*"] #[wasm_bindgen(method, getter = "avgLong")] pub fn get_avg_long(this: &RcwnPerfStats) -> Option; + #[doc = "Change the `avgLong` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RcwnPerfStats`*"] #[wasm_bindgen(method, setter = "avgLong")] - fn set_avg_long(this: &RcwnPerfStats, val: u32); + pub fn set_avg_long(this: &RcwnPerfStats, val: u32); #[doc = "Get the `avgShort` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RcwnPerfStats`*"] #[wasm_bindgen(method, getter = "avgShort")] pub fn get_avg_short(this: &RcwnPerfStats) -> Option; + #[doc = "Change the `avgShort` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RcwnPerfStats`*"] #[wasm_bindgen(method, setter = "avgShort")] - fn set_avg_short(this: &RcwnPerfStats, val: u32); + pub fn set_avg_short(this: &RcwnPerfStats, val: u32); #[doc = "Get the `stddevLong` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RcwnPerfStats`*"] #[wasm_bindgen(method, getter = "stddevLong")] pub fn get_stddev_long(this: &RcwnPerfStats) -> Option; + #[doc = "Change the `stddevLong` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RcwnPerfStats`*"] #[wasm_bindgen(method, setter = "stddevLong")] - fn set_stddev_long(this: &RcwnPerfStats, val: u32); + pub fn set_stddev_long(this: &RcwnPerfStats, val: u32); } impl RcwnPerfStats { #[doc = "Construct a new `RcwnPerfStats`."] @@ -41,23 +50,17 @@ impl RcwnPerfStats { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `avgLong` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RcwnPerfStats`*"] + #[deprecated = "Use `set_avg_long()` instead."] pub fn avg_long(&mut self, val: u32) -> &mut Self { self.set_avg_long(val); self } - #[doc = "Change the `avgShort` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RcwnPerfStats`*"] + #[deprecated = "Use `set_avg_short()` instead."] pub fn avg_short(&mut self, val: u32) -> &mut Self { self.set_avg_short(val); self } - #[doc = "Change the `stddevLong` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RcwnPerfStats`*"] + #[deprecated = "Use `set_stddev_long()` instead."] pub fn stddev_long(&mut self, val: u32) -> &mut Self { self.set_stddev_long(val); self diff --git a/crates/web-sys/src/features/gen_RcwnStatus.rs b/crates/web-sys/src/features/gen_RcwnStatus.rs index 69ccde16afd0..c6a0d9271765 100644 --- a/crates/web-sys/src/features/gen_RcwnStatus.rs +++ b/crates/web-sys/src/features/gen_RcwnStatus.rs @@ -15,43 +15,61 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RcwnStatus`*"] #[wasm_bindgen(method, getter = "cacheNotSlowCount")] pub fn get_cache_not_slow_count(this: &RcwnStatus) -> Option; + #[doc = "Change the `cacheNotSlowCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RcwnStatus`*"] #[wasm_bindgen(method, setter = "cacheNotSlowCount")] - fn set_cache_not_slow_count(this: &RcwnStatus, val: u32); + pub fn set_cache_not_slow_count(this: &RcwnStatus, val: u32); #[doc = "Get the `cacheSlowCount` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RcwnStatus`*"] #[wasm_bindgen(method, getter = "cacheSlowCount")] pub fn get_cache_slow_count(this: &RcwnStatus) -> Option; + #[doc = "Change the `cacheSlowCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RcwnStatus`*"] #[wasm_bindgen(method, setter = "cacheSlowCount")] - fn set_cache_slow_count(this: &RcwnStatus, val: u32); + pub fn set_cache_slow_count(this: &RcwnStatus, val: u32); #[doc = "Get the `perfStats` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RcwnStatus`*"] #[wasm_bindgen(method, getter = "perfStats")] pub fn get_perf_stats(this: &RcwnStatus) -> Option<::js_sys::Array>; + #[doc = "Change the `perfStats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RcwnStatus`*"] #[wasm_bindgen(method, setter = "perfStats")] - fn set_perf_stats(this: &RcwnStatus, val: &::wasm_bindgen::JsValue); + pub fn set_perf_stats(this: &RcwnStatus, val: &::wasm_bindgen::JsValue); #[doc = "Get the `rcwnCacheWonCount` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RcwnStatus`*"] #[wasm_bindgen(method, getter = "rcwnCacheWonCount")] pub fn get_rcwn_cache_won_count(this: &RcwnStatus) -> Option; + #[doc = "Change the `rcwnCacheWonCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RcwnStatus`*"] #[wasm_bindgen(method, setter = "rcwnCacheWonCount")] - fn set_rcwn_cache_won_count(this: &RcwnStatus, val: u32); + pub fn set_rcwn_cache_won_count(this: &RcwnStatus, val: u32); #[doc = "Get the `rcwnNetWonCount` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RcwnStatus`*"] #[wasm_bindgen(method, getter = "rcwnNetWonCount")] pub fn get_rcwn_net_won_count(this: &RcwnStatus) -> Option; + #[doc = "Change the `rcwnNetWonCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RcwnStatus`*"] #[wasm_bindgen(method, setter = "rcwnNetWonCount")] - fn set_rcwn_net_won_count(this: &RcwnStatus, val: u32); + pub fn set_rcwn_net_won_count(this: &RcwnStatus, val: u32); #[doc = "Get the `totalNetworkRequests` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RcwnStatus`*"] #[wasm_bindgen(method, getter = "totalNetworkRequests")] pub fn get_total_network_requests(this: &RcwnStatus) -> Option; + #[doc = "Change the `totalNetworkRequests` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RcwnStatus`*"] #[wasm_bindgen(method, setter = "totalNetworkRequests")] - fn set_total_network_requests(this: &RcwnStatus, val: u32); + pub fn set_total_network_requests(this: &RcwnStatus, val: u32); } impl RcwnStatus { #[doc = "Construct a new `RcwnStatus`."] @@ -62,44 +80,32 @@ impl RcwnStatus { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `cacheNotSlowCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RcwnStatus`*"] + #[deprecated = "Use `set_cache_not_slow_count()` instead."] pub fn cache_not_slow_count(&mut self, val: u32) -> &mut Self { self.set_cache_not_slow_count(val); self } - #[doc = "Change the `cacheSlowCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RcwnStatus`*"] + #[deprecated = "Use `set_cache_slow_count()` instead."] pub fn cache_slow_count(&mut self, val: u32) -> &mut Self { self.set_cache_slow_count(val); self } - #[doc = "Change the `perfStats` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RcwnStatus`*"] + #[deprecated = "Use `set_perf_stats()` instead."] pub fn perf_stats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_perf_stats(val); self } - #[doc = "Change the `rcwnCacheWonCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RcwnStatus`*"] + #[deprecated = "Use `set_rcwn_cache_won_count()` instead."] pub fn rcwn_cache_won_count(&mut self, val: u32) -> &mut Self { self.set_rcwn_cache_won_count(val); self } - #[doc = "Change the `rcwnNetWonCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RcwnStatus`*"] + #[deprecated = "Use `set_rcwn_net_won_count()` instead."] pub fn rcwn_net_won_count(&mut self, val: u32) -> &mut Self { self.set_rcwn_net_won_count(val); self } - #[doc = "Change the `totalNetworkRequests` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RcwnStatus`*"] + #[deprecated = "Use `set_total_network_requests()` instead."] pub fn total_network_requests(&mut self, val: u32) -> &mut Self { self.set_total_network_requests(val); self diff --git a/crates/web-sys/src/features/gen_ReadableStreamGetReaderOptions.rs b/crates/web-sys/src/features/gen_ReadableStreamGetReaderOptions.rs index 1b791d3ccefc..0cf5d910ca9e 100644 --- a/crates/web-sys/src/features/gen_ReadableStreamGetReaderOptions.rs +++ b/crates/web-sys/src/features/gen_ReadableStreamGetReaderOptions.rs @@ -17,8 +17,11 @@ extern "C" { #[wasm_bindgen(method, getter = "mode")] pub fn get_mode(this: &ReadableStreamGetReaderOptions) -> Option; #[cfg(feature = "ReadableStreamReaderMode")] + #[doc = "Change the `mode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ReadableStreamGetReaderOptions`, `ReadableStreamReaderMode`*"] #[wasm_bindgen(method, setter = "mode")] - fn set_mode(this: &ReadableStreamGetReaderOptions, val: ReadableStreamReaderMode); + pub fn set_mode(this: &ReadableStreamGetReaderOptions, val: ReadableStreamReaderMode); } impl ReadableStreamGetReaderOptions { #[doc = "Construct a new `ReadableStreamGetReaderOptions`."] @@ -30,9 +33,7 @@ impl ReadableStreamGetReaderOptions { ret } #[cfg(feature = "ReadableStreamReaderMode")] - #[doc = "Change the `mode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ReadableStreamGetReaderOptions`, `ReadableStreamReaderMode`*"] + #[deprecated = "Use `set_mode()` instead."] pub fn mode(&mut self, val: ReadableStreamReaderMode) -> &mut Self { self.set_mode(val); self diff --git a/crates/web-sys/src/features/gen_ReadableStreamIteratorOptions.rs b/crates/web-sys/src/features/gen_ReadableStreamIteratorOptions.rs index 64b7f195d2c7..cc5b87e0bd20 100644 --- a/crates/web-sys/src/features/gen_ReadableStreamIteratorOptions.rs +++ b/crates/web-sys/src/features/gen_ReadableStreamIteratorOptions.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ReadableStreamIteratorOptions`*"] #[wasm_bindgen(method, getter = "preventCancel")] pub fn get_prevent_cancel(this: &ReadableStreamIteratorOptions) -> Option; + #[doc = "Change the `preventCancel` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ReadableStreamIteratorOptions`*"] #[wasm_bindgen(method, setter = "preventCancel")] - fn set_prevent_cancel(this: &ReadableStreamIteratorOptions, val: bool); + pub fn set_prevent_cancel(this: &ReadableStreamIteratorOptions, val: bool); } impl ReadableStreamIteratorOptions { #[doc = "Construct a new `ReadableStreamIteratorOptions`."] @@ -27,9 +30,7 @@ impl ReadableStreamIteratorOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `preventCancel` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ReadableStreamIteratorOptions`*"] + #[deprecated = "Use `set_prevent_cancel()` instead."] pub fn prevent_cancel(&mut self, val: bool) -> &mut Self { self.set_prevent_cancel(val); self diff --git a/crates/web-sys/src/features/gen_ReadableStreamReadResult.rs b/crates/web-sys/src/features/gen_ReadableStreamReadResult.rs index 8d6b66750c3b..9f22eb0a1eb9 100644 --- a/crates/web-sys/src/features/gen_ReadableStreamReadResult.rs +++ b/crates/web-sys/src/features/gen_ReadableStreamReadResult.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ReadableStreamReadResult`*"] #[wasm_bindgen(method, getter = "done")] pub fn get_done(this: &ReadableStreamReadResult) -> Option; + #[doc = "Change the `done` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ReadableStreamReadResult`*"] #[wasm_bindgen(method, setter = "done")] - fn set_done(this: &ReadableStreamReadResult, val: bool); + pub fn set_done(this: &ReadableStreamReadResult, val: bool); #[doc = "Get the `value` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ReadableStreamReadResult`*"] #[wasm_bindgen(method, getter = "value")] pub fn get_value(this: &ReadableStreamReadResult) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `value` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ReadableStreamReadResult`*"] #[wasm_bindgen(method, setter = "value")] - fn set_value(this: &ReadableStreamReadResult, val: &::wasm_bindgen::JsValue); + pub fn set_value(this: &ReadableStreamReadResult, val: &::wasm_bindgen::JsValue); } impl ReadableStreamReadResult { #[doc = "Construct a new `ReadableStreamReadResult`."] @@ -34,16 +40,12 @@ impl ReadableStreamReadResult { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `done` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ReadableStreamReadResult`*"] + #[deprecated = "Use `set_done()` instead."] pub fn done(&mut self, val: bool) -> &mut Self { self.set_done(val); self } - #[doc = "Change the `value` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ReadableStreamReadResult`*"] + #[deprecated = "Use `set_value()` instead."] pub fn value(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_value(val); self diff --git a/crates/web-sys/src/features/gen_ReadableWritablePair.rs b/crates/web-sys/src/features/gen_ReadableWritablePair.rs index 86d32aa538e1..5b15a0cf9978 100644 --- a/crates/web-sys/src/features/gen_ReadableWritablePair.rs +++ b/crates/web-sys/src/features/gen_ReadableWritablePair.rs @@ -17,8 +17,11 @@ extern "C" { #[wasm_bindgen(method, getter = "readable")] pub fn get_readable(this: &ReadableWritablePair) -> ReadableStream; #[cfg(feature = "ReadableStream")] + #[doc = "Change the `readable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ReadableStream`, `ReadableWritablePair`*"] #[wasm_bindgen(method, setter = "readable")] - fn set_readable(this: &ReadableWritablePair, val: &ReadableStream); + pub fn set_readable(this: &ReadableWritablePair, val: &ReadableStream); #[cfg(feature = "WritableStream")] #[doc = "Get the `writable` field of this object."] #[doc = ""] @@ -26,8 +29,11 @@ extern "C" { #[wasm_bindgen(method, getter = "writable")] pub fn get_writable(this: &ReadableWritablePair) -> WritableStream; #[cfg(feature = "WritableStream")] + #[doc = "Change the `writable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ReadableWritablePair`, `WritableStream`*"] #[wasm_bindgen(method, setter = "writable")] - fn set_writable(this: &ReadableWritablePair, val: &WritableStream); + pub fn set_writable(this: &ReadableWritablePair, val: &WritableStream); } impl ReadableWritablePair { #[cfg(all(feature = "ReadableStream", feature = "WritableStream",))] @@ -42,17 +48,13 @@ impl ReadableWritablePair { ret } #[cfg(feature = "ReadableStream")] - #[doc = "Change the `readable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ReadableStream`, `ReadableWritablePair`*"] + #[deprecated = "Use `set_readable()` instead."] pub fn readable(&mut self, val: &ReadableStream) -> &mut Self { self.set_readable(val); self } #[cfg(feature = "WritableStream")] - #[doc = "Change the `writable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ReadableWritablePair`, `WritableStream`*"] + #[deprecated = "Use `set_writable()` instead."] pub fn writable(&mut self, val: &WritableStream) -> &mut Self { self.set_writable(val); self diff --git a/crates/web-sys/src/features/gen_RegisterRequest.rs b/crates/web-sys/src/features/gen_RegisterRequest.rs index b075769bdb18..0b3c741d8059 100644 --- a/crates/web-sys/src/features/gen_RegisterRequest.rs +++ b/crates/web-sys/src/features/gen_RegisterRequest.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RegisterRequest`*"] #[wasm_bindgen(method, getter = "challenge")] pub fn get_challenge(this: &RegisterRequest) -> Option; + #[doc = "Change the `challenge` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RegisterRequest`*"] #[wasm_bindgen(method, setter = "challenge")] - fn set_challenge(this: &RegisterRequest, val: &str); + pub fn set_challenge(this: &RegisterRequest, val: &str); #[doc = "Get the `version` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RegisterRequest`*"] #[wasm_bindgen(method, getter = "version")] pub fn get_version(this: &RegisterRequest) -> Option; + #[doc = "Change the `version` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RegisterRequest`*"] #[wasm_bindgen(method, setter = "version")] - fn set_version(this: &RegisterRequest, val: &str); + pub fn set_version(this: &RegisterRequest, val: &str); } impl RegisterRequest { #[doc = "Construct a new `RegisterRequest`."] @@ -34,16 +40,12 @@ impl RegisterRequest { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `challenge` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RegisterRequest`*"] + #[deprecated = "Use `set_challenge()` instead."] pub fn challenge(&mut self, val: &str) -> &mut Self { self.set_challenge(val); self } - #[doc = "Change the `version` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RegisterRequest`*"] + #[deprecated = "Use `set_version()` instead."] pub fn version(&mut self, val: &str) -> &mut Self { self.set_version(val); self diff --git a/crates/web-sys/src/features/gen_RegisterResponse.rs b/crates/web-sys/src/features/gen_RegisterResponse.rs index 56e6fa966bc9..3ec0f53e6b91 100644 --- a/crates/web-sys/src/features/gen_RegisterResponse.rs +++ b/crates/web-sys/src/features/gen_RegisterResponse.rs @@ -15,36 +15,51 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RegisterResponse`*"] #[wasm_bindgen(method, getter = "clientData")] pub fn get_client_data(this: &RegisterResponse) -> Option; + #[doc = "Change the `clientData` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RegisterResponse`*"] #[wasm_bindgen(method, setter = "clientData")] - fn set_client_data(this: &RegisterResponse, val: &str); + pub fn set_client_data(this: &RegisterResponse, val: &str); #[doc = "Get the `errorCode` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RegisterResponse`*"] #[wasm_bindgen(method, getter = "errorCode")] pub fn get_error_code(this: &RegisterResponse) -> Option; + #[doc = "Change the `errorCode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RegisterResponse`*"] #[wasm_bindgen(method, setter = "errorCode")] - fn set_error_code(this: &RegisterResponse, val: Option); + pub fn set_error_code(this: &RegisterResponse, val: Option); #[doc = "Get the `errorMessage` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RegisterResponse`*"] #[wasm_bindgen(method, getter = "errorMessage")] pub fn get_error_message(this: &RegisterResponse) -> Option; + #[doc = "Change the `errorMessage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RegisterResponse`*"] #[wasm_bindgen(method, setter = "errorMessage")] - fn set_error_message(this: &RegisterResponse, val: Option<&str>); + pub fn set_error_message(this: &RegisterResponse, val: Option<&str>); #[doc = "Get the `registrationData` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RegisterResponse`*"] #[wasm_bindgen(method, getter = "registrationData")] pub fn get_registration_data(this: &RegisterResponse) -> Option; + #[doc = "Change the `registrationData` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RegisterResponse`*"] #[wasm_bindgen(method, setter = "registrationData")] - fn set_registration_data(this: &RegisterResponse, val: &str); + pub fn set_registration_data(this: &RegisterResponse, val: &str); #[doc = "Get the `version` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RegisterResponse`*"] #[wasm_bindgen(method, getter = "version")] pub fn get_version(this: &RegisterResponse) -> Option; + #[doc = "Change the `version` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RegisterResponse`*"] #[wasm_bindgen(method, setter = "version")] - fn set_version(this: &RegisterResponse, val: &str); + pub fn set_version(this: &RegisterResponse, val: &str); } impl RegisterResponse { #[doc = "Construct a new `RegisterResponse`."] @@ -55,37 +70,27 @@ impl RegisterResponse { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `clientData` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RegisterResponse`*"] + #[deprecated = "Use `set_client_data()` instead."] pub fn client_data(&mut self, val: &str) -> &mut Self { self.set_client_data(val); self } - #[doc = "Change the `errorCode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RegisterResponse`*"] + #[deprecated = "Use `set_error_code()` instead."] pub fn error_code(&mut self, val: Option) -> &mut Self { self.set_error_code(val); self } - #[doc = "Change the `errorMessage` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RegisterResponse`*"] + #[deprecated = "Use `set_error_message()` instead."] pub fn error_message(&mut self, val: Option<&str>) -> &mut Self { self.set_error_message(val); self } - #[doc = "Change the `registrationData` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RegisterResponse`*"] + #[deprecated = "Use `set_registration_data()` instead."] pub fn registration_data(&mut self, val: &str) -> &mut Self { self.set_registration_data(val); self } - #[doc = "Change the `version` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RegisterResponse`*"] + #[deprecated = "Use `set_version()` instead."] pub fn version(&mut self, val: &str) -> &mut Self { self.set_version(val); self diff --git a/crates/web-sys/src/features/gen_RegisteredKey.rs b/crates/web-sys/src/features/gen_RegisteredKey.rs index c0e4270711c6..9698b9c89c3b 100644 --- a/crates/web-sys/src/features/gen_RegisteredKey.rs +++ b/crates/web-sys/src/features/gen_RegisteredKey.rs @@ -15,29 +15,41 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RegisteredKey`*"] #[wasm_bindgen(method, getter = "appId")] pub fn get_app_id(this: &RegisteredKey) -> Option; + #[doc = "Change the `appId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RegisteredKey`*"] #[wasm_bindgen(method, setter = "appId")] - fn set_app_id(this: &RegisteredKey, val: Option<&str>); + pub fn set_app_id(this: &RegisteredKey, val: Option<&str>); #[doc = "Get the `keyHandle` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RegisteredKey`*"] #[wasm_bindgen(method, getter = "keyHandle")] pub fn get_key_handle(this: &RegisteredKey) -> Option; + #[doc = "Change the `keyHandle` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RegisteredKey`*"] #[wasm_bindgen(method, setter = "keyHandle")] - fn set_key_handle(this: &RegisteredKey, val: &str); + pub fn set_key_handle(this: &RegisteredKey, val: &str); #[doc = "Get the `transports` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RegisteredKey`*"] #[wasm_bindgen(method, getter = "transports")] pub fn get_transports(this: &RegisteredKey) -> Option<::js_sys::Array>; + #[doc = "Change the `transports` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RegisteredKey`*"] #[wasm_bindgen(method, setter = "transports")] - fn set_transports(this: &RegisteredKey, val: &::wasm_bindgen::JsValue); + pub fn set_transports(this: &RegisteredKey, val: &::wasm_bindgen::JsValue); #[doc = "Get the `version` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RegisteredKey`*"] #[wasm_bindgen(method, getter = "version")] pub fn get_version(this: &RegisteredKey) -> Option; + #[doc = "Change the `version` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RegisteredKey`*"] #[wasm_bindgen(method, setter = "version")] - fn set_version(this: &RegisteredKey, val: &str); + pub fn set_version(this: &RegisteredKey, val: &str); } impl RegisteredKey { #[doc = "Construct a new `RegisteredKey`."] @@ -48,30 +60,22 @@ impl RegisteredKey { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `appId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RegisteredKey`*"] + #[deprecated = "Use `set_app_id()` instead."] pub fn app_id(&mut self, val: Option<&str>) -> &mut Self { self.set_app_id(val); self } - #[doc = "Change the `keyHandle` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RegisteredKey`*"] + #[deprecated = "Use `set_key_handle()` instead."] pub fn key_handle(&mut self, val: &str) -> &mut Self { self.set_key_handle(val); self } - #[doc = "Change the `transports` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RegisteredKey`*"] + #[deprecated = "Use `set_transports()` instead."] pub fn transports(&mut self, val: Option<&::wasm_bindgen::JsValue>) -> &mut Self { self.set_transports(val.unwrap_or(&::wasm_bindgen::JsValue::NULL)); self } - #[doc = "Change the `version` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RegisteredKey`*"] + #[deprecated = "Use `set_version()` instead."] pub fn version(&mut self, val: &str) -> &mut Self { self.set_version(val); self diff --git a/crates/web-sys/src/features/gen_RegistrationOptions.rs b/crates/web-sys/src/features/gen_RegistrationOptions.rs index 8af587e33605..fe380286b6f1 100644 --- a/crates/web-sys/src/features/gen_RegistrationOptions.rs +++ b/crates/web-sys/src/features/gen_RegistrationOptions.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RegistrationOptions`*"] #[wasm_bindgen(method, getter = "scope")] pub fn get_scope(this: &RegistrationOptions) -> Option; + #[doc = "Change the `scope` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RegistrationOptions`*"] #[wasm_bindgen(method, setter = "scope")] - fn set_scope(this: &RegistrationOptions, val: &str); + pub fn set_scope(this: &RegistrationOptions, val: &str); #[doc = "Get the `type` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RegistrationOptions`*"] #[wasm_bindgen(method, getter = "type")] pub fn get_type(this: &RegistrationOptions) -> Option; + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RegistrationOptions`*"] #[wasm_bindgen(method, setter = "type")] - fn set_type(this: &RegistrationOptions, val: &str); + pub fn set_type(this: &RegistrationOptions, val: &str); #[cfg(feature = "ServiceWorkerUpdateViaCache")] #[doc = "Get the `updateViaCache` field of this object."] #[doc = ""] @@ -31,8 +37,11 @@ extern "C" { #[wasm_bindgen(method, getter = "updateViaCache")] pub fn get_update_via_cache(this: &RegistrationOptions) -> Option; #[cfg(feature = "ServiceWorkerUpdateViaCache")] + #[doc = "Change the `updateViaCache` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RegistrationOptions`, `ServiceWorkerUpdateViaCache`*"] #[wasm_bindgen(method, setter = "updateViaCache")] - fn set_update_via_cache(this: &RegistrationOptions, val: ServiceWorkerUpdateViaCache); + pub fn set_update_via_cache(this: &RegistrationOptions, val: ServiceWorkerUpdateViaCache); } impl RegistrationOptions { #[doc = "Construct a new `RegistrationOptions`."] @@ -43,24 +52,18 @@ impl RegistrationOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `scope` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RegistrationOptions`*"] + #[deprecated = "Use `set_scope()` instead."] pub fn scope(&mut self, val: &str) -> &mut Self { self.set_scope(val); self } - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RegistrationOptions`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: &str) -> &mut Self { self.set_type(val); self } #[cfg(feature = "ServiceWorkerUpdateViaCache")] - #[doc = "Change the `updateViaCache` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RegistrationOptions`, `ServiceWorkerUpdateViaCache`*"] + #[deprecated = "Use `set_update_via_cache()` instead."] pub fn update_via_cache(&mut self, val: ServiceWorkerUpdateViaCache) -> &mut Self { self.set_update_via_cache(val); self diff --git a/crates/web-sys/src/features/gen_RequestDeviceOptions.rs b/crates/web-sys/src/features/gen_RequestDeviceOptions.rs index aa74df06c082..265dec607e0f 100644 --- a/crates/web-sys/src/features/gen_RequestDeviceOptions.rs +++ b/crates/web-sys/src/features/gen_RequestDeviceOptions.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "acceptAllDevices")] pub fn get_accept_all_devices(this: &RequestDeviceOptions) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `acceptAllDevices` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestDeviceOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "acceptAllDevices")] - fn set_accept_all_devices(this: &RequestDeviceOptions, val: bool); + pub fn set_accept_all_devices(this: &RequestDeviceOptions, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `filters` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "filters")] pub fn get_filters(this: &RequestDeviceOptions) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `filters` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestDeviceOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "filters")] - fn set_filters(this: &RequestDeviceOptions, val: &::wasm_bindgen::JsValue); + pub fn set_filters(this: &RequestDeviceOptions, val: &::wasm_bindgen::JsValue); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `optionalServices` field of this object."] #[doc = ""] @@ -45,8 +59,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "optionalServices")] pub fn get_optional_services(this: &RequestDeviceOptions) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `optionalServices` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestDeviceOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "optionalServices")] - fn set_optional_services(this: &RequestDeviceOptions, val: &::wasm_bindgen::JsValue); + pub fn set_optional_services(this: &RequestDeviceOptions, val: &::wasm_bindgen::JsValue); } #[cfg(web_sys_unstable_apis)] impl RequestDeviceOptions { @@ -62,34 +83,19 @@ impl RequestDeviceOptions { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `acceptAllDevices` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RequestDeviceOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_accept_all_devices()` instead."] pub fn accept_all_devices(&mut self, val: bool) -> &mut Self { self.set_accept_all_devices(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `filters` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RequestDeviceOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_filters()` instead."] pub fn filters(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_filters(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `optionalServices` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RequestDeviceOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_optional_services()` instead."] pub fn optional_services(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_optional_services(val); self diff --git a/crates/web-sys/src/features/gen_RequestInit.rs b/crates/web-sys/src/features/gen_RequestInit.rs index 5ac3ca32369d..ed3eb257b7e5 100644 --- a/crates/web-sys/src/features/gen_RequestInit.rs +++ b/crates/web-sys/src/features/gen_RequestInit.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RequestInit`*"] #[wasm_bindgen(method, getter = "body")] pub fn get_body(this: &RequestInit) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `body` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestInit`*"] #[wasm_bindgen(method, setter = "body")] - fn set_body(this: &RequestInit, val: &::wasm_bindgen::JsValue); + pub fn set_body(this: &RequestInit, val: &::wasm_bindgen::JsValue); #[cfg(feature = "RequestCache")] #[doc = "Get the `cache` field of this object."] #[doc = ""] @@ -24,8 +27,11 @@ extern "C" { #[wasm_bindgen(method, getter = "cache")] pub fn get_cache(this: &RequestInit) -> Option; #[cfg(feature = "RequestCache")] + #[doc = "Change the `cache` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestCache`, `RequestInit`*"] #[wasm_bindgen(method, setter = "cache")] - fn set_cache(this: &RequestInit, val: RequestCache); + pub fn set_cache(this: &RequestInit, val: RequestCache); #[cfg(feature = "RequestCredentials")] #[doc = "Get the `credentials` field of this object."] #[doc = ""] @@ -33,29 +39,41 @@ extern "C" { #[wasm_bindgen(method, getter = "credentials")] pub fn get_credentials(this: &RequestInit) -> Option; #[cfg(feature = "RequestCredentials")] + #[doc = "Change the `credentials` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestCredentials`, `RequestInit`*"] #[wasm_bindgen(method, setter = "credentials")] - fn set_credentials(this: &RequestInit, val: RequestCredentials); + pub fn set_credentials(this: &RequestInit, val: RequestCredentials); #[doc = "Get the `headers` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RequestInit`*"] #[wasm_bindgen(method, getter = "headers")] pub fn get_headers(this: &RequestInit) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `headers` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestInit`*"] #[wasm_bindgen(method, setter = "headers")] - fn set_headers(this: &RequestInit, val: &::wasm_bindgen::JsValue); + pub fn set_headers(this: &RequestInit, val: &::wasm_bindgen::JsValue); #[doc = "Get the `integrity` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RequestInit`*"] #[wasm_bindgen(method, getter = "integrity")] pub fn get_integrity(this: &RequestInit) -> Option; + #[doc = "Change the `integrity` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestInit`*"] #[wasm_bindgen(method, setter = "integrity")] - fn set_integrity(this: &RequestInit, val: &str); + pub fn set_integrity(this: &RequestInit, val: &str); #[doc = "Get the `method` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RequestInit`*"] #[wasm_bindgen(method, getter = "method")] pub fn get_method(this: &RequestInit) -> Option; + #[doc = "Change the `method` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestInit`*"] #[wasm_bindgen(method, setter = "method")] - fn set_method(this: &RequestInit, val: &str); + pub fn set_method(this: &RequestInit, val: &str); #[cfg(feature = "RequestMode")] #[doc = "Get the `mode` field of this object."] #[doc = ""] @@ -63,8 +81,11 @@ extern "C" { #[wasm_bindgen(method, getter = "mode")] pub fn get_mode(this: &RequestInit) -> Option; #[cfg(feature = "RequestMode")] + #[doc = "Change the `mode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestInit`, `RequestMode`*"] #[wasm_bindgen(method, setter = "mode")] - fn set_mode(this: &RequestInit, val: RequestMode); + pub fn set_mode(this: &RequestInit, val: RequestMode); #[cfg(feature = "ObserverCallback")] #[doc = "Get the `observe` field of this object."] #[doc = ""] @@ -72,8 +93,11 @@ extern "C" { #[wasm_bindgen(method, getter = "observe")] pub fn get_observe(this: &RequestInit) -> Option; #[cfg(feature = "ObserverCallback")] + #[doc = "Change the `observe` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ObserverCallback`, `RequestInit`*"] #[wasm_bindgen(method, setter = "observe")] - fn set_observe(this: &RequestInit, val: &ObserverCallback); + pub fn set_observe(this: &RequestInit, val: &ObserverCallback); #[cfg(feature = "RequestRedirect")] #[doc = "Get the `redirect` field of this object."] #[doc = ""] @@ -81,15 +105,21 @@ extern "C" { #[wasm_bindgen(method, getter = "redirect")] pub fn get_redirect(this: &RequestInit) -> Option; #[cfg(feature = "RequestRedirect")] + #[doc = "Change the `redirect` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestInit`, `RequestRedirect`*"] #[wasm_bindgen(method, setter = "redirect")] - fn set_redirect(this: &RequestInit, val: RequestRedirect); + pub fn set_redirect(this: &RequestInit, val: RequestRedirect); #[doc = "Get the `referrer` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RequestInit`*"] #[wasm_bindgen(method, getter = "referrer")] pub fn get_referrer(this: &RequestInit) -> Option; + #[doc = "Change the `referrer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestInit`*"] #[wasm_bindgen(method, setter = "referrer")] - fn set_referrer(this: &RequestInit, val: &str); + pub fn set_referrer(this: &RequestInit, val: &str); #[cfg(feature = "ReferrerPolicy")] #[doc = "Get the `referrerPolicy` field of this object."] #[doc = ""] @@ -97,8 +127,11 @@ extern "C" { #[wasm_bindgen(method, getter = "referrerPolicy")] pub fn get_referrer_policy(this: &RequestInit) -> Option; #[cfg(feature = "ReferrerPolicy")] + #[doc = "Change the `referrerPolicy` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ReferrerPolicy`, `RequestInit`*"] #[wasm_bindgen(method, setter = "referrerPolicy")] - fn set_referrer_policy(this: &RequestInit, val: ReferrerPolicy); + pub fn set_referrer_policy(this: &RequestInit, val: ReferrerPolicy); #[cfg(feature = "AbortSignal")] #[doc = "Get the `signal` field of this object."] #[doc = ""] @@ -106,8 +139,11 @@ extern "C" { #[wasm_bindgen(method, getter = "signal")] pub fn get_signal(this: &RequestInit) -> Option; #[cfg(feature = "AbortSignal")] + #[doc = "Change the `signal` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `RequestInit`*"] #[wasm_bindgen(method, setter = "signal")] - fn set_signal(this: &RequestInit, val: Option<&AbortSignal>); + pub fn set_signal(this: &RequestInit, val: Option<&AbortSignal>); } impl RequestInit { #[doc = "Construct a new `RequestInit`."] @@ -118,93 +154,69 @@ impl RequestInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `body` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RequestInit`*"] + #[deprecated = "Use `set_body()` instead."] pub fn body(&mut self, val: Option<&::wasm_bindgen::JsValue>) -> &mut Self { self.set_body(val.unwrap_or(&::wasm_bindgen::JsValue::NULL)); self } #[cfg(feature = "RequestCache")] - #[doc = "Change the `cache` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RequestCache`, `RequestInit`*"] + #[deprecated = "Use `set_cache()` instead."] pub fn cache(&mut self, val: RequestCache) -> &mut Self { self.set_cache(val); self } #[cfg(feature = "RequestCredentials")] - #[doc = "Change the `credentials` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RequestCredentials`, `RequestInit`*"] + #[deprecated = "Use `set_credentials()` instead."] pub fn credentials(&mut self, val: RequestCredentials) -> &mut Self { self.set_credentials(val); self } - #[doc = "Change the `headers` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RequestInit`*"] + #[deprecated = "Use `set_headers()` instead."] pub fn headers(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_headers(val); self } - #[doc = "Change the `integrity` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RequestInit`*"] + #[deprecated = "Use `set_integrity()` instead."] pub fn integrity(&mut self, val: &str) -> &mut Self { self.set_integrity(val); self } - #[doc = "Change the `method` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RequestInit`*"] + #[deprecated = "Use `set_method()` instead."] pub fn method(&mut self, val: &str) -> &mut Self { self.set_method(val); self } #[cfg(feature = "RequestMode")] - #[doc = "Change the `mode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RequestInit`, `RequestMode`*"] + #[deprecated = "Use `set_mode()` instead."] pub fn mode(&mut self, val: RequestMode) -> &mut Self { self.set_mode(val); self } #[cfg(feature = "ObserverCallback")] - #[doc = "Change the `observe` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ObserverCallback`, `RequestInit`*"] + #[deprecated = "Use `set_observe()` instead."] pub fn observe(&mut self, val: &ObserverCallback) -> &mut Self { self.set_observe(val); self } #[cfg(feature = "RequestRedirect")] - #[doc = "Change the `redirect` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RequestInit`, `RequestRedirect`*"] + #[deprecated = "Use `set_redirect()` instead."] pub fn redirect(&mut self, val: RequestRedirect) -> &mut Self { self.set_redirect(val); self } - #[doc = "Change the `referrer` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RequestInit`*"] + #[deprecated = "Use `set_referrer()` instead."] pub fn referrer(&mut self, val: &str) -> &mut Self { self.set_referrer(val); self } #[cfg(feature = "ReferrerPolicy")] - #[doc = "Change the `referrerPolicy` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ReferrerPolicy`, `RequestInit`*"] + #[deprecated = "Use `set_referrer_policy()` instead."] pub fn referrer_policy(&mut self, val: ReferrerPolicy) -> &mut Self { self.set_referrer_policy(val); self } #[cfg(feature = "AbortSignal")] - #[doc = "Change the `signal` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `RequestInit`*"] + #[deprecated = "Use `set_signal()` instead."] pub fn signal(&mut self, val: Option<&AbortSignal>) -> &mut Self { self.set_signal(val); self diff --git a/crates/web-sys/src/features/gen_RequestMediaKeySystemAccessNotification.rs b/crates/web-sys/src/features/gen_RequestMediaKeySystemAccessNotification.rs index cd204b0b7acf..5c0c2f0758ba 100644 --- a/crates/web-sys/src/features/gen_RequestMediaKeySystemAccessNotification.rs +++ b/crates/web-sys/src/features/gen_RequestMediaKeySystemAccessNotification.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RequestMediaKeySystemAccessNotification`*"] #[wasm_bindgen(method, getter = "keySystem")] pub fn get_key_system(this: &RequestMediaKeySystemAccessNotification) -> String; + #[doc = "Change the `keySystem` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestMediaKeySystemAccessNotification`*"] #[wasm_bindgen(method, setter = "keySystem")] - fn set_key_system(this: &RequestMediaKeySystemAccessNotification, val: &str); + pub fn set_key_system(this: &RequestMediaKeySystemAccessNotification, val: &str); #[cfg(feature = "MediaKeySystemStatus")] #[doc = "Get the `status` field of this object."] #[doc = ""] @@ -24,8 +27,11 @@ extern "C" { #[wasm_bindgen(method, getter = "status")] pub fn get_status(this: &RequestMediaKeySystemAccessNotification) -> MediaKeySystemStatus; #[cfg(feature = "MediaKeySystemStatus")] + #[doc = "Change the `status` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemStatus`, `RequestMediaKeySystemAccessNotification`*"] #[wasm_bindgen(method, setter = "status")] - fn set_status(this: &RequestMediaKeySystemAccessNotification, val: MediaKeySystemStatus); + pub fn set_status(this: &RequestMediaKeySystemAccessNotification, val: MediaKeySystemStatus); } impl RequestMediaKeySystemAccessNotification { #[cfg(feature = "MediaKeySystemStatus")] @@ -39,17 +45,13 @@ impl RequestMediaKeySystemAccessNotification { ret.status(status); ret } - #[doc = "Change the `keySystem` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RequestMediaKeySystemAccessNotification`*"] + #[deprecated = "Use `set_key_system()` instead."] pub fn key_system(&mut self, val: &str) -> &mut Self { self.set_key_system(val); self } #[cfg(feature = "MediaKeySystemStatus")] - #[doc = "Change the `status` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemStatus`, `RequestMediaKeySystemAccessNotification`*"] + #[deprecated = "Use `set_status()` instead."] pub fn status(&mut self, val: MediaKeySystemStatus) -> &mut Self { self.set_status(val); self diff --git a/crates/web-sys/src/features/gen_ResizeObserverOptions.rs b/crates/web-sys/src/features/gen_ResizeObserverOptions.rs index 288aa25ad68a..07d824be9ac6 100644 --- a/crates/web-sys/src/features/gen_ResizeObserverOptions.rs +++ b/crates/web-sys/src/features/gen_ResizeObserverOptions.rs @@ -17,8 +17,11 @@ extern "C" { #[wasm_bindgen(method, getter = "box")] pub fn get_box(this: &ResizeObserverOptions) -> Option; #[cfg(feature = "ResizeObserverBoxOptions")] + #[doc = "Change the `box` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ResizeObserverBoxOptions`, `ResizeObserverOptions`*"] #[wasm_bindgen(method, setter = "box")] - fn set_box(this: &ResizeObserverOptions, val: ResizeObserverBoxOptions); + pub fn set_box(this: &ResizeObserverOptions, val: ResizeObserverBoxOptions); } impl ResizeObserverOptions { #[doc = "Construct a new `ResizeObserverOptions`."] @@ -30,9 +33,7 @@ impl ResizeObserverOptions { ret } #[cfg(feature = "ResizeObserverBoxOptions")] - #[doc = "Change the `box` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ResizeObserverBoxOptions`, `ResizeObserverOptions`*"] + #[deprecated = "Use `set_box()` instead."] pub fn box_(&mut self, val: ResizeObserverBoxOptions) -> &mut Self { self.set_box(val); self diff --git a/crates/web-sys/src/features/gen_ResponseInit.rs b/crates/web-sys/src/features/gen_ResponseInit.rs index 10b8f6ab41ec..0d65c079458a 100644 --- a/crates/web-sys/src/features/gen_ResponseInit.rs +++ b/crates/web-sys/src/features/gen_ResponseInit.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ResponseInit`*"] #[wasm_bindgen(method, getter = "headers")] pub fn get_headers(this: &ResponseInit) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `headers` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ResponseInit`*"] #[wasm_bindgen(method, setter = "headers")] - fn set_headers(this: &ResponseInit, val: &::wasm_bindgen::JsValue); + pub fn set_headers(this: &ResponseInit, val: &::wasm_bindgen::JsValue); #[doc = "Get the `status` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ResponseInit`*"] #[wasm_bindgen(method, getter = "status")] pub fn get_status(this: &ResponseInit) -> Option; + #[doc = "Change the `status` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ResponseInit`*"] #[wasm_bindgen(method, setter = "status")] - fn set_status(this: &ResponseInit, val: u16); + pub fn set_status(this: &ResponseInit, val: u16); #[doc = "Get the `statusText` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ResponseInit`*"] #[wasm_bindgen(method, getter = "statusText")] pub fn get_status_text(this: &ResponseInit) -> Option; + #[doc = "Change the `statusText` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ResponseInit`*"] #[wasm_bindgen(method, setter = "statusText")] - fn set_status_text(this: &ResponseInit, val: &str); + pub fn set_status_text(this: &ResponseInit, val: &str); } impl ResponseInit { #[doc = "Construct a new `ResponseInit`."] @@ -41,23 +50,17 @@ impl ResponseInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `headers` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ResponseInit`*"] + #[deprecated = "Use `set_headers()` instead."] pub fn headers(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_headers(val); self } - #[doc = "Change the `status` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ResponseInit`*"] + #[deprecated = "Use `set_status()` instead."] pub fn status(&mut self, val: u16) -> &mut Self { self.set_status(val); self } - #[doc = "Change the `statusText` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ResponseInit`*"] + #[deprecated = "Use `set_status_text()` instead."] pub fn status_text(&mut self, val: &str) -> &mut Self { self.set_status_text(val); self diff --git a/crates/web-sys/src/features/gen_RsaHashedImportParams.rs b/crates/web-sys/src/features/gen_RsaHashedImportParams.rs index d6c2dccec443..f9f3a04a3fb7 100644 --- a/crates/web-sys/src/features/gen_RsaHashedImportParams.rs +++ b/crates/web-sys/src/features/gen_RsaHashedImportParams.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RsaHashedImportParams`*"] #[wasm_bindgen(method, getter = "hash")] pub fn get_hash(this: &RsaHashedImportParams) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `hash` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RsaHashedImportParams`*"] #[wasm_bindgen(method, setter = "hash")] - fn set_hash(this: &RsaHashedImportParams, val: &::wasm_bindgen::JsValue); + pub fn set_hash(this: &RsaHashedImportParams, val: &::wasm_bindgen::JsValue); } impl RsaHashedImportParams { #[doc = "Construct a new `RsaHashedImportParams`."] @@ -28,9 +31,7 @@ impl RsaHashedImportParams { ret.hash(hash); ret } - #[doc = "Change the `hash` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RsaHashedImportParams`*"] + #[deprecated = "Use `set_hash()` instead."] pub fn hash(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_hash(val); self diff --git a/crates/web-sys/src/features/gen_RsaOaepParams.rs b/crates/web-sys/src/features/gen_RsaOaepParams.rs index c18f3c0f8403..f0ae80e6358a 100644 --- a/crates/web-sys/src/features/gen_RsaOaepParams.rs +++ b/crates/web-sys/src/features/gen_RsaOaepParams.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RsaOaepParams`*"] #[wasm_bindgen(method, getter = "name")] pub fn get_name(this: &RsaOaepParams) -> String; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RsaOaepParams`*"] #[wasm_bindgen(method, setter = "name")] - fn set_name(this: &RsaOaepParams, val: &str); + pub fn set_name(this: &RsaOaepParams, val: &str); #[doc = "Get the `label` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RsaOaepParams`*"] #[wasm_bindgen(method, getter = "label")] pub fn get_label(this: &RsaOaepParams) -> Option<::js_sys::Object>; + #[doc = "Change the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RsaOaepParams`*"] #[wasm_bindgen(method, setter = "label")] - fn set_label(this: &RsaOaepParams, val: &::js_sys::Object); + pub fn set_label(this: &RsaOaepParams, val: &::js_sys::Object); } impl RsaOaepParams { #[doc = "Construct a new `RsaOaepParams`."] @@ -35,16 +41,12 @@ impl RsaOaepParams { ret.name(name); ret } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RsaOaepParams`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { self.set_name(val); self } - #[doc = "Change the `label` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RsaOaepParams`*"] + #[deprecated = "Use `set_label()` instead."] pub fn label(&mut self, val: &::js_sys::Object) -> &mut Self { self.set_label(val); self diff --git a/crates/web-sys/src/features/gen_RsaOtherPrimesInfo.rs b/crates/web-sys/src/features/gen_RsaOtherPrimesInfo.rs index 233839845194..d31ec101bceb 100644 --- a/crates/web-sys/src/features/gen_RsaOtherPrimesInfo.rs +++ b/crates/web-sys/src/features/gen_RsaOtherPrimesInfo.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RsaOtherPrimesInfo`*"] #[wasm_bindgen(method, getter = "d")] pub fn get_d(this: &RsaOtherPrimesInfo) -> String; + #[doc = "Change the `d` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RsaOtherPrimesInfo`*"] #[wasm_bindgen(method, setter = "d")] - fn set_d(this: &RsaOtherPrimesInfo, val: &str); + pub fn set_d(this: &RsaOtherPrimesInfo, val: &str); #[doc = "Get the `r` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RsaOtherPrimesInfo`*"] #[wasm_bindgen(method, getter = "r")] pub fn get_r(this: &RsaOtherPrimesInfo) -> String; + #[doc = "Change the `r` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RsaOtherPrimesInfo`*"] #[wasm_bindgen(method, setter = "r")] - fn set_r(this: &RsaOtherPrimesInfo, val: &str); + pub fn set_r(this: &RsaOtherPrimesInfo, val: &str); #[doc = "Get the `t` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RsaOtherPrimesInfo`*"] #[wasm_bindgen(method, getter = "t")] pub fn get_t(this: &RsaOtherPrimesInfo) -> String; + #[doc = "Change the `t` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RsaOtherPrimesInfo`*"] #[wasm_bindgen(method, setter = "t")] - fn set_t(this: &RsaOtherPrimesInfo, val: &str); + pub fn set_t(this: &RsaOtherPrimesInfo, val: &str); } impl RsaOtherPrimesInfo { #[doc = "Construct a new `RsaOtherPrimesInfo`."] @@ -44,23 +53,17 @@ impl RsaOtherPrimesInfo { ret.t(t); ret } - #[doc = "Change the `d` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RsaOtherPrimesInfo`*"] + #[deprecated = "Use `set_d()` instead."] pub fn d(&mut self, val: &str) -> &mut Self { self.set_d(val); self } - #[doc = "Change the `r` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RsaOtherPrimesInfo`*"] + #[deprecated = "Use `set_r()` instead."] pub fn r(&mut self, val: &str) -> &mut Self { self.set_r(val); self } - #[doc = "Change the `t` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RsaOtherPrimesInfo`*"] + #[deprecated = "Use `set_t()` instead."] pub fn t(&mut self, val: &str) -> &mut Self { self.set_t(val); self diff --git a/crates/web-sys/src/features/gen_RsaPssParams.rs b/crates/web-sys/src/features/gen_RsaPssParams.rs index 4e9140e3adfa..1fd874102836 100644 --- a/crates/web-sys/src/features/gen_RsaPssParams.rs +++ b/crates/web-sys/src/features/gen_RsaPssParams.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RsaPssParams`*"] #[wasm_bindgen(method, getter = "name")] pub fn get_name(this: &RsaPssParams) -> String; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RsaPssParams`*"] #[wasm_bindgen(method, setter = "name")] - fn set_name(this: &RsaPssParams, val: &str); + pub fn set_name(this: &RsaPssParams, val: &str); #[doc = "Get the `saltLength` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RsaPssParams`*"] #[wasm_bindgen(method, getter = "saltLength")] pub fn get_salt_length(this: &RsaPssParams) -> u32; + #[doc = "Change the `saltLength` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RsaPssParams`*"] #[wasm_bindgen(method, setter = "saltLength")] - fn set_salt_length(this: &RsaPssParams, val: u32); + pub fn set_salt_length(this: &RsaPssParams, val: u32); } impl RsaPssParams { #[doc = "Construct a new `RsaPssParams`."] @@ -36,16 +42,12 @@ impl RsaPssParams { ret.salt_length(salt_length); ret } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RsaPssParams`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { self.set_name(val); self } - #[doc = "Change the `saltLength` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RsaPssParams`*"] + #[deprecated = "Use `set_salt_length()` instead."] pub fn salt_length(&mut self, val: u32) -> &mut Self { self.set_salt_length(val); self diff --git a/crates/web-sys/src/features/gen_RtcCertificateExpiration.rs b/crates/web-sys/src/features/gen_RtcCertificateExpiration.rs index 321b8ff55c94..e11293272df8 100644 --- a/crates/web-sys/src/features/gen_RtcCertificateExpiration.rs +++ b/crates/web-sys/src/features/gen_RtcCertificateExpiration.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RtcCertificateExpiration`*"] #[wasm_bindgen(method, getter = "expires")] pub fn get_expires(this: &RtcCertificateExpiration) -> Option; + #[doc = "Change the `expires` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcCertificateExpiration`*"] #[wasm_bindgen(method, setter = "expires")] - fn set_expires(this: &RtcCertificateExpiration, val: f64); + pub fn set_expires(this: &RtcCertificateExpiration, val: f64); } impl RtcCertificateExpiration { #[doc = "Construct a new `RtcCertificateExpiration`."] @@ -27,9 +30,7 @@ impl RtcCertificateExpiration { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `expires` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcCertificateExpiration`*"] + #[deprecated = "Use `set_expires()` instead."] pub fn expires(&mut self, val: f64) -> &mut Self { self.set_expires(val); self diff --git a/crates/web-sys/src/features/gen_RtcCodecStats.rs b/crates/web-sys/src/features/gen_RtcCodecStats.rs index 91cc054e20fd..81bcee558738 100644 --- a/crates/web-sys/src/features/gen_RtcCodecStats.rs +++ b/crates/web-sys/src/features/gen_RtcCodecStats.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] #[wasm_bindgen(method, getter = "id")] pub fn get_id(this: &RtcCodecStats) -> Option; + #[doc = "Change the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] #[wasm_bindgen(method, setter = "id")] - fn set_id(this: &RtcCodecStats, val: &str); + pub fn set_id(this: &RtcCodecStats, val: &str); #[doc = "Get the `timestamp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] #[wasm_bindgen(method, getter = "timestamp")] pub fn get_timestamp(this: &RtcCodecStats) -> Option; + #[doc = "Change the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] #[wasm_bindgen(method, setter = "timestamp")] - fn set_timestamp(this: &RtcCodecStats, val: f64); + pub fn set_timestamp(this: &RtcCodecStats, val: f64); #[cfg(feature = "RtcStatsType")] #[doc = "Get the `type` field of this object."] #[doc = ""] @@ -31,43 +37,61 @@ extern "C" { #[wasm_bindgen(method, getter = "type")] pub fn get_type(this: &RtcCodecStats) -> Option; #[cfg(feature = "RtcStatsType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`, `RtcStatsType`*"] #[wasm_bindgen(method, setter = "type")] - fn set_type(this: &RtcCodecStats, val: RtcStatsType); + pub fn set_type(this: &RtcCodecStats, val: RtcStatsType); #[doc = "Get the `channels` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] #[wasm_bindgen(method, getter = "channels")] pub fn get_channels(this: &RtcCodecStats) -> Option; + #[doc = "Change the `channels` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] #[wasm_bindgen(method, setter = "channels")] - fn set_channels(this: &RtcCodecStats, val: u32); + pub fn set_channels(this: &RtcCodecStats, val: u32); #[doc = "Get the `clockRate` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] #[wasm_bindgen(method, getter = "clockRate")] pub fn get_clock_rate(this: &RtcCodecStats) -> Option; + #[doc = "Change the `clockRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] #[wasm_bindgen(method, setter = "clockRate")] - fn set_clock_rate(this: &RtcCodecStats, val: u32); + pub fn set_clock_rate(this: &RtcCodecStats, val: u32); #[doc = "Get the `codec` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] #[wasm_bindgen(method, getter = "codec")] pub fn get_codec(this: &RtcCodecStats) -> Option; + #[doc = "Change the `codec` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] #[wasm_bindgen(method, setter = "codec")] - fn set_codec(this: &RtcCodecStats, val: &str); + pub fn set_codec(this: &RtcCodecStats, val: &str); #[doc = "Get the `parameters` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] #[wasm_bindgen(method, getter = "parameters")] pub fn get_parameters(this: &RtcCodecStats) -> Option; + #[doc = "Change the `parameters` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] #[wasm_bindgen(method, setter = "parameters")] - fn set_parameters(this: &RtcCodecStats, val: &str); + pub fn set_parameters(this: &RtcCodecStats, val: &str); #[doc = "Get the `payloadType` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] #[wasm_bindgen(method, getter = "payloadType")] pub fn get_payload_type(this: &RtcCodecStats) -> Option; + #[doc = "Change the `payloadType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] #[wasm_bindgen(method, setter = "payloadType")] - fn set_payload_type(this: &RtcCodecStats, val: u32); + pub fn set_payload_type(this: &RtcCodecStats, val: u32); } impl RtcCodecStats { #[doc = "Construct a new `RtcCodecStats`."] @@ -78,59 +102,43 @@ impl RtcCodecStats { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `id` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] + #[deprecated = "Use `set_id()` instead."] pub fn id(&mut self, val: &str) -> &mut Self { self.set_id(val); self } - #[doc = "Change the `timestamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] + #[deprecated = "Use `set_timestamp()` instead."] pub fn timestamp(&mut self, val: f64) -> &mut Self { self.set_timestamp(val); self } #[cfg(feature = "RtcStatsType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`, `RtcStatsType`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: RtcStatsType) -> &mut Self { self.set_type(val); self } - #[doc = "Change the `channels` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] + #[deprecated = "Use `set_channels()` instead."] pub fn channels(&mut self, val: u32) -> &mut Self { self.set_channels(val); self } - #[doc = "Change the `clockRate` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] + #[deprecated = "Use `set_clock_rate()` instead."] pub fn clock_rate(&mut self, val: u32) -> &mut Self { self.set_clock_rate(val); self } - #[doc = "Change the `codec` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] + #[deprecated = "Use `set_codec()` instead."] pub fn codec(&mut self, val: &str) -> &mut Self { self.set_codec(val); self } - #[doc = "Change the `parameters` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] + #[deprecated = "Use `set_parameters()` instead."] pub fn parameters(&mut self, val: &str) -> &mut Self { self.set_parameters(val); self } - #[doc = "Change the `payloadType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] + #[deprecated = "Use `set_payload_type()` instead."] pub fn payload_type(&mut self, val: u32) -> &mut Self { self.set_payload_type(val); self diff --git a/crates/web-sys/src/features/gen_RtcConfiguration.rs b/crates/web-sys/src/features/gen_RtcConfiguration.rs index 992857c11740..93343f2b14ba 100644 --- a/crates/web-sys/src/features/gen_RtcConfiguration.rs +++ b/crates/web-sys/src/features/gen_RtcConfiguration.rs @@ -17,22 +17,31 @@ extern "C" { #[wasm_bindgen(method, getter = "bundlePolicy")] pub fn get_bundle_policy(this: &RtcConfiguration) -> Option; #[cfg(feature = "RtcBundlePolicy")] + #[doc = "Change the `bundlePolicy` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcBundlePolicy`, `RtcConfiguration`*"] #[wasm_bindgen(method, setter = "bundlePolicy")] - fn set_bundle_policy(this: &RtcConfiguration, val: RtcBundlePolicy); + pub fn set_bundle_policy(this: &RtcConfiguration, val: RtcBundlePolicy); #[doc = "Get the `certificates` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcConfiguration`*"] #[wasm_bindgen(method, getter = "certificates")] pub fn get_certificates(this: &RtcConfiguration) -> Option<::js_sys::Array>; + #[doc = "Change the `certificates` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcConfiguration`*"] #[wasm_bindgen(method, setter = "certificates")] - fn set_certificates(this: &RtcConfiguration, val: &::wasm_bindgen::JsValue); + pub fn set_certificates(this: &RtcConfiguration, val: &::wasm_bindgen::JsValue); #[doc = "Get the `iceServers` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcConfiguration`*"] #[wasm_bindgen(method, getter = "iceServers")] pub fn get_ice_servers(this: &RtcConfiguration) -> Option<::js_sys::Array>; + #[doc = "Change the `iceServers` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcConfiguration`*"] #[wasm_bindgen(method, setter = "iceServers")] - fn set_ice_servers(this: &RtcConfiguration, val: &::wasm_bindgen::JsValue); + pub fn set_ice_servers(this: &RtcConfiguration, val: &::wasm_bindgen::JsValue); #[cfg(feature = "RtcIceTransportPolicy")] #[doc = "Get the `iceTransportPolicy` field of this object."] #[doc = ""] @@ -40,15 +49,21 @@ extern "C" { #[wasm_bindgen(method, getter = "iceTransportPolicy")] pub fn get_ice_transport_policy(this: &RtcConfiguration) -> Option; #[cfg(feature = "RtcIceTransportPolicy")] + #[doc = "Change the `iceTransportPolicy` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcConfiguration`, `RtcIceTransportPolicy`*"] #[wasm_bindgen(method, setter = "iceTransportPolicy")] - fn set_ice_transport_policy(this: &RtcConfiguration, val: RtcIceTransportPolicy); + pub fn set_ice_transport_policy(this: &RtcConfiguration, val: RtcIceTransportPolicy); #[doc = "Get the `peerIdentity` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcConfiguration`*"] #[wasm_bindgen(method, getter = "peerIdentity")] pub fn get_peer_identity(this: &RtcConfiguration) -> Option; + #[doc = "Change the `peerIdentity` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcConfiguration`*"] #[wasm_bindgen(method, setter = "peerIdentity")] - fn set_peer_identity(this: &RtcConfiguration, val: Option<&str>); + pub fn set_peer_identity(this: &RtcConfiguration, val: Option<&str>); } impl RtcConfiguration { #[doc = "Construct a new `RtcConfiguration`."] @@ -60,38 +75,28 @@ impl RtcConfiguration { ret } #[cfg(feature = "RtcBundlePolicy")] - #[doc = "Change the `bundlePolicy` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcBundlePolicy`, `RtcConfiguration`*"] + #[deprecated = "Use `set_bundle_policy()` instead."] pub fn bundle_policy(&mut self, val: RtcBundlePolicy) -> &mut Self { self.set_bundle_policy(val); self } - #[doc = "Change the `certificates` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcConfiguration`*"] + #[deprecated = "Use `set_certificates()` instead."] pub fn certificates(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_certificates(val); self } - #[doc = "Change the `iceServers` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcConfiguration`*"] + #[deprecated = "Use `set_ice_servers()` instead."] pub fn ice_servers(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_ice_servers(val); self } #[cfg(feature = "RtcIceTransportPolicy")] - #[doc = "Change the `iceTransportPolicy` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcConfiguration`, `RtcIceTransportPolicy`*"] + #[deprecated = "Use `set_ice_transport_policy()` instead."] pub fn ice_transport_policy(&mut self, val: RtcIceTransportPolicy) -> &mut Self { self.set_ice_transport_policy(val); self } - #[doc = "Change the `peerIdentity` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcConfiguration`*"] + #[deprecated = "Use `set_peer_identity()` instead."] pub fn peer_identity(&mut self, val: Option<&str>) -> &mut Self { self.set_peer_identity(val); self diff --git a/crates/web-sys/src/features/gen_RtcDataChannelEventInit.rs b/crates/web-sys/src/features/gen_RtcDataChannelEventInit.rs index 839b6a4fc560..9f798bbc70e1 100644 --- a/crates/web-sys/src/features/gen_RtcDataChannelEventInit.rs +++ b/crates/web-sys/src/features/gen_RtcDataChannelEventInit.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &RtcDataChannelEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &RtcDataChannelEventInit, val: bool); + pub fn set_bubbles(this: &RtcDataChannelEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &RtcDataChannelEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &RtcDataChannelEventInit, val: bool); + pub fn set_cancelable(this: &RtcDataChannelEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &RtcDataChannelEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &RtcDataChannelEventInit, val: bool); + pub fn set_composed(this: &RtcDataChannelEventInit, val: bool); #[cfg(feature = "RtcDataChannel")] #[doc = "Get the `channel` field of this object."] #[doc = ""] @@ -38,8 +47,11 @@ extern "C" { #[wasm_bindgen(method, getter = "channel")] pub fn get_channel(this: &RtcDataChannelEventInit) -> RtcDataChannel; #[cfg(feature = "RtcDataChannel")] + #[doc = "Change the `channel` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcDataChannel`, `RtcDataChannelEventInit`*"] #[wasm_bindgen(method, setter = "channel")] - fn set_channel(this: &RtcDataChannelEventInit, val: &RtcDataChannel); + pub fn set_channel(this: &RtcDataChannelEventInit, val: &RtcDataChannel); } impl RtcDataChannelEventInit { #[cfg(feature = "RtcDataChannel")] @@ -52,31 +64,23 @@ impl RtcDataChannelEventInit { ret.channel(channel); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } #[cfg(feature = "RtcDataChannel")] - #[doc = "Change the `channel` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcDataChannel`, `RtcDataChannelEventInit`*"] + #[deprecated = "Use `set_channel()` instead."] pub fn channel(&mut self, val: &RtcDataChannel) -> &mut Self { self.set_channel(val); self diff --git a/crates/web-sys/src/features/gen_RtcDataChannelInit.rs b/crates/web-sys/src/features/gen_RtcDataChannelInit.rs index 5fc6203b0bdc..1e3a9331a66b 100644 --- a/crates/web-sys/src/features/gen_RtcDataChannelInit.rs +++ b/crates/web-sys/src/features/gen_RtcDataChannelInit.rs @@ -15,50 +15,71 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] #[wasm_bindgen(method, getter = "id")] pub fn get_id(this: &RtcDataChannelInit) -> Option; + #[doc = "Change the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] #[wasm_bindgen(method, setter = "id")] - fn set_id(this: &RtcDataChannelInit, val: u16); + pub fn set_id(this: &RtcDataChannelInit, val: u16); #[doc = "Get the `maxPacketLifeTime` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] #[wasm_bindgen(method, getter = "maxPacketLifeTime")] pub fn get_max_packet_life_time(this: &RtcDataChannelInit) -> Option; + #[doc = "Change the `maxPacketLifeTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] #[wasm_bindgen(method, setter = "maxPacketLifeTime")] - fn set_max_packet_life_time(this: &RtcDataChannelInit, val: u16); + pub fn set_max_packet_life_time(this: &RtcDataChannelInit, val: u16); #[doc = "Get the `maxRetransmitTime` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] #[wasm_bindgen(method, getter = "maxRetransmitTime")] pub fn get_max_retransmit_time(this: &RtcDataChannelInit) -> Option; + #[doc = "Change the `maxRetransmitTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] #[wasm_bindgen(method, setter = "maxRetransmitTime")] - fn set_max_retransmit_time(this: &RtcDataChannelInit, val: u16); + pub fn set_max_retransmit_time(this: &RtcDataChannelInit, val: u16); #[doc = "Get the `maxRetransmits` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] #[wasm_bindgen(method, getter = "maxRetransmits")] pub fn get_max_retransmits(this: &RtcDataChannelInit) -> Option; + #[doc = "Change the `maxRetransmits` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] #[wasm_bindgen(method, setter = "maxRetransmits")] - fn set_max_retransmits(this: &RtcDataChannelInit, val: u16); + pub fn set_max_retransmits(this: &RtcDataChannelInit, val: u16); #[doc = "Get the `negotiated` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] #[wasm_bindgen(method, getter = "negotiated")] pub fn get_negotiated(this: &RtcDataChannelInit) -> Option; + #[doc = "Change the `negotiated` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] #[wasm_bindgen(method, setter = "negotiated")] - fn set_negotiated(this: &RtcDataChannelInit, val: bool); + pub fn set_negotiated(this: &RtcDataChannelInit, val: bool); #[doc = "Get the `ordered` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] #[wasm_bindgen(method, getter = "ordered")] pub fn get_ordered(this: &RtcDataChannelInit) -> Option; + #[doc = "Change the `ordered` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] #[wasm_bindgen(method, setter = "ordered")] - fn set_ordered(this: &RtcDataChannelInit, val: bool); + pub fn set_ordered(this: &RtcDataChannelInit, val: bool); #[doc = "Get the `protocol` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] #[wasm_bindgen(method, getter = "protocol")] pub fn get_protocol(this: &RtcDataChannelInit) -> Option; + #[doc = "Change the `protocol` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] #[wasm_bindgen(method, setter = "protocol")] - fn set_protocol(this: &RtcDataChannelInit, val: &str); + pub fn set_protocol(this: &RtcDataChannelInit, val: &str); } impl RtcDataChannelInit { #[doc = "Construct a new `RtcDataChannelInit`."] @@ -69,51 +90,37 @@ impl RtcDataChannelInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `id` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] + #[deprecated = "Use `set_id()` instead."] pub fn id(&mut self, val: u16) -> &mut Self { self.set_id(val); self } - #[doc = "Change the `maxPacketLifeTime` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] + #[deprecated = "Use `set_max_packet_life_time()` instead."] pub fn max_packet_life_time(&mut self, val: u16) -> &mut Self { self.set_max_packet_life_time(val); self } - #[doc = "Change the `maxRetransmitTime` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] + #[deprecated = "Use `set_max_retransmit_time()` instead."] pub fn max_retransmit_time(&mut self, val: u16) -> &mut Self { self.set_max_retransmit_time(val); self } - #[doc = "Change the `maxRetransmits` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] + #[deprecated = "Use `set_max_retransmits()` instead."] pub fn max_retransmits(&mut self, val: u16) -> &mut Self { self.set_max_retransmits(val); self } - #[doc = "Change the `negotiated` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] + #[deprecated = "Use `set_negotiated()` instead."] pub fn negotiated(&mut self, val: bool) -> &mut Self { self.set_negotiated(val); self } - #[doc = "Change the `ordered` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] + #[deprecated = "Use `set_ordered()` instead."] pub fn ordered(&mut self, val: bool) -> &mut Self { self.set_ordered(val); self } - #[doc = "Change the `protocol` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] + #[deprecated = "Use `set_protocol()` instead."] pub fn protocol(&mut self, val: &str) -> &mut Self { self.set_protocol(val); self diff --git a/crates/web-sys/src/features/gen_RtcFecParameters.rs b/crates/web-sys/src/features/gen_RtcFecParameters.rs index a4d876888cd4..b72b25c9095f 100644 --- a/crates/web-sys/src/features/gen_RtcFecParameters.rs +++ b/crates/web-sys/src/features/gen_RtcFecParameters.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RtcFecParameters`*"] #[wasm_bindgen(method, getter = "ssrc")] pub fn get_ssrc(this: &RtcFecParameters) -> Option; + #[doc = "Change the `ssrc` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcFecParameters`*"] #[wasm_bindgen(method, setter = "ssrc")] - fn set_ssrc(this: &RtcFecParameters, val: u32); + pub fn set_ssrc(this: &RtcFecParameters, val: u32); } impl RtcFecParameters { #[doc = "Construct a new `RtcFecParameters`."] @@ -27,9 +30,7 @@ impl RtcFecParameters { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `ssrc` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcFecParameters`*"] + #[deprecated = "Use `set_ssrc()` instead."] pub fn ssrc(&mut self, val: u32) -> &mut Self { self.set_ssrc(val); self diff --git a/crates/web-sys/src/features/gen_RtcIceCandidateInit.rs b/crates/web-sys/src/features/gen_RtcIceCandidateInit.rs index e8dbc196220f..9268c3908da2 100644 --- a/crates/web-sys/src/features/gen_RtcIceCandidateInit.rs +++ b/crates/web-sys/src/features/gen_RtcIceCandidateInit.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateInit`*"] #[wasm_bindgen(method, getter = "candidate")] pub fn get_candidate(this: &RtcIceCandidateInit) -> String; + #[doc = "Change the `candidate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateInit`*"] #[wasm_bindgen(method, setter = "candidate")] - fn set_candidate(this: &RtcIceCandidateInit, val: &str); + pub fn set_candidate(this: &RtcIceCandidateInit, val: &str); #[doc = "Get the `sdpMLineIndex` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateInit`*"] #[wasm_bindgen(method, getter = "sdpMLineIndex")] pub fn get_sdp_m_line_index(this: &RtcIceCandidateInit) -> Option; + #[doc = "Change the `sdpMLineIndex` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateInit`*"] #[wasm_bindgen(method, setter = "sdpMLineIndex")] - fn set_sdp_m_line_index(this: &RtcIceCandidateInit, val: Option); + pub fn set_sdp_m_line_index(this: &RtcIceCandidateInit, val: Option); #[doc = "Get the `sdpMid` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateInit`*"] #[wasm_bindgen(method, getter = "sdpMid")] pub fn get_sdp_mid(this: &RtcIceCandidateInit) -> Option; + #[doc = "Change the `sdpMid` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateInit`*"] #[wasm_bindgen(method, setter = "sdpMid")] - fn set_sdp_mid(this: &RtcIceCandidateInit, val: Option<&str>); + pub fn set_sdp_mid(this: &RtcIceCandidateInit, val: Option<&str>); } impl RtcIceCandidateInit { #[doc = "Construct a new `RtcIceCandidateInit`."] @@ -42,23 +51,17 @@ impl RtcIceCandidateInit { ret.candidate(candidate); ret } - #[doc = "Change the `candidate` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateInit`*"] + #[deprecated = "Use `set_candidate()` instead."] pub fn candidate(&mut self, val: &str) -> &mut Self { self.set_candidate(val); self } - #[doc = "Change the `sdpMLineIndex` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateInit`*"] + #[deprecated = "Use `set_sdp_m_line_index()` instead."] pub fn sdp_m_line_index(&mut self, val: Option) -> &mut Self { self.set_sdp_m_line_index(val); self } - #[doc = "Change the `sdpMid` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateInit`*"] + #[deprecated = "Use `set_sdp_mid()` instead."] pub fn sdp_mid(&mut self, val: Option<&str>) -> &mut Self { self.set_sdp_mid(val); self diff --git a/crates/web-sys/src/features/gen_RtcIceCandidatePairStats.rs b/crates/web-sys/src/features/gen_RtcIceCandidatePairStats.rs index fa16b4c19364..0ea8f977a5ea 100644 --- a/crates/web-sys/src/features/gen_RtcIceCandidatePairStats.rs +++ b/crates/web-sys/src/features/gen_RtcIceCandidatePairStats.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] #[wasm_bindgen(method, getter = "id")] pub fn get_id(this: &RtcIceCandidatePairStats) -> Option; + #[doc = "Change the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] #[wasm_bindgen(method, setter = "id")] - fn set_id(this: &RtcIceCandidatePairStats, val: &str); + pub fn set_id(this: &RtcIceCandidatePairStats, val: &str); #[doc = "Get the `timestamp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] #[wasm_bindgen(method, getter = "timestamp")] pub fn get_timestamp(this: &RtcIceCandidatePairStats) -> Option; + #[doc = "Change the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] #[wasm_bindgen(method, setter = "timestamp")] - fn set_timestamp(this: &RtcIceCandidatePairStats, val: f64); + pub fn set_timestamp(this: &RtcIceCandidatePairStats, val: f64); #[cfg(feature = "RtcStatsType")] #[doc = "Get the `type` field of this object."] #[doc = ""] @@ -31,85 +37,121 @@ extern "C" { #[wasm_bindgen(method, getter = "type")] pub fn get_type(this: &RtcIceCandidatePairStats) -> Option; #[cfg(feature = "RtcStatsType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`, `RtcStatsType`*"] #[wasm_bindgen(method, setter = "type")] - fn set_type(this: &RtcIceCandidatePairStats, val: RtcStatsType); + pub fn set_type(this: &RtcIceCandidatePairStats, val: RtcStatsType); #[doc = "Get the `bytesReceived` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] #[wasm_bindgen(method, getter = "bytesReceived")] pub fn get_bytes_received(this: &RtcIceCandidatePairStats) -> Option; + #[doc = "Change the `bytesReceived` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] #[wasm_bindgen(method, setter = "bytesReceived")] - fn set_bytes_received(this: &RtcIceCandidatePairStats, val: f64); + pub fn set_bytes_received(this: &RtcIceCandidatePairStats, val: f64); #[doc = "Get the `bytesSent` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] #[wasm_bindgen(method, getter = "bytesSent")] pub fn get_bytes_sent(this: &RtcIceCandidatePairStats) -> Option; + #[doc = "Change the `bytesSent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] #[wasm_bindgen(method, setter = "bytesSent")] - fn set_bytes_sent(this: &RtcIceCandidatePairStats, val: f64); + pub fn set_bytes_sent(this: &RtcIceCandidatePairStats, val: f64); #[doc = "Get the `componentId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] #[wasm_bindgen(method, getter = "componentId")] pub fn get_component_id(this: &RtcIceCandidatePairStats) -> Option; + #[doc = "Change the `componentId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] #[wasm_bindgen(method, setter = "componentId")] - fn set_component_id(this: &RtcIceCandidatePairStats, val: u32); + pub fn set_component_id(this: &RtcIceCandidatePairStats, val: u32); #[doc = "Get the `lastPacketReceivedTimestamp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] #[wasm_bindgen(method, getter = "lastPacketReceivedTimestamp")] pub fn get_last_packet_received_timestamp(this: &RtcIceCandidatePairStats) -> Option; + #[doc = "Change the `lastPacketReceivedTimestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] #[wasm_bindgen(method, setter = "lastPacketReceivedTimestamp")] - fn set_last_packet_received_timestamp(this: &RtcIceCandidatePairStats, val: f64); + pub fn set_last_packet_received_timestamp(this: &RtcIceCandidatePairStats, val: f64); #[doc = "Get the `lastPacketSentTimestamp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] #[wasm_bindgen(method, getter = "lastPacketSentTimestamp")] pub fn get_last_packet_sent_timestamp(this: &RtcIceCandidatePairStats) -> Option; + #[doc = "Change the `lastPacketSentTimestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] #[wasm_bindgen(method, setter = "lastPacketSentTimestamp")] - fn set_last_packet_sent_timestamp(this: &RtcIceCandidatePairStats, val: f64); + pub fn set_last_packet_sent_timestamp(this: &RtcIceCandidatePairStats, val: f64); #[doc = "Get the `localCandidateId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] #[wasm_bindgen(method, getter = "localCandidateId")] pub fn get_local_candidate_id(this: &RtcIceCandidatePairStats) -> Option; + #[doc = "Change the `localCandidateId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] #[wasm_bindgen(method, setter = "localCandidateId")] - fn set_local_candidate_id(this: &RtcIceCandidatePairStats, val: &str); + pub fn set_local_candidate_id(this: &RtcIceCandidatePairStats, val: &str); #[doc = "Get the `nominated` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] #[wasm_bindgen(method, getter = "nominated")] pub fn get_nominated(this: &RtcIceCandidatePairStats) -> Option; + #[doc = "Change the `nominated` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] #[wasm_bindgen(method, setter = "nominated")] - fn set_nominated(this: &RtcIceCandidatePairStats, val: bool); + pub fn set_nominated(this: &RtcIceCandidatePairStats, val: bool); #[doc = "Get the `priority` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] #[wasm_bindgen(method, getter = "priority")] pub fn get_priority(this: &RtcIceCandidatePairStats) -> Option; + #[doc = "Change the `priority` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] #[wasm_bindgen(method, setter = "priority")] - fn set_priority(this: &RtcIceCandidatePairStats, val: f64); + pub fn set_priority(this: &RtcIceCandidatePairStats, val: f64); #[doc = "Get the `readable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] #[wasm_bindgen(method, getter = "readable")] pub fn get_readable(this: &RtcIceCandidatePairStats) -> Option; + #[doc = "Change the `readable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] #[wasm_bindgen(method, setter = "readable")] - fn set_readable(this: &RtcIceCandidatePairStats, val: bool); + pub fn set_readable(this: &RtcIceCandidatePairStats, val: bool); #[doc = "Get the `remoteCandidateId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] #[wasm_bindgen(method, getter = "remoteCandidateId")] pub fn get_remote_candidate_id(this: &RtcIceCandidatePairStats) -> Option; + #[doc = "Change the `remoteCandidateId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] #[wasm_bindgen(method, setter = "remoteCandidateId")] - fn set_remote_candidate_id(this: &RtcIceCandidatePairStats, val: &str); + pub fn set_remote_candidate_id(this: &RtcIceCandidatePairStats, val: &str); #[doc = "Get the `selected` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] #[wasm_bindgen(method, getter = "selected")] pub fn get_selected(this: &RtcIceCandidatePairStats) -> Option; + #[doc = "Change the `selected` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] #[wasm_bindgen(method, setter = "selected")] - fn set_selected(this: &RtcIceCandidatePairStats, val: bool); + pub fn set_selected(this: &RtcIceCandidatePairStats, val: bool); #[cfg(feature = "RtcStatsIceCandidatePairState")] #[doc = "Get the `state` field of this object."] #[doc = ""] @@ -117,22 +159,31 @@ extern "C" { #[wasm_bindgen(method, getter = "state")] pub fn get_state(this: &RtcIceCandidatePairStats) -> Option; #[cfg(feature = "RtcStatsIceCandidatePairState")] + #[doc = "Change the `state` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`, `RtcStatsIceCandidatePairState`*"] #[wasm_bindgen(method, setter = "state")] - fn set_state(this: &RtcIceCandidatePairStats, val: RtcStatsIceCandidatePairState); + pub fn set_state(this: &RtcIceCandidatePairStats, val: RtcStatsIceCandidatePairState); #[doc = "Get the `transportId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] #[wasm_bindgen(method, getter = "transportId")] pub fn get_transport_id(this: &RtcIceCandidatePairStats) -> Option; + #[doc = "Change the `transportId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] #[wasm_bindgen(method, setter = "transportId")] - fn set_transport_id(this: &RtcIceCandidatePairStats, val: &str); + pub fn set_transport_id(this: &RtcIceCandidatePairStats, val: &str); #[doc = "Get the `writable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] #[wasm_bindgen(method, getter = "writable")] pub fn get_writable(this: &RtcIceCandidatePairStats) -> Option; + #[doc = "Change the `writable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] #[wasm_bindgen(method, setter = "writable")] - fn set_writable(this: &RtcIceCandidatePairStats, val: bool); + pub fn set_writable(this: &RtcIceCandidatePairStats, val: bool); } impl RtcIceCandidatePairStats { #[doc = "Construct a new `RtcIceCandidatePairStats`."] @@ -143,123 +194,89 @@ impl RtcIceCandidatePairStats { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `id` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + #[deprecated = "Use `set_id()` instead."] pub fn id(&mut self, val: &str) -> &mut Self { self.set_id(val); self } - #[doc = "Change the `timestamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + #[deprecated = "Use `set_timestamp()` instead."] pub fn timestamp(&mut self, val: f64) -> &mut Self { self.set_timestamp(val); self } #[cfg(feature = "RtcStatsType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`, `RtcStatsType`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: RtcStatsType) -> &mut Self { self.set_type(val); self } - #[doc = "Change the `bytesReceived` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + #[deprecated = "Use `set_bytes_received()` instead."] pub fn bytes_received(&mut self, val: f64) -> &mut Self { self.set_bytes_received(val); self } - #[doc = "Change the `bytesSent` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + #[deprecated = "Use `set_bytes_sent()` instead."] pub fn bytes_sent(&mut self, val: f64) -> &mut Self { self.set_bytes_sent(val); self } - #[doc = "Change the `componentId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + #[deprecated = "Use `set_component_id()` instead."] pub fn component_id(&mut self, val: u32) -> &mut Self { self.set_component_id(val); self } - #[doc = "Change the `lastPacketReceivedTimestamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + #[deprecated = "Use `set_last_packet_received_timestamp()` instead."] pub fn last_packet_received_timestamp(&mut self, val: f64) -> &mut Self { self.set_last_packet_received_timestamp(val); self } - #[doc = "Change the `lastPacketSentTimestamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + #[deprecated = "Use `set_last_packet_sent_timestamp()` instead."] pub fn last_packet_sent_timestamp(&mut self, val: f64) -> &mut Self { self.set_last_packet_sent_timestamp(val); self } - #[doc = "Change the `localCandidateId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + #[deprecated = "Use `set_local_candidate_id()` instead."] pub fn local_candidate_id(&mut self, val: &str) -> &mut Self { self.set_local_candidate_id(val); self } - #[doc = "Change the `nominated` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + #[deprecated = "Use `set_nominated()` instead."] pub fn nominated(&mut self, val: bool) -> &mut Self { self.set_nominated(val); self } - #[doc = "Change the `priority` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + #[deprecated = "Use `set_priority()` instead."] pub fn priority(&mut self, val: f64) -> &mut Self { self.set_priority(val); self } - #[doc = "Change the `readable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + #[deprecated = "Use `set_readable()` instead."] pub fn readable(&mut self, val: bool) -> &mut Self { self.set_readable(val); self } - #[doc = "Change the `remoteCandidateId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + #[deprecated = "Use `set_remote_candidate_id()` instead."] pub fn remote_candidate_id(&mut self, val: &str) -> &mut Self { self.set_remote_candidate_id(val); self } - #[doc = "Change the `selected` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + #[deprecated = "Use `set_selected()` instead."] pub fn selected(&mut self, val: bool) -> &mut Self { self.set_selected(val); self } #[cfg(feature = "RtcStatsIceCandidatePairState")] - #[doc = "Change the `state` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`, `RtcStatsIceCandidatePairState`*"] + #[deprecated = "Use `set_state()` instead."] pub fn state(&mut self, val: RtcStatsIceCandidatePairState) -> &mut Self { self.set_state(val); self } - #[doc = "Change the `transportId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + #[deprecated = "Use `set_transport_id()` instead."] pub fn transport_id(&mut self, val: &str) -> &mut Self { self.set_transport_id(val); self } - #[doc = "Change the `writable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + #[deprecated = "Use `set_writable()` instead."] pub fn writable(&mut self, val: bool) -> &mut Self { self.set_writable(val); self diff --git a/crates/web-sys/src/features/gen_RtcIceCandidateStats.rs b/crates/web-sys/src/features/gen_RtcIceCandidateStats.rs index 654e773a1110..6ea9e9880b22 100644 --- a/crates/web-sys/src/features/gen_RtcIceCandidateStats.rs +++ b/crates/web-sys/src/features/gen_RtcIceCandidateStats.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] #[wasm_bindgen(method, getter = "id")] pub fn get_id(this: &RtcIceCandidateStats) -> Option; + #[doc = "Change the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] #[wasm_bindgen(method, setter = "id")] - fn set_id(this: &RtcIceCandidateStats, val: &str); + pub fn set_id(this: &RtcIceCandidateStats, val: &str); #[doc = "Get the `timestamp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] #[wasm_bindgen(method, getter = "timestamp")] pub fn get_timestamp(this: &RtcIceCandidateStats) -> Option; + #[doc = "Change the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] #[wasm_bindgen(method, setter = "timestamp")] - fn set_timestamp(this: &RtcIceCandidateStats, val: f64); + pub fn set_timestamp(this: &RtcIceCandidateStats, val: f64); #[cfg(feature = "RtcStatsType")] #[doc = "Get the `type` field of this object."] #[doc = ""] @@ -31,15 +37,21 @@ extern "C" { #[wasm_bindgen(method, getter = "type")] pub fn get_type(this: &RtcIceCandidateStats) -> Option; #[cfg(feature = "RtcStatsType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`, `RtcStatsType`*"] #[wasm_bindgen(method, setter = "type")] - fn set_type(this: &RtcIceCandidateStats, val: RtcStatsType); + pub fn set_type(this: &RtcIceCandidateStats, val: RtcStatsType); #[doc = "Get the `candidateId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] #[wasm_bindgen(method, getter = "candidateId")] pub fn get_candidate_id(this: &RtcIceCandidateStats) -> Option; + #[doc = "Change the `candidateId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] #[wasm_bindgen(method, setter = "candidateId")] - fn set_candidate_id(this: &RtcIceCandidateStats, val: &str); + pub fn set_candidate_id(this: &RtcIceCandidateStats, val: &str); #[cfg(feature = "RtcStatsIceCandidateType")] #[doc = "Get the `candidateType` field of this object."] #[doc = ""] @@ -47,36 +59,51 @@ extern "C" { #[wasm_bindgen(method, getter = "candidateType")] pub fn get_candidate_type(this: &RtcIceCandidateStats) -> Option; #[cfg(feature = "RtcStatsIceCandidateType")] + #[doc = "Change the `candidateType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`, `RtcStatsIceCandidateType`*"] #[wasm_bindgen(method, setter = "candidateType")] - fn set_candidate_type(this: &RtcIceCandidateStats, val: RtcStatsIceCandidateType); + pub fn set_candidate_type(this: &RtcIceCandidateStats, val: RtcStatsIceCandidateType); #[doc = "Get the `componentId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] #[wasm_bindgen(method, getter = "componentId")] pub fn get_component_id(this: &RtcIceCandidateStats) -> Option; + #[doc = "Change the `componentId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] #[wasm_bindgen(method, setter = "componentId")] - fn set_component_id(this: &RtcIceCandidateStats, val: &str); + pub fn set_component_id(this: &RtcIceCandidateStats, val: &str); #[doc = "Get the `ipAddress` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] #[wasm_bindgen(method, getter = "ipAddress")] pub fn get_ip_address(this: &RtcIceCandidateStats) -> Option; + #[doc = "Change the `ipAddress` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] #[wasm_bindgen(method, setter = "ipAddress")] - fn set_ip_address(this: &RtcIceCandidateStats, val: &str); + pub fn set_ip_address(this: &RtcIceCandidateStats, val: &str); #[doc = "Get the `portNumber` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] #[wasm_bindgen(method, getter = "portNumber")] pub fn get_port_number(this: &RtcIceCandidateStats) -> Option; + #[doc = "Change the `portNumber` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] #[wasm_bindgen(method, setter = "portNumber")] - fn set_port_number(this: &RtcIceCandidateStats, val: i32); + pub fn set_port_number(this: &RtcIceCandidateStats, val: i32); #[doc = "Get the `transport` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] #[wasm_bindgen(method, getter = "transport")] pub fn get_transport(this: &RtcIceCandidateStats) -> Option; + #[doc = "Change the `transport` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] #[wasm_bindgen(method, setter = "transport")] - fn set_transport(this: &RtcIceCandidateStats, val: &str); + pub fn set_transport(this: &RtcIceCandidateStats, val: &str); } impl RtcIceCandidateStats { #[doc = "Construct a new `RtcIceCandidateStats`."] @@ -87,67 +114,49 @@ impl RtcIceCandidateStats { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `id` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] + #[deprecated = "Use `set_id()` instead."] pub fn id(&mut self, val: &str) -> &mut Self { self.set_id(val); self } - #[doc = "Change the `timestamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] + #[deprecated = "Use `set_timestamp()` instead."] pub fn timestamp(&mut self, val: f64) -> &mut Self { self.set_timestamp(val); self } #[cfg(feature = "RtcStatsType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`, `RtcStatsType`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: RtcStatsType) -> &mut Self { self.set_type(val); self } - #[doc = "Change the `candidateId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] + #[deprecated = "Use `set_candidate_id()` instead."] pub fn candidate_id(&mut self, val: &str) -> &mut Self { self.set_candidate_id(val); self } #[cfg(feature = "RtcStatsIceCandidateType")] - #[doc = "Change the `candidateType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`, `RtcStatsIceCandidateType`*"] + #[deprecated = "Use `set_candidate_type()` instead."] pub fn candidate_type(&mut self, val: RtcStatsIceCandidateType) -> &mut Self { self.set_candidate_type(val); self } - #[doc = "Change the `componentId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] + #[deprecated = "Use `set_component_id()` instead."] pub fn component_id(&mut self, val: &str) -> &mut Self { self.set_component_id(val); self } - #[doc = "Change the `ipAddress` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] + #[deprecated = "Use `set_ip_address()` instead."] pub fn ip_address(&mut self, val: &str) -> &mut Self { self.set_ip_address(val); self } - #[doc = "Change the `portNumber` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] + #[deprecated = "Use `set_port_number()` instead."] pub fn port_number(&mut self, val: i32) -> &mut Self { self.set_port_number(val); self } - #[doc = "Change the `transport` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] + #[deprecated = "Use `set_transport()` instead."] pub fn transport(&mut self, val: &str) -> &mut Self { self.set_transport(val); self diff --git a/crates/web-sys/src/features/gen_RtcIceComponentStats.rs b/crates/web-sys/src/features/gen_RtcIceComponentStats.rs index b47ad3bbc61a..ffdf6a5ec074 100644 --- a/crates/web-sys/src/features/gen_RtcIceComponentStats.rs +++ b/crates/web-sys/src/features/gen_RtcIceComponentStats.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] #[wasm_bindgen(method, getter = "id")] pub fn get_id(this: &RtcIceComponentStats) -> Option; + #[doc = "Change the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] #[wasm_bindgen(method, setter = "id")] - fn set_id(this: &RtcIceComponentStats, val: &str); + pub fn set_id(this: &RtcIceComponentStats, val: &str); #[doc = "Get the `timestamp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] #[wasm_bindgen(method, getter = "timestamp")] pub fn get_timestamp(this: &RtcIceComponentStats) -> Option; + #[doc = "Change the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] #[wasm_bindgen(method, setter = "timestamp")] - fn set_timestamp(this: &RtcIceComponentStats, val: f64); + pub fn set_timestamp(this: &RtcIceComponentStats, val: f64); #[cfg(feature = "RtcStatsType")] #[doc = "Get the `type` field of this object."] #[doc = ""] @@ -31,43 +37,61 @@ extern "C" { #[wasm_bindgen(method, getter = "type")] pub fn get_type(this: &RtcIceComponentStats) -> Option; #[cfg(feature = "RtcStatsType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`, `RtcStatsType`*"] #[wasm_bindgen(method, setter = "type")] - fn set_type(this: &RtcIceComponentStats, val: RtcStatsType); + pub fn set_type(this: &RtcIceComponentStats, val: RtcStatsType); #[doc = "Get the `activeConnection` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] #[wasm_bindgen(method, getter = "activeConnection")] pub fn get_active_connection(this: &RtcIceComponentStats) -> Option; + #[doc = "Change the `activeConnection` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] #[wasm_bindgen(method, setter = "activeConnection")] - fn set_active_connection(this: &RtcIceComponentStats, val: bool); + pub fn set_active_connection(this: &RtcIceComponentStats, val: bool); #[doc = "Get the `bytesReceived` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] #[wasm_bindgen(method, getter = "bytesReceived")] pub fn get_bytes_received(this: &RtcIceComponentStats) -> Option; + #[doc = "Change the `bytesReceived` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] #[wasm_bindgen(method, setter = "bytesReceived")] - fn set_bytes_received(this: &RtcIceComponentStats, val: u32); + pub fn set_bytes_received(this: &RtcIceComponentStats, val: u32); #[doc = "Get the `bytesSent` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] #[wasm_bindgen(method, getter = "bytesSent")] pub fn get_bytes_sent(this: &RtcIceComponentStats) -> Option; + #[doc = "Change the `bytesSent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] #[wasm_bindgen(method, setter = "bytesSent")] - fn set_bytes_sent(this: &RtcIceComponentStats, val: u32); + pub fn set_bytes_sent(this: &RtcIceComponentStats, val: u32); #[doc = "Get the `component` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] #[wasm_bindgen(method, getter = "component")] pub fn get_component(this: &RtcIceComponentStats) -> Option; + #[doc = "Change the `component` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] #[wasm_bindgen(method, setter = "component")] - fn set_component(this: &RtcIceComponentStats, val: i32); + pub fn set_component(this: &RtcIceComponentStats, val: i32); #[doc = "Get the `transportId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] #[wasm_bindgen(method, getter = "transportId")] pub fn get_transport_id(this: &RtcIceComponentStats) -> Option; + #[doc = "Change the `transportId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] #[wasm_bindgen(method, setter = "transportId")] - fn set_transport_id(this: &RtcIceComponentStats, val: &str); + pub fn set_transport_id(this: &RtcIceComponentStats, val: &str); } impl RtcIceComponentStats { #[doc = "Construct a new `RtcIceComponentStats`."] @@ -78,59 +102,43 @@ impl RtcIceComponentStats { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `id` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] + #[deprecated = "Use `set_id()` instead."] pub fn id(&mut self, val: &str) -> &mut Self { self.set_id(val); self } - #[doc = "Change the `timestamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] + #[deprecated = "Use `set_timestamp()` instead."] pub fn timestamp(&mut self, val: f64) -> &mut Self { self.set_timestamp(val); self } #[cfg(feature = "RtcStatsType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`, `RtcStatsType`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: RtcStatsType) -> &mut Self { self.set_type(val); self } - #[doc = "Change the `activeConnection` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] + #[deprecated = "Use `set_active_connection()` instead."] pub fn active_connection(&mut self, val: bool) -> &mut Self { self.set_active_connection(val); self } - #[doc = "Change the `bytesReceived` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] + #[deprecated = "Use `set_bytes_received()` instead."] pub fn bytes_received(&mut self, val: u32) -> &mut Self { self.set_bytes_received(val); self } - #[doc = "Change the `bytesSent` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] + #[deprecated = "Use `set_bytes_sent()` instead."] pub fn bytes_sent(&mut self, val: u32) -> &mut Self { self.set_bytes_sent(val); self } - #[doc = "Change the `component` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] + #[deprecated = "Use `set_component()` instead."] pub fn component(&mut self, val: i32) -> &mut Self { self.set_component(val); self } - #[doc = "Change the `transportId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] + #[deprecated = "Use `set_transport_id()` instead."] pub fn transport_id(&mut self, val: &str) -> &mut Self { self.set_transport_id(val); self diff --git a/crates/web-sys/src/features/gen_RtcIceServer.rs b/crates/web-sys/src/features/gen_RtcIceServer.rs index fc7c59f28983..9d68913411a4 100644 --- a/crates/web-sys/src/features/gen_RtcIceServer.rs +++ b/crates/web-sys/src/features/gen_RtcIceServer.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RtcIceServer`*"] #[wasm_bindgen(method, getter = "credential")] pub fn get_credential(this: &RtcIceServer) -> Option; + #[doc = "Change the `credential` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceServer`*"] #[wasm_bindgen(method, setter = "credential")] - fn set_credential(this: &RtcIceServer, val: &str); + pub fn set_credential(this: &RtcIceServer, val: &str); #[cfg(feature = "RtcIceCredentialType")] #[doc = "Get the `credentialType` field of this object."] #[doc = ""] @@ -24,29 +27,41 @@ extern "C" { #[wasm_bindgen(method, getter = "credentialType")] pub fn get_credential_type(this: &RtcIceServer) -> Option; #[cfg(feature = "RtcIceCredentialType")] + #[doc = "Change the `credentialType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCredentialType`, `RtcIceServer`*"] #[wasm_bindgen(method, setter = "credentialType")] - fn set_credential_type(this: &RtcIceServer, val: RtcIceCredentialType); + pub fn set_credential_type(this: &RtcIceServer, val: RtcIceCredentialType); #[doc = "Get the `url` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceServer`*"] #[wasm_bindgen(method, getter = "url")] pub fn get_url(this: &RtcIceServer) -> Option; + #[doc = "Change the `url` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceServer`*"] #[wasm_bindgen(method, setter = "url")] - fn set_url(this: &RtcIceServer, val: &str); + pub fn set_url(this: &RtcIceServer, val: &str); #[doc = "Get the `urls` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceServer`*"] #[wasm_bindgen(method, getter = "urls")] pub fn get_urls(this: &RtcIceServer) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `urls` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceServer`*"] #[wasm_bindgen(method, setter = "urls")] - fn set_urls(this: &RtcIceServer, val: &::wasm_bindgen::JsValue); + pub fn set_urls(this: &RtcIceServer, val: &::wasm_bindgen::JsValue); #[doc = "Get the `username` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceServer`*"] #[wasm_bindgen(method, getter = "username")] pub fn get_username(this: &RtcIceServer) -> Option; + #[doc = "Change the `username` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceServer`*"] #[wasm_bindgen(method, setter = "username")] - fn set_username(this: &RtcIceServer, val: &str); + pub fn set_username(this: &RtcIceServer, val: &str); } impl RtcIceServer { #[doc = "Construct a new `RtcIceServer`."] @@ -57,38 +72,28 @@ impl RtcIceServer { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `credential` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceServer`*"] + #[deprecated = "Use `set_credential()` instead."] pub fn credential(&mut self, val: &str) -> &mut Self { self.set_credential(val); self } #[cfg(feature = "RtcIceCredentialType")] - #[doc = "Change the `credentialType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCredentialType`, `RtcIceServer`*"] + #[deprecated = "Use `set_credential_type()` instead."] pub fn credential_type(&mut self, val: RtcIceCredentialType) -> &mut Self { self.set_credential_type(val); self } - #[doc = "Change the `url` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceServer`*"] + #[deprecated = "Use `set_url()` instead."] pub fn url(&mut self, val: &str) -> &mut Self { self.set_url(val); self } - #[doc = "Change the `urls` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceServer`*"] + #[deprecated = "Use `set_urls()` instead."] pub fn urls(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_urls(val); self } - #[doc = "Change the `username` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceServer`*"] + #[deprecated = "Use `set_username()` instead."] pub fn username(&mut self, val: &str) -> &mut Self { self.set_username(val); self diff --git a/crates/web-sys/src/features/gen_RtcIdentityAssertion.rs b/crates/web-sys/src/features/gen_RtcIdentityAssertion.rs index d37f19240fec..7458c2702a88 100644 --- a/crates/web-sys/src/features/gen_RtcIdentityAssertion.rs +++ b/crates/web-sys/src/features/gen_RtcIdentityAssertion.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RtcIdentityAssertion`*"] #[wasm_bindgen(method, getter = "idp")] pub fn get_idp(this: &RtcIdentityAssertion) -> Option; + #[doc = "Change the `idp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIdentityAssertion`*"] #[wasm_bindgen(method, setter = "idp")] - fn set_idp(this: &RtcIdentityAssertion, val: &str); + pub fn set_idp(this: &RtcIdentityAssertion, val: &str); #[doc = "Get the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIdentityAssertion`*"] #[wasm_bindgen(method, getter = "name")] pub fn get_name(this: &RtcIdentityAssertion) -> Option; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIdentityAssertion`*"] #[wasm_bindgen(method, setter = "name")] - fn set_name(this: &RtcIdentityAssertion, val: &str); + pub fn set_name(this: &RtcIdentityAssertion, val: &str); } impl RtcIdentityAssertion { #[doc = "Construct a new `RtcIdentityAssertion`."] @@ -34,16 +40,12 @@ impl RtcIdentityAssertion { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `idp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIdentityAssertion`*"] + #[deprecated = "Use `set_idp()` instead."] pub fn idp(&mut self, val: &str) -> &mut Self { self.set_idp(val); self } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIdentityAssertion`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { self.set_name(val); self diff --git a/crates/web-sys/src/features/gen_RtcIdentityAssertionResult.rs b/crates/web-sys/src/features/gen_RtcIdentityAssertionResult.rs index 0786c75f4378..8a7503430a26 100644 --- a/crates/web-sys/src/features/gen_RtcIdentityAssertionResult.rs +++ b/crates/web-sys/src/features/gen_RtcIdentityAssertionResult.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RtcIdentityAssertionResult`*"] #[wasm_bindgen(method, getter = "assertion")] pub fn get_assertion(this: &RtcIdentityAssertionResult) -> String; + #[doc = "Change the `assertion` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIdentityAssertionResult`*"] #[wasm_bindgen(method, setter = "assertion")] - fn set_assertion(this: &RtcIdentityAssertionResult, val: &str); + pub fn set_assertion(this: &RtcIdentityAssertionResult, val: &str); #[cfg(feature = "RtcIdentityProviderDetails")] #[doc = "Get the `idp` field of this object."] #[doc = ""] @@ -24,8 +27,11 @@ extern "C" { #[wasm_bindgen(method, getter = "idp")] pub fn get_idp(this: &RtcIdentityAssertionResult) -> RtcIdentityProviderDetails; #[cfg(feature = "RtcIdentityProviderDetails")] + #[doc = "Change the `idp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIdentityAssertionResult`, `RtcIdentityProviderDetails`*"] #[wasm_bindgen(method, setter = "idp")] - fn set_idp(this: &RtcIdentityAssertionResult, val: &RtcIdentityProviderDetails); + pub fn set_idp(this: &RtcIdentityAssertionResult, val: &RtcIdentityProviderDetails); } impl RtcIdentityAssertionResult { #[cfg(feature = "RtcIdentityProviderDetails")] @@ -39,17 +45,13 @@ impl RtcIdentityAssertionResult { ret.idp(idp); ret } - #[doc = "Change the `assertion` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIdentityAssertionResult`*"] + #[deprecated = "Use `set_assertion()` instead."] pub fn assertion(&mut self, val: &str) -> &mut Self { self.set_assertion(val); self } #[cfg(feature = "RtcIdentityProviderDetails")] - #[doc = "Change the `idp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIdentityAssertionResult`, `RtcIdentityProviderDetails`*"] + #[deprecated = "Use `set_idp()` instead."] pub fn idp(&mut self, val: &RtcIdentityProviderDetails) -> &mut Self { self.set_idp(val); self diff --git a/crates/web-sys/src/features/gen_RtcIdentityProvider.rs b/crates/web-sys/src/features/gen_RtcIdentityProvider.rs index 0b3994629d7a..2b3fe976406d 100644 --- a/crates/web-sys/src/features/gen_RtcIdentityProvider.rs +++ b/crates/web-sys/src/features/gen_RtcIdentityProvider.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProvider`*"] #[wasm_bindgen(method, getter = "generateAssertion")] pub fn get_generate_assertion(this: &RtcIdentityProvider) -> ::js_sys::Function; + #[doc = "Change the `generateAssertion` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProvider`*"] #[wasm_bindgen(method, setter = "generateAssertion")] - fn set_generate_assertion(this: &RtcIdentityProvider, val: &::js_sys::Function); + pub fn set_generate_assertion(this: &RtcIdentityProvider, val: &::js_sys::Function); #[doc = "Get the `validateAssertion` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProvider`*"] #[wasm_bindgen(method, getter = "validateAssertion")] pub fn get_validate_assertion(this: &RtcIdentityProvider) -> ::js_sys::Function; + #[doc = "Change the `validateAssertion` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProvider`*"] #[wasm_bindgen(method, setter = "validateAssertion")] - fn set_validate_assertion(this: &RtcIdentityProvider, val: &::js_sys::Function); + pub fn set_validate_assertion(this: &RtcIdentityProvider, val: &::js_sys::Function); } impl RtcIdentityProvider { #[doc = "Construct a new `RtcIdentityProvider`."] @@ -39,16 +45,12 @@ impl RtcIdentityProvider { ret.validate_assertion(validate_assertion); ret } - #[doc = "Change the `generateAssertion` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProvider`*"] + #[deprecated = "Use `set_generate_assertion()` instead."] pub fn generate_assertion(&mut self, val: &::js_sys::Function) -> &mut Self { self.set_generate_assertion(val); self } - #[doc = "Change the `validateAssertion` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProvider`*"] + #[deprecated = "Use `set_validate_assertion()` instead."] pub fn validate_assertion(&mut self, val: &::js_sys::Function) -> &mut Self { self.set_validate_assertion(val); self diff --git a/crates/web-sys/src/features/gen_RtcIdentityProviderDetails.rs b/crates/web-sys/src/features/gen_RtcIdentityProviderDetails.rs index 458626bc39fb..e00b757903b2 100644 --- a/crates/web-sys/src/features/gen_RtcIdentityProviderDetails.rs +++ b/crates/web-sys/src/features/gen_RtcIdentityProviderDetails.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProviderDetails`*"] #[wasm_bindgen(method, getter = "domain")] pub fn get_domain(this: &RtcIdentityProviderDetails) -> String; + #[doc = "Change the `domain` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProviderDetails`*"] #[wasm_bindgen(method, setter = "domain")] - fn set_domain(this: &RtcIdentityProviderDetails, val: &str); + pub fn set_domain(this: &RtcIdentityProviderDetails, val: &str); #[doc = "Get the `protocol` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProviderDetails`*"] #[wasm_bindgen(method, getter = "protocol")] pub fn get_protocol(this: &RtcIdentityProviderDetails) -> Option; + #[doc = "Change the `protocol` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProviderDetails`*"] #[wasm_bindgen(method, setter = "protocol")] - fn set_protocol(this: &RtcIdentityProviderDetails, val: &str); + pub fn set_protocol(this: &RtcIdentityProviderDetails, val: &str); } impl RtcIdentityProviderDetails { #[doc = "Construct a new `RtcIdentityProviderDetails`."] @@ -35,16 +41,12 @@ impl RtcIdentityProviderDetails { ret.domain(domain); ret } - #[doc = "Change the `domain` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProviderDetails`*"] + #[deprecated = "Use `set_domain()` instead."] pub fn domain(&mut self, val: &str) -> &mut Self { self.set_domain(val); self } - #[doc = "Change the `protocol` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProviderDetails`*"] + #[deprecated = "Use `set_protocol()` instead."] pub fn protocol(&mut self, val: &str) -> &mut Self { self.set_protocol(val); self diff --git a/crates/web-sys/src/features/gen_RtcIdentityProviderOptions.rs b/crates/web-sys/src/features/gen_RtcIdentityProviderOptions.rs index 32ca78b7e379..2dc6811ef445 100644 --- a/crates/web-sys/src/features/gen_RtcIdentityProviderOptions.rs +++ b/crates/web-sys/src/features/gen_RtcIdentityProviderOptions.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProviderOptions`*"] #[wasm_bindgen(method, getter = "peerIdentity")] pub fn get_peer_identity(this: &RtcIdentityProviderOptions) -> Option; + #[doc = "Change the `peerIdentity` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProviderOptions`*"] #[wasm_bindgen(method, setter = "peerIdentity")] - fn set_peer_identity(this: &RtcIdentityProviderOptions, val: &str); + pub fn set_peer_identity(this: &RtcIdentityProviderOptions, val: &str); #[doc = "Get the `protocol` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProviderOptions`*"] #[wasm_bindgen(method, getter = "protocol")] pub fn get_protocol(this: &RtcIdentityProviderOptions) -> Option; + #[doc = "Change the `protocol` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProviderOptions`*"] #[wasm_bindgen(method, setter = "protocol")] - fn set_protocol(this: &RtcIdentityProviderOptions, val: &str); + pub fn set_protocol(this: &RtcIdentityProviderOptions, val: &str); #[doc = "Get the `usernameHint` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProviderOptions`*"] #[wasm_bindgen(method, getter = "usernameHint")] pub fn get_username_hint(this: &RtcIdentityProviderOptions) -> Option; + #[doc = "Change the `usernameHint` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProviderOptions`*"] #[wasm_bindgen(method, setter = "usernameHint")] - fn set_username_hint(this: &RtcIdentityProviderOptions, val: &str); + pub fn set_username_hint(this: &RtcIdentityProviderOptions, val: &str); } impl RtcIdentityProviderOptions { #[doc = "Construct a new `RtcIdentityProviderOptions`."] @@ -41,23 +50,17 @@ impl RtcIdentityProviderOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `peerIdentity` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProviderOptions`*"] + #[deprecated = "Use `set_peer_identity()` instead."] pub fn peer_identity(&mut self, val: &str) -> &mut Self { self.set_peer_identity(val); self } - #[doc = "Change the `protocol` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProviderOptions`*"] + #[deprecated = "Use `set_protocol()` instead."] pub fn protocol(&mut self, val: &str) -> &mut Self { self.set_protocol(val); self } - #[doc = "Change the `usernameHint` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProviderOptions`*"] + #[deprecated = "Use `set_username_hint()` instead."] pub fn username_hint(&mut self, val: &str) -> &mut Self { self.set_username_hint(val); self diff --git a/crates/web-sys/src/features/gen_RtcIdentityValidationResult.rs b/crates/web-sys/src/features/gen_RtcIdentityValidationResult.rs index a76c4b3e5016..fd417af730f3 100644 --- a/crates/web-sys/src/features/gen_RtcIdentityValidationResult.rs +++ b/crates/web-sys/src/features/gen_RtcIdentityValidationResult.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RtcIdentityValidationResult`*"] #[wasm_bindgen(method, getter = "contents")] pub fn get_contents(this: &RtcIdentityValidationResult) -> String; + #[doc = "Change the `contents` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIdentityValidationResult`*"] #[wasm_bindgen(method, setter = "contents")] - fn set_contents(this: &RtcIdentityValidationResult, val: &str); + pub fn set_contents(this: &RtcIdentityValidationResult, val: &str); #[doc = "Get the `identity` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIdentityValidationResult`*"] #[wasm_bindgen(method, getter = "identity")] pub fn get_identity(this: &RtcIdentityValidationResult) -> String; + #[doc = "Change the `identity` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIdentityValidationResult`*"] #[wasm_bindgen(method, setter = "identity")] - fn set_identity(this: &RtcIdentityValidationResult, val: &str); + pub fn set_identity(this: &RtcIdentityValidationResult, val: &str); } impl RtcIdentityValidationResult { #[doc = "Construct a new `RtcIdentityValidationResult`."] @@ -36,16 +42,12 @@ impl RtcIdentityValidationResult { ret.identity(identity); ret } - #[doc = "Change the `contents` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIdentityValidationResult`*"] + #[deprecated = "Use `set_contents()` instead."] pub fn contents(&mut self, val: &str) -> &mut Self { self.set_contents(val); self } - #[doc = "Change the `identity` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIdentityValidationResult`*"] + #[deprecated = "Use `set_identity()` instead."] pub fn identity(&mut self, val: &str) -> &mut Self { self.set_identity(val); self diff --git a/crates/web-sys/src/features/gen_RtcInboundRtpStreamStats.rs b/crates/web-sys/src/features/gen_RtcInboundRtpStreamStats.rs index 164f4ddbd787..21580dcb4934 100644 --- a/crates/web-sys/src/features/gen_RtcInboundRtpStreamStats.rs +++ b/crates/web-sys/src/features/gen_RtcInboundRtpStreamStats.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, getter = "id")] pub fn get_id(this: &RtcInboundRtpStreamStats) -> Option; + #[doc = "Change the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "id")] - fn set_id(this: &RtcInboundRtpStreamStats, val: &str); + pub fn set_id(this: &RtcInboundRtpStreamStats, val: &str); #[doc = "Get the `timestamp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, getter = "timestamp")] pub fn get_timestamp(this: &RtcInboundRtpStreamStats) -> Option; + #[doc = "Change the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "timestamp")] - fn set_timestamp(this: &RtcInboundRtpStreamStats, val: f64); + pub fn set_timestamp(this: &RtcInboundRtpStreamStats, val: f64); #[cfg(feature = "RtcStatsType")] #[doc = "Get the `type` field of this object."] #[doc = ""] @@ -31,155 +37,221 @@ extern "C" { #[wasm_bindgen(method, getter = "type")] pub fn get_type(this: &RtcInboundRtpStreamStats) -> Option; #[cfg(feature = "RtcStatsType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`, `RtcStatsType`*"] #[wasm_bindgen(method, setter = "type")] - fn set_type(this: &RtcInboundRtpStreamStats, val: RtcStatsType); + pub fn set_type(this: &RtcInboundRtpStreamStats, val: RtcStatsType); #[doc = "Get the `bitrateMean` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, getter = "bitrateMean")] pub fn get_bitrate_mean(this: &RtcInboundRtpStreamStats) -> Option; + #[doc = "Change the `bitrateMean` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "bitrateMean")] - fn set_bitrate_mean(this: &RtcInboundRtpStreamStats, val: f64); + pub fn set_bitrate_mean(this: &RtcInboundRtpStreamStats, val: f64); #[doc = "Get the `bitrateStdDev` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, getter = "bitrateStdDev")] pub fn get_bitrate_std_dev(this: &RtcInboundRtpStreamStats) -> Option; + #[doc = "Change the `bitrateStdDev` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "bitrateStdDev")] - fn set_bitrate_std_dev(this: &RtcInboundRtpStreamStats, val: f64); + pub fn set_bitrate_std_dev(this: &RtcInboundRtpStreamStats, val: f64); #[doc = "Get the `codecId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, getter = "codecId")] pub fn get_codec_id(this: &RtcInboundRtpStreamStats) -> Option; + #[doc = "Change the `codecId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "codecId")] - fn set_codec_id(this: &RtcInboundRtpStreamStats, val: &str); + pub fn set_codec_id(this: &RtcInboundRtpStreamStats, val: &str); #[doc = "Get the `firCount` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, getter = "firCount")] pub fn get_fir_count(this: &RtcInboundRtpStreamStats) -> Option; + #[doc = "Change the `firCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "firCount")] - fn set_fir_count(this: &RtcInboundRtpStreamStats, val: u32); + pub fn set_fir_count(this: &RtcInboundRtpStreamStats, val: u32); #[doc = "Get the `framerateMean` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, getter = "framerateMean")] pub fn get_framerate_mean(this: &RtcInboundRtpStreamStats) -> Option; + #[doc = "Change the `framerateMean` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "framerateMean")] - fn set_framerate_mean(this: &RtcInboundRtpStreamStats, val: f64); + pub fn set_framerate_mean(this: &RtcInboundRtpStreamStats, val: f64); #[doc = "Get the `framerateStdDev` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, getter = "framerateStdDev")] pub fn get_framerate_std_dev(this: &RtcInboundRtpStreamStats) -> Option; + #[doc = "Change the `framerateStdDev` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "framerateStdDev")] - fn set_framerate_std_dev(this: &RtcInboundRtpStreamStats, val: f64); + pub fn set_framerate_std_dev(this: &RtcInboundRtpStreamStats, val: f64); #[doc = "Get the `isRemote` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, getter = "isRemote")] pub fn get_is_remote(this: &RtcInboundRtpStreamStats) -> Option; + #[doc = "Change the `isRemote` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "isRemote")] - fn set_is_remote(this: &RtcInboundRtpStreamStats, val: bool); + pub fn set_is_remote(this: &RtcInboundRtpStreamStats, val: bool); #[doc = "Get the `mediaTrackId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, getter = "mediaTrackId")] pub fn get_media_track_id(this: &RtcInboundRtpStreamStats) -> Option; + #[doc = "Change the `mediaTrackId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "mediaTrackId")] - fn set_media_track_id(this: &RtcInboundRtpStreamStats, val: &str); + pub fn set_media_track_id(this: &RtcInboundRtpStreamStats, val: &str); #[doc = "Get the `mediaType` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, getter = "mediaType")] pub fn get_media_type(this: &RtcInboundRtpStreamStats) -> Option; + #[doc = "Change the `mediaType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "mediaType")] - fn set_media_type(this: &RtcInboundRtpStreamStats, val: &str); + pub fn set_media_type(this: &RtcInboundRtpStreamStats, val: &str); #[doc = "Get the `nackCount` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, getter = "nackCount")] pub fn get_nack_count(this: &RtcInboundRtpStreamStats) -> Option; + #[doc = "Change the `nackCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "nackCount")] - fn set_nack_count(this: &RtcInboundRtpStreamStats, val: u32); + pub fn set_nack_count(this: &RtcInboundRtpStreamStats, val: u32); #[doc = "Get the `pliCount` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, getter = "pliCount")] pub fn get_pli_count(this: &RtcInboundRtpStreamStats) -> Option; + #[doc = "Change the `pliCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "pliCount")] - fn set_pli_count(this: &RtcInboundRtpStreamStats, val: u32); + pub fn set_pli_count(this: &RtcInboundRtpStreamStats, val: u32); #[doc = "Get the `remoteId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, getter = "remoteId")] pub fn get_remote_id(this: &RtcInboundRtpStreamStats) -> Option; + #[doc = "Change the `remoteId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "remoteId")] - fn set_remote_id(this: &RtcInboundRtpStreamStats, val: &str); + pub fn set_remote_id(this: &RtcInboundRtpStreamStats, val: &str); #[doc = "Get the `ssrc` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, getter = "ssrc")] pub fn get_ssrc(this: &RtcInboundRtpStreamStats) -> Option; + #[doc = "Change the `ssrc` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "ssrc")] - fn set_ssrc(this: &RtcInboundRtpStreamStats, val: &str); + pub fn set_ssrc(this: &RtcInboundRtpStreamStats, val: &str); #[doc = "Get the `transportId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, getter = "transportId")] pub fn get_transport_id(this: &RtcInboundRtpStreamStats) -> Option; + #[doc = "Change the `transportId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "transportId")] - fn set_transport_id(this: &RtcInboundRtpStreamStats, val: &str); + pub fn set_transport_id(this: &RtcInboundRtpStreamStats, val: &str); #[doc = "Get the `bytesReceived` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, getter = "bytesReceived")] pub fn get_bytes_received(this: &RtcInboundRtpStreamStats) -> Option; + #[doc = "Change the `bytesReceived` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "bytesReceived")] - fn set_bytes_received(this: &RtcInboundRtpStreamStats, val: f64); + pub fn set_bytes_received(this: &RtcInboundRtpStreamStats, val: f64); #[doc = "Get the `discardedPackets` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, getter = "discardedPackets")] pub fn get_discarded_packets(this: &RtcInboundRtpStreamStats) -> Option; + #[doc = "Change the `discardedPackets` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "discardedPackets")] - fn set_discarded_packets(this: &RtcInboundRtpStreamStats, val: u32); + pub fn set_discarded_packets(this: &RtcInboundRtpStreamStats, val: u32); #[doc = "Get the `framesDecoded` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, getter = "framesDecoded")] pub fn get_frames_decoded(this: &RtcInboundRtpStreamStats) -> Option; + #[doc = "Change the `framesDecoded` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "framesDecoded")] - fn set_frames_decoded(this: &RtcInboundRtpStreamStats, val: u32); + pub fn set_frames_decoded(this: &RtcInboundRtpStreamStats, val: u32); #[doc = "Get the `jitter` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, getter = "jitter")] pub fn get_jitter(this: &RtcInboundRtpStreamStats) -> Option; + #[doc = "Change the `jitter` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "jitter")] - fn set_jitter(this: &RtcInboundRtpStreamStats, val: f64); + pub fn set_jitter(this: &RtcInboundRtpStreamStats, val: f64); #[doc = "Get the `packetsLost` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, getter = "packetsLost")] pub fn get_packets_lost(this: &RtcInboundRtpStreamStats) -> Option; + #[doc = "Change the `packetsLost` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "packetsLost")] - fn set_packets_lost(this: &RtcInboundRtpStreamStats, val: u32); + pub fn set_packets_lost(this: &RtcInboundRtpStreamStats, val: u32); #[doc = "Get the `packetsReceived` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, getter = "packetsReceived")] pub fn get_packets_received(this: &RtcInboundRtpStreamStats) -> Option; + #[doc = "Change the `packetsReceived` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "packetsReceived")] - fn set_packets_received(this: &RtcInboundRtpStreamStats, val: u32); + pub fn set_packets_received(this: &RtcInboundRtpStreamStats, val: u32); #[doc = "Get the `roundTripTime` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, getter = "roundTripTime")] pub fn get_round_trip_time(this: &RtcInboundRtpStreamStats) -> Option; + #[doc = "Change the `roundTripTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "roundTripTime")] - fn set_round_trip_time(this: &RtcInboundRtpStreamStats, val: i32); + pub fn set_round_trip_time(this: &RtcInboundRtpStreamStats, val: i32); } impl RtcInboundRtpStreamStats { #[doc = "Construct a new `RtcInboundRtpStreamStats`."] @@ -190,171 +262,123 @@ impl RtcInboundRtpStreamStats { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `id` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[deprecated = "Use `set_id()` instead."] pub fn id(&mut self, val: &str) -> &mut Self { self.set_id(val); self } - #[doc = "Change the `timestamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[deprecated = "Use `set_timestamp()` instead."] pub fn timestamp(&mut self, val: f64) -> &mut Self { self.set_timestamp(val); self } #[cfg(feature = "RtcStatsType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`, `RtcStatsType`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: RtcStatsType) -> &mut Self { self.set_type(val); self } - #[doc = "Change the `bitrateMean` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[deprecated = "Use `set_bitrate_mean()` instead."] pub fn bitrate_mean(&mut self, val: f64) -> &mut Self { self.set_bitrate_mean(val); self } - #[doc = "Change the `bitrateStdDev` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[deprecated = "Use `set_bitrate_std_dev()` instead."] pub fn bitrate_std_dev(&mut self, val: f64) -> &mut Self { self.set_bitrate_std_dev(val); self } - #[doc = "Change the `codecId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[deprecated = "Use `set_codec_id()` instead."] pub fn codec_id(&mut self, val: &str) -> &mut Self { self.set_codec_id(val); self } - #[doc = "Change the `firCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[deprecated = "Use `set_fir_count()` instead."] pub fn fir_count(&mut self, val: u32) -> &mut Self { self.set_fir_count(val); self } - #[doc = "Change the `framerateMean` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[deprecated = "Use `set_framerate_mean()` instead."] pub fn framerate_mean(&mut self, val: f64) -> &mut Self { self.set_framerate_mean(val); self } - #[doc = "Change the `framerateStdDev` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[deprecated = "Use `set_framerate_std_dev()` instead."] pub fn framerate_std_dev(&mut self, val: f64) -> &mut Self { self.set_framerate_std_dev(val); self } - #[doc = "Change the `isRemote` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[deprecated = "Use `set_is_remote()` instead."] pub fn is_remote(&mut self, val: bool) -> &mut Self { self.set_is_remote(val); self } - #[doc = "Change the `mediaTrackId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[deprecated = "Use `set_media_track_id()` instead."] pub fn media_track_id(&mut self, val: &str) -> &mut Self { self.set_media_track_id(val); self } - #[doc = "Change the `mediaType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[deprecated = "Use `set_media_type()` instead."] pub fn media_type(&mut self, val: &str) -> &mut Self { self.set_media_type(val); self } - #[doc = "Change the `nackCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[deprecated = "Use `set_nack_count()` instead."] pub fn nack_count(&mut self, val: u32) -> &mut Self { self.set_nack_count(val); self } - #[doc = "Change the `pliCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[deprecated = "Use `set_pli_count()` instead."] pub fn pli_count(&mut self, val: u32) -> &mut Self { self.set_pli_count(val); self } - #[doc = "Change the `remoteId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[deprecated = "Use `set_remote_id()` instead."] pub fn remote_id(&mut self, val: &str) -> &mut Self { self.set_remote_id(val); self } - #[doc = "Change the `ssrc` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[deprecated = "Use `set_ssrc()` instead."] pub fn ssrc(&mut self, val: &str) -> &mut Self { self.set_ssrc(val); self } - #[doc = "Change the `transportId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[deprecated = "Use `set_transport_id()` instead."] pub fn transport_id(&mut self, val: &str) -> &mut Self { self.set_transport_id(val); self } - #[doc = "Change the `bytesReceived` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[deprecated = "Use `set_bytes_received()` instead."] pub fn bytes_received(&mut self, val: f64) -> &mut Self { self.set_bytes_received(val); self } - #[doc = "Change the `discardedPackets` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[deprecated = "Use `set_discarded_packets()` instead."] pub fn discarded_packets(&mut self, val: u32) -> &mut Self { self.set_discarded_packets(val); self } - #[doc = "Change the `framesDecoded` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[deprecated = "Use `set_frames_decoded()` instead."] pub fn frames_decoded(&mut self, val: u32) -> &mut Self { self.set_frames_decoded(val); self } - #[doc = "Change the `jitter` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[deprecated = "Use `set_jitter()` instead."] pub fn jitter(&mut self, val: f64) -> &mut Self { self.set_jitter(val); self } - #[doc = "Change the `packetsLost` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[deprecated = "Use `set_packets_lost()` instead."] pub fn packets_lost(&mut self, val: u32) -> &mut Self { self.set_packets_lost(val); self } - #[doc = "Change the `packetsReceived` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[deprecated = "Use `set_packets_received()` instead."] pub fn packets_received(&mut self, val: u32) -> &mut Self { self.set_packets_received(val); self } - #[doc = "Change the `roundTripTime` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[deprecated = "Use `set_round_trip_time()` instead."] pub fn round_trip_time(&mut self, val: i32) -> &mut Self { self.set_round_trip_time(val); self diff --git a/crates/web-sys/src/features/gen_RtcMediaStreamStats.rs b/crates/web-sys/src/features/gen_RtcMediaStreamStats.rs index 5fefbd2b9a1a..8dc44254a10c 100644 --- a/crates/web-sys/src/features/gen_RtcMediaStreamStats.rs +++ b/crates/web-sys/src/features/gen_RtcMediaStreamStats.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamStats`*"] #[wasm_bindgen(method, getter = "id")] pub fn get_id(this: &RtcMediaStreamStats) -> Option; + #[doc = "Change the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamStats`*"] #[wasm_bindgen(method, setter = "id")] - fn set_id(this: &RtcMediaStreamStats, val: &str); + pub fn set_id(this: &RtcMediaStreamStats, val: &str); #[doc = "Get the `timestamp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamStats`*"] #[wasm_bindgen(method, getter = "timestamp")] pub fn get_timestamp(this: &RtcMediaStreamStats) -> Option; + #[doc = "Change the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamStats`*"] #[wasm_bindgen(method, setter = "timestamp")] - fn set_timestamp(this: &RtcMediaStreamStats, val: f64); + pub fn set_timestamp(this: &RtcMediaStreamStats, val: f64); #[cfg(feature = "RtcStatsType")] #[doc = "Get the `type` field of this object."] #[doc = ""] @@ -31,22 +37,31 @@ extern "C" { #[wasm_bindgen(method, getter = "type")] pub fn get_type(this: &RtcMediaStreamStats) -> Option; #[cfg(feature = "RtcStatsType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamStats`, `RtcStatsType`*"] #[wasm_bindgen(method, setter = "type")] - fn set_type(this: &RtcMediaStreamStats, val: RtcStatsType); + pub fn set_type(this: &RtcMediaStreamStats, val: RtcStatsType); #[doc = "Get the `streamIdentifier` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamStats`*"] #[wasm_bindgen(method, getter = "streamIdentifier")] pub fn get_stream_identifier(this: &RtcMediaStreamStats) -> Option; + #[doc = "Change the `streamIdentifier` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamStats`*"] #[wasm_bindgen(method, setter = "streamIdentifier")] - fn set_stream_identifier(this: &RtcMediaStreamStats, val: &str); + pub fn set_stream_identifier(this: &RtcMediaStreamStats, val: &str); #[doc = "Get the `trackIds` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamStats`*"] #[wasm_bindgen(method, getter = "trackIds")] pub fn get_track_ids(this: &RtcMediaStreamStats) -> Option<::js_sys::Array>; + #[doc = "Change the `trackIds` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamStats`*"] #[wasm_bindgen(method, setter = "trackIds")] - fn set_track_ids(this: &RtcMediaStreamStats, val: &::wasm_bindgen::JsValue); + pub fn set_track_ids(this: &RtcMediaStreamStats, val: &::wasm_bindgen::JsValue); } impl RtcMediaStreamStats { #[doc = "Construct a new `RtcMediaStreamStats`."] @@ -57,38 +72,28 @@ impl RtcMediaStreamStats { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `id` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamStats`*"] + #[deprecated = "Use `set_id()` instead."] pub fn id(&mut self, val: &str) -> &mut Self { self.set_id(val); self } - #[doc = "Change the `timestamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamStats`*"] + #[deprecated = "Use `set_timestamp()` instead."] pub fn timestamp(&mut self, val: f64) -> &mut Self { self.set_timestamp(val); self } #[cfg(feature = "RtcStatsType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamStats`, `RtcStatsType`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: RtcStatsType) -> &mut Self { self.set_type(val); self } - #[doc = "Change the `streamIdentifier` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamStats`*"] + #[deprecated = "Use `set_stream_identifier()` instead."] pub fn stream_identifier(&mut self, val: &str) -> &mut Self { self.set_stream_identifier(val); self } - #[doc = "Change the `trackIds` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamStats`*"] + #[deprecated = "Use `set_track_ids()` instead."] pub fn track_ids(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_track_ids(val); self diff --git a/crates/web-sys/src/features/gen_RtcMediaStreamTrackStats.rs b/crates/web-sys/src/features/gen_RtcMediaStreamTrackStats.rs index de9d73a3e98d..0ba64d2a16bf 100644 --- a/crates/web-sys/src/features/gen_RtcMediaStreamTrackStats.rs +++ b/crates/web-sys/src/features/gen_RtcMediaStreamTrackStats.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] #[wasm_bindgen(method, getter = "id")] pub fn get_id(this: &RtcMediaStreamTrackStats) -> Option; + #[doc = "Change the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] #[wasm_bindgen(method, setter = "id")] - fn set_id(this: &RtcMediaStreamTrackStats, val: &str); + pub fn set_id(this: &RtcMediaStreamTrackStats, val: &str); #[doc = "Get the `timestamp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] #[wasm_bindgen(method, getter = "timestamp")] pub fn get_timestamp(this: &RtcMediaStreamTrackStats) -> Option; + #[doc = "Change the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] #[wasm_bindgen(method, setter = "timestamp")] - fn set_timestamp(this: &RtcMediaStreamTrackStats, val: f64); + pub fn set_timestamp(this: &RtcMediaStreamTrackStats, val: f64); #[cfg(feature = "RtcStatsType")] #[doc = "Get the `type` field of this object."] #[doc = ""] @@ -31,106 +37,151 @@ extern "C" { #[wasm_bindgen(method, getter = "type")] pub fn get_type(this: &RtcMediaStreamTrackStats) -> Option; #[cfg(feature = "RtcStatsType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`, `RtcStatsType`*"] #[wasm_bindgen(method, setter = "type")] - fn set_type(this: &RtcMediaStreamTrackStats, val: RtcStatsType); + pub fn set_type(this: &RtcMediaStreamTrackStats, val: RtcStatsType); #[doc = "Get the `audioLevel` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] #[wasm_bindgen(method, getter = "audioLevel")] pub fn get_audio_level(this: &RtcMediaStreamTrackStats) -> Option; + #[doc = "Change the `audioLevel` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] #[wasm_bindgen(method, setter = "audioLevel")] - fn set_audio_level(this: &RtcMediaStreamTrackStats, val: f64); + pub fn set_audio_level(this: &RtcMediaStreamTrackStats, val: f64); #[doc = "Get the `echoReturnLoss` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] #[wasm_bindgen(method, getter = "echoReturnLoss")] pub fn get_echo_return_loss(this: &RtcMediaStreamTrackStats) -> Option; + #[doc = "Change the `echoReturnLoss` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] #[wasm_bindgen(method, setter = "echoReturnLoss")] - fn set_echo_return_loss(this: &RtcMediaStreamTrackStats, val: f64); + pub fn set_echo_return_loss(this: &RtcMediaStreamTrackStats, val: f64); #[doc = "Get the `echoReturnLossEnhancement` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] #[wasm_bindgen(method, getter = "echoReturnLossEnhancement")] pub fn get_echo_return_loss_enhancement(this: &RtcMediaStreamTrackStats) -> Option; + #[doc = "Change the `echoReturnLossEnhancement` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] #[wasm_bindgen(method, setter = "echoReturnLossEnhancement")] - fn set_echo_return_loss_enhancement(this: &RtcMediaStreamTrackStats, val: f64); + pub fn set_echo_return_loss_enhancement(this: &RtcMediaStreamTrackStats, val: f64); #[doc = "Get the `frameHeight` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] #[wasm_bindgen(method, getter = "frameHeight")] pub fn get_frame_height(this: &RtcMediaStreamTrackStats) -> Option; + #[doc = "Change the `frameHeight` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] #[wasm_bindgen(method, setter = "frameHeight")] - fn set_frame_height(this: &RtcMediaStreamTrackStats, val: u32); + pub fn set_frame_height(this: &RtcMediaStreamTrackStats, val: u32); #[doc = "Get the `frameWidth` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] #[wasm_bindgen(method, getter = "frameWidth")] pub fn get_frame_width(this: &RtcMediaStreamTrackStats) -> Option; + #[doc = "Change the `frameWidth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] #[wasm_bindgen(method, setter = "frameWidth")] - fn set_frame_width(this: &RtcMediaStreamTrackStats, val: u32); + pub fn set_frame_width(this: &RtcMediaStreamTrackStats, val: u32); #[doc = "Get the `framesCorrupted` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] #[wasm_bindgen(method, getter = "framesCorrupted")] pub fn get_frames_corrupted(this: &RtcMediaStreamTrackStats) -> Option; + #[doc = "Change the `framesCorrupted` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] #[wasm_bindgen(method, setter = "framesCorrupted")] - fn set_frames_corrupted(this: &RtcMediaStreamTrackStats, val: u32); + pub fn set_frames_corrupted(this: &RtcMediaStreamTrackStats, val: u32); #[doc = "Get the `framesDecoded` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] #[wasm_bindgen(method, getter = "framesDecoded")] pub fn get_frames_decoded(this: &RtcMediaStreamTrackStats) -> Option; + #[doc = "Change the `framesDecoded` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] #[wasm_bindgen(method, setter = "framesDecoded")] - fn set_frames_decoded(this: &RtcMediaStreamTrackStats, val: u32); + pub fn set_frames_decoded(this: &RtcMediaStreamTrackStats, val: u32); #[doc = "Get the `framesDropped` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] #[wasm_bindgen(method, getter = "framesDropped")] pub fn get_frames_dropped(this: &RtcMediaStreamTrackStats) -> Option; + #[doc = "Change the `framesDropped` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] #[wasm_bindgen(method, setter = "framesDropped")] - fn set_frames_dropped(this: &RtcMediaStreamTrackStats, val: u32); + pub fn set_frames_dropped(this: &RtcMediaStreamTrackStats, val: u32); #[doc = "Get the `framesPerSecond` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] #[wasm_bindgen(method, getter = "framesPerSecond")] pub fn get_frames_per_second(this: &RtcMediaStreamTrackStats) -> Option; + #[doc = "Change the `framesPerSecond` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] #[wasm_bindgen(method, setter = "framesPerSecond")] - fn set_frames_per_second(this: &RtcMediaStreamTrackStats, val: f64); + pub fn set_frames_per_second(this: &RtcMediaStreamTrackStats, val: f64); #[doc = "Get the `framesReceived` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] #[wasm_bindgen(method, getter = "framesReceived")] pub fn get_frames_received(this: &RtcMediaStreamTrackStats) -> Option; + #[doc = "Change the `framesReceived` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] #[wasm_bindgen(method, setter = "framesReceived")] - fn set_frames_received(this: &RtcMediaStreamTrackStats, val: u32); + pub fn set_frames_received(this: &RtcMediaStreamTrackStats, val: u32); #[doc = "Get the `framesSent` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] #[wasm_bindgen(method, getter = "framesSent")] pub fn get_frames_sent(this: &RtcMediaStreamTrackStats) -> Option; + #[doc = "Change the `framesSent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] #[wasm_bindgen(method, setter = "framesSent")] - fn set_frames_sent(this: &RtcMediaStreamTrackStats, val: u32); + pub fn set_frames_sent(this: &RtcMediaStreamTrackStats, val: u32); #[doc = "Get the `remoteSource` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] #[wasm_bindgen(method, getter = "remoteSource")] pub fn get_remote_source(this: &RtcMediaStreamTrackStats) -> Option; + #[doc = "Change the `remoteSource` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] #[wasm_bindgen(method, setter = "remoteSource")] - fn set_remote_source(this: &RtcMediaStreamTrackStats, val: bool); + pub fn set_remote_source(this: &RtcMediaStreamTrackStats, val: bool); #[doc = "Get the `ssrcIds` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] #[wasm_bindgen(method, getter = "ssrcIds")] pub fn get_ssrc_ids(this: &RtcMediaStreamTrackStats) -> Option<::js_sys::Array>; + #[doc = "Change the `ssrcIds` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] #[wasm_bindgen(method, setter = "ssrcIds")] - fn set_ssrc_ids(this: &RtcMediaStreamTrackStats, val: &::wasm_bindgen::JsValue); + pub fn set_ssrc_ids(this: &RtcMediaStreamTrackStats, val: &::wasm_bindgen::JsValue); #[doc = "Get the `trackIdentifier` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] #[wasm_bindgen(method, getter = "trackIdentifier")] pub fn get_track_identifier(this: &RtcMediaStreamTrackStats) -> Option; + #[doc = "Change the `trackIdentifier` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] #[wasm_bindgen(method, setter = "trackIdentifier")] - fn set_track_identifier(this: &RtcMediaStreamTrackStats, val: &str); + pub fn set_track_identifier(this: &RtcMediaStreamTrackStats, val: &str); } impl RtcMediaStreamTrackStats { #[doc = "Construct a new `RtcMediaStreamTrackStats`."] @@ -141,122 +192,88 @@ impl RtcMediaStreamTrackStats { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `id` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + #[deprecated = "Use `set_id()` instead."] pub fn id(&mut self, val: &str) -> &mut Self { self.set_id(val); self } - #[doc = "Change the `timestamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + #[deprecated = "Use `set_timestamp()` instead."] pub fn timestamp(&mut self, val: f64) -> &mut Self { self.set_timestamp(val); self } #[cfg(feature = "RtcStatsType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`, `RtcStatsType`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: RtcStatsType) -> &mut Self { self.set_type(val); self } - #[doc = "Change the `audioLevel` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + #[deprecated = "Use `set_audio_level()` instead."] pub fn audio_level(&mut self, val: f64) -> &mut Self { self.set_audio_level(val); self } - #[doc = "Change the `echoReturnLoss` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + #[deprecated = "Use `set_echo_return_loss()` instead."] pub fn echo_return_loss(&mut self, val: f64) -> &mut Self { self.set_echo_return_loss(val); self } - #[doc = "Change the `echoReturnLossEnhancement` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + #[deprecated = "Use `set_echo_return_loss_enhancement()` instead."] pub fn echo_return_loss_enhancement(&mut self, val: f64) -> &mut Self { self.set_echo_return_loss_enhancement(val); self } - #[doc = "Change the `frameHeight` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + #[deprecated = "Use `set_frame_height()` instead."] pub fn frame_height(&mut self, val: u32) -> &mut Self { self.set_frame_height(val); self } - #[doc = "Change the `frameWidth` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + #[deprecated = "Use `set_frame_width()` instead."] pub fn frame_width(&mut self, val: u32) -> &mut Self { self.set_frame_width(val); self } - #[doc = "Change the `framesCorrupted` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + #[deprecated = "Use `set_frames_corrupted()` instead."] pub fn frames_corrupted(&mut self, val: u32) -> &mut Self { self.set_frames_corrupted(val); self } - #[doc = "Change the `framesDecoded` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + #[deprecated = "Use `set_frames_decoded()` instead."] pub fn frames_decoded(&mut self, val: u32) -> &mut Self { self.set_frames_decoded(val); self } - #[doc = "Change the `framesDropped` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + #[deprecated = "Use `set_frames_dropped()` instead."] pub fn frames_dropped(&mut self, val: u32) -> &mut Self { self.set_frames_dropped(val); self } - #[doc = "Change the `framesPerSecond` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + #[deprecated = "Use `set_frames_per_second()` instead."] pub fn frames_per_second(&mut self, val: f64) -> &mut Self { self.set_frames_per_second(val); self } - #[doc = "Change the `framesReceived` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + #[deprecated = "Use `set_frames_received()` instead."] pub fn frames_received(&mut self, val: u32) -> &mut Self { self.set_frames_received(val); self } - #[doc = "Change the `framesSent` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + #[deprecated = "Use `set_frames_sent()` instead."] pub fn frames_sent(&mut self, val: u32) -> &mut Self { self.set_frames_sent(val); self } - #[doc = "Change the `remoteSource` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + #[deprecated = "Use `set_remote_source()` instead."] pub fn remote_source(&mut self, val: bool) -> &mut Self { self.set_remote_source(val); self } - #[doc = "Change the `ssrcIds` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + #[deprecated = "Use `set_ssrc_ids()` instead."] pub fn ssrc_ids(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_ssrc_ids(val); self } - #[doc = "Change the `trackIdentifier` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + #[deprecated = "Use `set_track_identifier()` instead."] pub fn track_identifier(&mut self, val: &str) -> &mut Self { self.set_track_identifier(val); self diff --git a/crates/web-sys/src/features/gen_RtcOfferOptions.rs b/crates/web-sys/src/features/gen_RtcOfferOptions.rs index 9e3e6475e929..ba2db197fcb6 100644 --- a/crates/web-sys/src/features/gen_RtcOfferOptions.rs +++ b/crates/web-sys/src/features/gen_RtcOfferOptions.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RtcOfferOptions`*"] #[wasm_bindgen(method, getter = "iceRestart")] pub fn get_ice_restart(this: &RtcOfferOptions) -> Option; + #[doc = "Change the `iceRestart` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOfferOptions`*"] #[wasm_bindgen(method, setter = "iceRestart")] - fn set_ice_restart(this: &RtcOfferOptions, val: bool); + pub fn set_ice_restart(this: &RtcOfferOptions, val: bool); #[doc = "Get the `offerToReceiveAudio` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcOfferOptions`*"] #[wasm_bindgen(method, getter = "offerToReceiveAudio")] pub fn get_offer_to_receive_audio(this: &RtcOfferOptions) -> Option; + #[doc = "Change the `offerToReceiveAudio` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOfferOptions`*"] #[wasm_bindgen(method, setter = "offerToReceiveAudio")] - fn set_offer_to_receive_audio(this: &RtcOfferOptions, val: bool); + pub fn set_offer_to_receive_audio(this: &RtcOfferOptions, val: bool); #[doc = "Get the `offerToReceiveVideo` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcOfferOptions`*"] #[wasm_bindgen(method, getter = "offerToReceiveVideo")] pub fn get_offer_to_receive_video(this: &RtcOfferOptions) -> Option; + #[doc = "Change the `offerToReceiveVideo` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOfferOptions`*"] #[wasm_bindgen(method, setter = "offerToReceiveVideo")] - fn set_offer_to_receive_video(this: &RtcOfferOptions, val: bool); + pub fn set_offer_to_receive_video(this: &RtcOfferOptions, val: bool); } impl RtcOfferOptions { #[doc = "Construct a new `RtcOfferOptions`."] @@ -41,23 +50,17 @@ impl RtcOfferOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `iceRestart` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcOfferOptions`*"] + #[deprecated = "Use `set_ice_restart()` instead."] pub fn ice_restart(&mut self, val: bool) -> &mut Self { self.set_ice_restart(val); self } - #[doc = "Change the `offerToReceiveAudio` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcOfferOptions`*"] + #[deprecated = "Use `set_offer_to_receive_audio()` instead."] pub fn offer_to_receive_audio(&mut self, val: bool) -> &mut Self { self.set_offer_to_receive_audio(val); self } - #[doc = "Change the `offerToReceiveVideo` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcOfferOptions`*"] + #[deprecated = "Use `set_offer_to_receive_video()` instead."] pub fn offer_to_receive_video(&mut self, val: bool) -> &mut Self { self.set_offer_to_receive_video(val); self diff --git a/crates/web-sys/src/features/gen_RtcOutboundRtpStreamStats.rs b/crates/web-sys/src/features/gen_RtcOutboundRtpStreamStats.rs index 1ec4fac09d56..093c0b0af229 100644 --- a/crates/web-sys/src/features/gen_RtcOutboundRtpStreamStats.rs +++ b/crates/web-sys/src/features/gen_RtcOutboundRtpStreamStats.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, getter = "id")] pub fn get_id(this: &RtcOutboundRtpStreamStats) -> Option; + #[doc = "Change the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "id")] - fn set_id(this: &RtcOutboundRtpStreamStats, val: &str); + pub fn set_id(this: &RtcOutboundRtpStreamStats, val: &str); #[doc = "Get the `timestamp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, getter = "timestamp")] pub fn get_timestamp(this: &RtcOutboundRtpStreamStats) -> Option; + #[doc = "Change the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "timestamp")] - fn set_timestamp(this: &RtcOutboundRtpStreamStats, val: f64); + pub fn set_timestamp(this: &RtcOutboundRtpStreamStats, val: f64); #[cfg(feature = "RtcStatsType")] #[doc = "Get the `type` field of this object."] #[doc = ""] @@ -31,141 +37,201 @@ extern "C" { #[wasm_bindgen(method, getter = "type")] pub fn get_type(this: &RtcOutboundRtpStreamStats) -> Option; #[cfg(feature = "RtcStatsType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`, `RtcStatsType`*"] #[wasm_bindgen(method, setter = "type")] - fn set_type(this: &RtcOutboundRtpStreamStats, val: RtcStatsType); + pub fn set_type(this: &RtcOutboundRtpStreamStats, val: RtcStatsType); #[doc = "Get the `bitrateMean` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, getter = "bitrateMean")] pub fn get_bitrate_mean(this: &RtcOutboundRtpStreamStats) -> Option; + #[doc = "Change the `bitrateMean` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "bitrateMean")] - fn set_bitrate_mean(this: &RtcOutboundRtpStreamStats, val: f64); + pub fn set_bitrate_mean(this: &RtcOutboundRtpStreamStats, val: f64); #[doc = "Get the `bitrateStdDev` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, getter = "bitrateStdDev")] pub fn get_bitrate_std_dev(this: &RtcOutboundRtpStreamStats) -> Option; + #[doc = "Change the `bitrateStdDev` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "bitrateStdDev")] - fn set_bitrate_std_dev(this: &RtcOutboundRtpStreamStats, val: f64); + pub fn set_bitrate_std_dev(this: &RtcOutboundRtpStreamStats, val: f64); #[doc = "Get the `codecId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, getter = "codecId")] pub fn get_codec_id(this: &RtcOutboundRtpStreamStats) -> Option; + #[doc = "Change the `codecId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "codecId")] - fn set_codec_id(this: &RtcOutboundRtpStreamStats, val: &str); + pub fn set_codec_id(this: &RtcOutboundRtpStreamStats, val: &str); #[doc = "Get the `firCount` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, getter = "firCount")] pub fn get_fir_count(this: &RtcOutboundRtpStreamStats) -> Option; + #[doc = "Change the `firCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "firCount")] - fn set_fir_count(this: &RtcOutboundRtpStreamStats, val: u32); + pub fn set_fir_count(this: &RtcOutboundRtpStreamStats, val: u32); #[doc = "Get the `framerateMean` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, getter = "framerateMean")] pub fn get_framerate_mean(this: &RtcOutboundRtpStreamStats) -> Option; + #[doc = "Change the `framerateMean` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "framerateMean")] - fn set_framerate_mean(this: &RtcOutboundRtpStreamStats, val: f64); + pub fn set_framerate_mean(this: &RtcOutboundRtpStreamStats, val: f64); #[doc = "Get the `framerateStdDev` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, getter = "framerateStdDev")] pub fn get_framerate_std_dev(this: &RtcOutboundRtpStreamStats) -> Option; + #[doc = "Change the `framerateStdDev` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "framerateStdDev")] - fn set_framerate_std_dev(this: &RtcOutboundRtpStreamStats, val: f64); + pub fn set_framerate_std_dev(this: &RtcOutboundRtpStreamStats, val: f64); #[doc = "Get the `isRemote` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, getter = "isRemote")] pub fn get_is_remote(this: &RtcOutboundRtpStreamStats) -> Option; + #[doc = "Change the `isRemote` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "isRemote")] - fn set_is_remote(this: &RtcOutboundRtpStreamStats, val: bool); + pub fn set_is_remote(this: &RtcOutboundRtpStreamStats, val: bool); #[doc = "Get the `mediaTrackId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, getter = "mediaTrackId")] pub fn get_media_track_id(this: &RtcOutboundRtpStreamStats) -> Option; + #[doc = "Change the `mediaTrackId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "mediaTrackId")] - fn set_media_track_id(this: &RtcOutboundRtpStreamStats, val: &str); + pub fn set_media_track_id(this: &RtcOutboundRtpStreamStats, val: &str); #[doc = "Get the `mediaType` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, getter = "mediaType")] pub fn get_media_type(this: &RtcOutboundRtpStreamStats) -> Option; + #[doc = "Change the `mediaType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "mediaType")] - fn set_media_type(this: &RtcOutboundRtpStreamStats, val: &str); + pub fn set_media_type(this: &RtcOutboundRtpStreamStats, val: &str); #[doc = "Get the `nackCount` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, getter = "nackCount")] pub fn get_nack_count(this: &RtcOutboundRtpStreamStats) -> Option; + #[doc = "Change the `nackCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "nackCount")] - fn set_nack_count(this: &RtcOutboundRtpStreamStats, val: u32); + pub fn set_nack_count(this: &RtcOutboundRtpStreamStats, val: u32); #[doc = "Get the `pliCount` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, getter = "pliCount")] pub fn get_pli_count(this: &RtcOutboundRtpStreamStats) -> Option; + #[doc = "Change the `pliCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "pliCount")] - fn set_pli_count(this: &RtcOutboundRtpStreamStats, val: u32); + pub fn set_pli_count(this: &RtcOutboundRtpStreamStats, val: u32); #[doc = "Get the `remoteId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, getter = "remoteId")] pub fn get_remote_id(this: &RtcOutboundRtpStreamStats) -> Option; + #[doc = "Change the `remoteId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "remoteId")] - fn set_remote_id(this: &RtcOutboundRtpStreamStats, val: &str); + pub fn set_remote_id(this: &RtcOutboundRtpStreamStats, val: &str); #[doc = "Get the `ssrc` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, getter = "ssrc")] pub fn get_ssrc(this: &RtcOutboundRtpStreamStats) -> Option; + #[doc = "Change the `ssrc` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "ssrc")] - fn set_ssrc(this: &RtcOutboundRtpStreamStats, val: &str); + pub fn set_ssrc(this: &RtcOutboundRtpStreamStats, val: &str); #[doc = "Get the `transportId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, getter = "transportId")] pub fn get_transport_id(this: &RtcOutboundRtpStreamStats) -> Option; + #[doc = "Change the `transportId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "transportId")] - fn set_transport_id(this: &RtcOutboundRtpStreamStats, val: &str); + pub fn set_transport_id(this: &RtcOutboundRtpStreamStats, val: &str); #[doc = "Get the `bytesSent` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, getter = "bytesSent")] pub fn get_bytes_sent(this: &RtcOutboundRtpStreamStats) -> Option; + #[doc = "Change the `bytesSent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "bytesSent")] - fn set_bytes_sent(this: &RtcOutboundRtpStreamStats, val: f64); + pub fn set_bytes_sent(this: &RtcOutboundRtpStreamStats, val: f64); #[doc = "Get the `droppedFrames` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, getter = "droppedFrames")] pub fn get_dropped_frames(this: &RtcOutboundRtpStreamStats) -> Option; + #[doc = "Change the `droppedFrames` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "droppedFrames")] - fn set_dropped_frames(this: &RtcOutboundRtpStreamStats, val: u32); + pub fn set_dropped_frames(this: &RtcOutboundRtpStreamStats, val: u32); #[doc = "Get the `framesEncoded` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, getter = "framesEncoded")] pub fn get_frames_encoded(this: &RtcOutboundRtpStreamStats) -> Option; + #[doc = "Change the `framesEncoded` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "framesEncoded")] - fn set_frames_encoded(this: &RtcOutboundRtpStreamStats, val: u32); + pub fn set_frames_encoded(this: &RtcOutboundRtpStreamStats, val: u32); #[doc = "Get the `packetsSent` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, getter = "packetsSent")] pub fn get_packets_sent(this: &RtcOutboundRtpStreamStats) -> Option; + #[doc = "Change the `packetsSent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "packetsSent")] - fn set_packets_sent(this: &RtcOutboundRtpStreamStats, val: u32); + pub fn set_packets_sent(this: &RtcOutboundRtpStreamStats, val: u32); #[doc = "Get the `targetBitrate` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, getter = "targetBitrate")] pub fn get_target_bitrate(this: &RtcOutboundRtpStreamStats) -> Option; + #[doc = "Change the `targetBitrate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "targetBitrate")] - fn set_target_bitrate(this: &RtcOutboundRtpStreamStats, val: f64); + pub fn set_target_bitrate(this: &RtcOutboundRtpStreamStats, val: f64); } impl RtcOutboundRtpStreamStats { #[doc = "Construct a new `RtcOutboundRtpStreamStats`."] @@ -176,157 +242,113 @@ impl RtcOutboundRtpStreamStats { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `id` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[deprecated = "Use `set_id()` instead."] pub fn id(&mut self, val: &str) -> &mut Self { self.set_id(val); self } - #[doc = "Change the `timestamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[deprecated = "Use `set_timestamp()` instead."] pub fn timestamp(&mut self, val: f64) -> &mut Self { self.set_timestamp(val); self } #[cfg(feature = "RtcStatsType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`, `RtcStatsType`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: RtcStatsType) -> &mut Self { self.set_type(val); self } - #[doc = "Change the `bitrateMean` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[deprecated = "Use `set_bitrate_mean()` instead."] pub fn bitrate_mean(&mut self, val: f64) -> &mut Self { self.set_bitrate_mean(val); self } - #[doc = "Change the `bitrateStdDev` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[deprecated = "Use `set_bitrate_std_dev()` instead."] pub fn bitrate_std_dev(&mut self, val: f64) -> &mut Self { self.set_bitrate_std_dev(val); self } - #[doc = "Change the `codecId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[deprecated = "Use `set_codec_id()` instead."] pub fn codec_id(&mut self, val: &str) -> &mut Self { self.set_codec_id(val); self } - #[doc = "Change the `firCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[deprecated = "Use `set_fir_count()` instead."] pub fn fir_count(&mut self, val: u32) -> &mut Self { self.set_fir_count(val); self } - #[doc = "Change the `framerateMean` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[deprecated = "Use `set_framerate_mean()` instead."] pub fn framerate_mean(&mut self, val: f64) -> &mut Self { self.set_framerate_mean(val); self } - #[doc = "Change the `framerateStdDev` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[deprecated = "Use `set_framerate_std_dev()` instead."] pub fn framerate_std_dev(&mut self, val: f64) -> &mut Self { self.set_framerate_std_dev(val); self } - #[doc = "Change the `isRemote` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[deprecated = "Use `set_is_remote()` instead."] pub fn is_remote(&mut self, val: bool) -> &mut Self { self.set_is_remote(val); self } - #[doc = "Change the `mediaTrackId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[deprecated = "Use `set_media_track_id()` instead."] pub fn media_track_id(&mut self, val: &str) -> &mut Self { self.set_media_track_id(val); self } - #[doc = "Change the `mediaType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[deprecated = "Use `set_media_type()` instead."] pub fn media_type(&mut self, val: &str) -> &mut Self { self.set_media_type(val); self } - #[doc = "Change the `nackCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[deprecated = "Use `set_nack_count()` instead."] pub fn nack_count(&mut self, val: u32) -> &mut Self { self.set_nack_count(val); self } - #[doc = "Change the `pliCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[deprecated = "Use `set_pli_count()` instead."] pub fn pli_count(&mut self, val: u32) -> &mut Self { self.set_pli_count(val); self } - #[doc = "Change the `remoteId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[deprecated = "Use `set_remote_id()` instead."] pub fn remote_id(&mut self, val: &str) -> &mut Self { self.set_remote_id(val); self } - #[doc = "Change the `ssrc` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[deprecated = "Use `set_ssrc()` instead."] pub fn ssrc(&mut self, val: &str) -> &mut Self { self.set_ssrc(val); self } - #[doc = "Change the `transportId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[deprecated = "Use `set_transport_id()` instead."] pub fn transport_id(&mut self, val: &str) -> &mut Self { self.set_transport_id(val); self } - #[doc = "Change the `bytesSent` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[deprecated = "Use `set_bytes_sent()` instead."] pub fn bytes_sent(&mut self, val: f64) -> &mut Self { self.set_bytes_sent(val); self } - #[doc = "Change the `droppedFrames` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[deprecated = "Use `set_dropped_frames()` instead."] pub fn dropped_frames(&mut self, val: u32) -> &mut Self { self.set_dropped_frames(val); self } - #[doc = "Change the `framesEncoded` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[deprecated = "Use `set_frames_encoded()` instead."] pub fn frames_encoded(&mut self, val: u32) -> &mut Self { self.set_frames_encoded(val); self } - #[doc = "Change the `packetsSent` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[deprecated = "Use `set_packets_sent()` instead."] pub fn packets_sent(&mut self, val: u32) -> &mut Self { self.set_packets_sent(val); self } - #[doc = "Change the `targetBitrate` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[deprecated = "Use `set_target_bitrate()` instead."] pub fn target_bitrate(&mut self, val: f64) -> &mut Self { self.set_target_bitrate(val); self diff --git a/crates/web-sys/src/features/gen_RtcPeerConnectionIceEventInit.rs b/crates/web-sys/src/features/gen_RtcPeerConnectionIceEventInit.rs index 6ec437161ba6..17b0a63b4d2b 100644 --- a/crates/web-sys/src/features/gen_RtcPeerConnectionIceEventInit.rs +++ b/crates/web-sys/src/features/gen_RtcPeerConnectionIceEventInit.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RtcPeerConnectionIceEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &RtcPeerConnectionIceEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcPeerConnectionIceEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &RtcPeerConnectionIceEventInit, val: bool); + pub fn set_bubbles(this: &RtcPeerConnectionIceEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcPeerConnectionIceEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &RtcPeerConnectionIceEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcPeerConnectionIceEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &RtcPeerConnectionIceEventInit, val: bool); + pub fn set_cancelable(this: &RtcPeerConnectionIceEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcPeerConnectionIceEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &RtcPeerConnectionIceEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcPeerConnectionIceEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &RtcPeerConnectionIceEventInit, val: bool); + pub fn set_composed(this: &RtcPeerConnectionIceEventInit, val: bool); #[cfg(feature = "RtcIceCandidate")] #[doc = "Get the `candidate` field of this object."] #[doc = ""] @@ -38,8 +47,11 @@ extern "C" { #[wasm_bindgen(method, getter = "candidate")] pub fn get_candidate(this: &RtcPeerConnectionIceEventInit) -> Option; #[cfg(feature = "RtcIceCandidate")] + #[doc = "Change the `candidate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidate`, `RtcPeerConnectionIceEventInit`*"] #[wasm_bindgen(method, setter = "candidate")] - fn set_candidate(this: &RtcPeerConnectionIceEventInit, val: Option<&RtcIceCandidate>); + pub fn set_candidate(this: &RtcPeerConnectionIceEventInit, val: Option<&RtcIceCandidate>); } impl RtcPeerConnectionIceEventInit { #[doc = "Construct a new `RtcPeerConnectionIceEventInit`."] @@ -50,31 +62,23 @@ impl RtcPeerConnectionIceEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcPeerConnectionIceEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcPeerConnectionIceEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcPeerConnectionIceEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } #[cfg(feature = "RtcIceCandidate")] - #[doc = "Change the `candidate` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidate`, `RtcPeerConnectionIceEventInit`*"] + #[deprecated = "Use `set_candidate()` instead."] pub fn candidate(&mut self, val: Option<&RtcIceCandidate>) -> &mut Self { self.set_candidate(val); self diff --git a/crates/web-sys/src/features/gen_RtcRtcpParameters.rs b/crates/web-sys/src/features/gen_RtcRtcpParameters.rs index 7a2ad802727a..08bcfc0e6eed 100644 --- a/crates/web-sys/src/features/gen_RtcRtcpParameters.rs +++ b/crates/web-sys/src/features/gen_RtcRtcpParameters.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RtcRtcpParameters`*"] #[wasm_bindgen(method, getter = "cname")] pub fn get_cname(this: &RtcRtcpParameters) -> Option; + #[doc = "Change the `cname` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtcpParameters`*"] #[wasm_bindgen(method, setter = "cname")] - fn set_cname(this: &RtcRtcpParameters, val: &str); + pub fn set_cname(this: &RtcRtcpParameters, val: &str); #[doc = "Get the `reducedSize` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtcpParameters`*"] #[wasm_bindgen(method, getter = "reducedSize")] pub fn get_reduced_size(this: &RtcRtcpParameters) -> Option; + #[doc = "Change the `reducedSize` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtcpParameters`*"] #[wasm_bindgen(method, setter = "reducedSize")] - fn set_reduced_size(this: &RtcRtcpParameters, val: bool); + pub fn set_reduced_size(this: &RtcRtcpParameters, val: bool); } impl RtcRtcpParameters { #[doc = "Construct a new `RtcRtcpParameters`."] @@ -34,16 +40,12 @@ impl RtcRtcpParameters { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `cname` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtcpParameters`*"] + #[deprecated = "Use `set_cname()` instead."] pub fn cname(&mut self, val: &str) -> &mut Self { self.set_cname(val); self } - #[doc = "Change the `reducedSize` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtcpParameters`*"] + #[deprecated = "Use `set_reduced_size()` instead."] pub fn reduced_size(&mut self, val: bool) -> &mut Self { self.set_reduced_size(val); self diff --git a/crates/web-sys/src/features/gen_RtcRtpCapabilities.rs b/crates/web-sys/src/features/gen_RtcRtpCapabilities.rs index 7a7d5ff419d2..512311482bae 100644 --- a/crates/web-sys/src/features/gen_RtcRtpCapabilities.rs +++ b/crates/web-sys/src/features/gen_RtcRtpCapabilities.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RtcRtpCapabilities`*"] #[wasm_bindgen(method, getter = "codecs")] pub fn get_codecs(this: &RtcRtpCapabilities) -> ::js_sys::Array; + #[doc = "Change the `codecs` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpCapabilities`*"] #[wasm_bindgen(method, setter = "codecs")] - fn set_codecs(this: &RtcRtpCapabilities, val: &::wasm_bindgen::JsValue); + pub fn set_codecs(this: &RtcRtpCapabilities, val: &::wasm_bindgen::JsValue); #[doc = "Get the `headerExtensions` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpCapabilities`*"] #[wasm_bindgen(method, getter = "headerExtensions")] pub fn get_header_extensions(this: &RtcRtpCapabilities) -> ::js_sys::Array; + #[doc = "Change the `headerExtensions` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpCapabilities`*"] #[wasm_bindgen(method, setter = "headerExtensions")] - fn set_header_extensions(this: &RtcRtpCapabilities, val: &::wasm_bindgen::JsValue); + pub fn set_header_extensions(this: &RtcRtpCapabilities, val: &::wasm_bindgen::JsValue); } impl RtcRtpCapabilities { #[doc = "Construct a new `RtcRtpCapabilities`."] @@ -39,16 +45,12 @@ impl RtcRtpCapabilities { ret.header_extensions(header_extensions); ret } - #[doc = "Change the `codecs` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpCapabilities`*"] + #[deprecated = "Use `set_codecs()` instead."] pub fn codecs(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_codecs(val); self } - #[doc = "Change the `headerExtensions` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpCapabilities`*"] + #[deprecated = "Use `set_header_extensions()` instead."] pub fn header_extensions(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_header_extensions(val); self diff --git a/crates/web-sys/src/features/gen_RtcRtpCodecCapability.rs b/crates/web-sys/src/features/gen_RtcRtpCodecCapability.rs index cc90ffc80a92..c398df3fdb6f 100644 --- a/crates/web-sys/src/features/gen_RtcRtpCodecCapability.rs +++ b/crates/web-sys/src/features/gen_RtcRtpCodecCapability.rs @@ -15,29 +15,41 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecCapability`*"] #[wasm_bindgen(method, getter = "channels")] pub fn get_channels(this: &RtcRtpCodecCapability) -> Option; + #[doc = "Change the `channels` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecCapability`*"] #[wasm_bindgen(method, setter = "channels")] - fn set_channels(this: &RtcRtpCodecCapability, val: u16); + pub fn set_channels(this: &RtcRtpCodecCapability, val: u16); #[doc = "Get the `clockRate` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecCapability`*"] #[wasm_bindgen(method, getter = "clockRate")] pub fn get_clock_rate(this: &RtcRtpCodecCapability) -> u32; + #[doc = "Change the `clockRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecCapability`*"] #[wasm_bindgen(method, setter = "clockRate")] - fn set_clock_rate(this: &RtcRtpCodecCapability, val: u32); + pub fn set_clock_rate(this: &RtcRtpCodecCapability, val: u32); #[doc = "Get the `mimeType` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecCapability`*"] #[wasm_bindgen(method, getter = "mimeType")] pub fn get_mime_type(this: &RtcRtpCodecCapability) -> String; + #[doc = "Change the `mimeType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecCapability`*"] #[wasm_bindgen(method, setter = "mimeType")] - fn set_mime_type(this: &RtcRtpCodecCapability, val: &str); + pub fn set_mime_type(this: &RtcRtpCodecCapability, val: &str); #[doc = "Get the `sdpFmtpLine` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecCapability`*"] #[wasm_bindgen(method, getter = "sdpFmtpLine")] pub fn get_sdp_fmtp_line(this: &RtcRtpCodecCapability) -> Option; + #[doc = "Change the `sdpFmtpLine` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecCapability`*"] #[wasm_bindgen(method, setter = "sdpFmtpLine")] - fn set_sdp_fmtp_line(this: &RtcRtpCodecCapability, val: &str); + pub fn set_sdp_fmtp_line(this: &RtcRtpCodecCapability, val: &str); } impl RtcRtpCodecCapability { #[doc = "Construct a new `RtcRtpCodecCapability`."] @@ -50,30 +62,22 @@ impl RtcRtpCodecCapability { ret.mime_type(mime_type); ret } - #[doc = "Change the `channels` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecCapability`*"] + #[deprecated = "Use `set_channels()` instead."] pub fn channels(&mut self, val: u16) -> &mut Self { self.set_channels(val); self } - #[doc = "Change the `clockRate` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecCapability`*"] + #[deprecated = "Use `set_clock_rate()` instead."] pub fn clock_rate(&mut self, val: u32) -> &mut Self { self.set_clock_rate(val); self } - #[doc = "Change the `mimeType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecCapability`*"] + #[deprecated = "Use `set_mime_type()` instead."] pub fn mime_type(&mut self, val: &str) -> &mut Self { self.set_mime_type(val); self } - #[doc = "Change the `sdpFmtpLine` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecCapability`*"] + #[deprecated = "Use `set_sdp_fmtp_line()` instead."] pub fn sdp_fmtp_line(&mut self, val: &str) -> &mut Self { self.set_sdp_fmtp_line(val); self diff --git a/crates/web-sys/src/features/gen_RtcRtpCodecParameters.rs b/crates/web-sys/src/features/gen_RtcRtpCodecParameters.rs index fd6ea3f9df65..eefd4a904747 100644 --- a/crates/web-sys/src/features/gen_RtcRtpCodecParameters.rs +++ b/crates/web-sys/src/features/gen_RtcRtpCodecParameters.rs @@ -15,36 +15,51 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecParameters`*"] #[wasm_bindgen(method, getter = "channels")] pub fn get_channels(this: &RtcRtpCodecParameters) -> Option; + #[doc = "Change the `channels` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecParameters`*"] #[wasm_bindgen(method, setter = "channels")] - fn set_channels(this: &RtcRtpCodecParameters, val: u16); + pub fn set_channels(this: &RtcRtpCodecParameters, val: u16); #[doc = "Get the `clockRate` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecParameters`*"] #[wasm_bindgen(method, getter = "clockRate")] pub fn get_clock_rate(this: &RtcRtpCodecParameters) -> Option; + #[doc = "Change the `clockRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecParameters`*"] #[wasm_bindgen(method, setter = "clockRate")] - fn set_clock_rate(this: &RtcRtpCodecParameters, val: u32); + pub fn set_clock_rate(this: &RtcRtpCodecParameters, val: u32); #[doc = "Get the `mimeType` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecParameters`*"] #[wasm_bindgen(method, getter = "mimeType")] pub fn get_mime_type(this: &RtcRtpCodecParameters) -> Option; + #[doc = "Change the `mimeType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecParameters`*"] #[wasm_bindgen(method, setter = "mimeType")] - fn set_mime_type(this: &RtcRtpCodecParameters, val: &str); + pub fn set_mime_type(this: &RtcRtpCodecParameters, val: &str); #[doc = "Get the `payloadType` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecParameters`*"] #[wasm_bindgen(method, getter = "payloadType")] pub fn get_payload_type(this: &RtcRtpCodecParameters) -> Option; + #[doc = "Change the `payloadType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecParameters`*"] #[wasm_bindgen(method, setter = "payloadType")] - fn set_payload_type(this: &RtcRtpCodecParameters, val: u16); + pub fn set_payload_type(this: &RtcRtpCodecParameters, val: u16); #[doc = "Get the `sdpFmtpLine` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecParameters`*"] #[wasm_bindgen(method, getter = "sdpFmtpLine")] pub fn get_sdp_fmtp_line(this: &RtcRtpCodecParameters) -> Option; + #[doc = "Change the `sdpFmtpLine` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecParameters`*"] #[wasm_bindgen(method, setter = "sdpFmtpLine")] - fn set_sdp_fmtp_line(this: &RtcRtpCodecParameters, val: &str); + pub fn set_sdp_fmtp_line(this: &RtcRtpCodecParameters, val: &str); } impl RtcRtpCodecParameters { #[doc = "Construct a new `RtcRtpCodecParameters`."] @@ -55,37 +70,27 @@ impl RtcRtpCodecParameters { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `channels` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecParameters`*"] + #[deprecated = "Use `set_channels()` instead."] pub fn channels(&mut self, val: u16) -> &mut Self { self.set_channels(val); self } - #[doc = "Change the `clockRate` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecParameters`*"] + #[deprecated = "Use `set_clock_rate()` instead."] pub fn clock_rate(&mut self, val: u32) -> &mut Self { self.set_clock_rate(val); self } - #[doc = "Change the `mimeType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecParameters`*"] + #[deprecated = "Use `set_mime_type()` instead."] pub fn mime_type(&mut self, val: &str) -> &mut Self { self.set_mime_type(val); self } - #[doc = "Change the `payloadType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecParameters`*"] + #[deprecated = "Use `set_payload_type()` instead."] pub fn payload_type(&mut self, val: u16) -> &mut Self { self.set_payload_type(val); self } - #[doc = "Change the `sdpFmtpLine` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecParameters`*"] + #[deprecated = "Use `set_sdp_fmtp_line()` instead."] pub fn sdp_fmtp_line(&mut self, val: &str) -> &mut Self { self.set_sdp_fmtp_line(val); self diff --git a/crates/web-sys/src/features/gen_RtcRtpContributingSource.rs b/crates/web-sys/src/features/gen_RtcRtpContributingSource.rs index 9ee55b03cb69..dc78cb31ad8f 100644 --- a/crates/web-sys/src/features/gen_RtcRtpContributingSource.rs +++ b/crates/web-sys/src/features/gen_RtcRtpContributingSource.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RtcRtpContributingSource`*"] #[wasm_bindgen(method, getter = "audioLevel")] pub fn get_audio_level(this: &RtcRtpContributingSource) -> Option; + #[doc = "Change the `audioLevel` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpContributingSource`*"] #[wasm_bindgen(method, setter = "audioLevel")] - fn set_audio_level(this: &RtcRtpContributingSource, val: f64); + pub fn set_audio_level(this: &RtcRtpContributingSource, val: f64); #[doc = "Get the `source` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpContributingSource`*"] #[wasm_bindgen(method, getter = "source")] pub fn get_source(this: &RtcRtpContributingSource) -> u32; + #[doc = "Change the `source` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpContributingSource`*"] #[wasm_bindgen(method, setter = "source")] - fn set_source(this: &RtcRtpContributingSource, val: u32); + pub fn set_source(this: &RtcRtpContributingSource, val: u32); #[doc = "Get the `timestamp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpContributingSource`*"] #[wasm_bindgen(method, getter = "timestamp")] pub fn get_timestamp(this: &RtcRtpContributingSource) -> f64; + #[doc = "Change the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpContributingSource`*"] #[wasm_bindgen(method, setter = "timestamp")] - fn set_timestamp(this: &RtcRtpContributingSource, val: f64); + pub fn set_timestamp(this: &RtcRtpContributingSource, val: f64); } impl RtcRtpContributingSource { #[doc = "Construct a new `RtcRtpContributingSource`."] @@ -43,23 +52,17 @@ impl RtcRtpContributingSource { ret.timestamp(timestamp); ret } - #[doc = "Change the `audioLevel` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpContributingSource`*"] + #[deprecated = "Use `set_audio_level()` instead."] pub fn audio_level(&mut self, val: f64) -> &mut Self { self.set_audio_level(val); self } - #[doc = "Change the `source` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpContributingSource`*"] + #[deprecated = "Use `set_source()` instead."] pub fn source(&mut self, val: u32) -> &mut Self { self.set_source(val); self } - #[doc = "Change the `timestamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpContributingSource`*"] + #[deprecated = "Use `set_timestamp()` instead."] pub fn timestamp(&mut self, val: f64) -> &mut Self { self.set_timestamp(val); self diff --git a/crates/web-sys/src/features/gen_RtcRtpEncodingParameters.rs b/crates/web-sys/src/features/gen_RtcRtpEncodingParameters.rs index 2ddba71efb63..e9a65e07012a 100644 --- a/crates/web-sys/src/features/gen_RtcRtpEncodingParameters.rs +++ b/crates/web-sys/src/features/gen_RtcRtpEncodingParameters.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"] #[wasm_bindgen(method, getter = "active")] pub fn get_active(this: &RtcRtpEncodingParameters) -> Option; + #[doc = "Change the `active` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"] #[wasm_bindgen(method, setter = "active")] - fn set_active(this: &RtcRtpEncodingParameters, val: bool); + pub fn set_active(this: &RtcRtpEncodingParameters, val: bool); #[cfg(feature = "RtcDegradationPreference")] #[doc = "Get the `degradationPreference` field of this object."] #[doc = ""] @@ -26,8 +29,14 @@ extern "C" { this: &RtcRtpEncodingParameters, ) -> Option; #[cfg(feature = "RtcDegradationPreference")] + #[doc = "Change the `degradationPreference` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcDegradationPreference`, `RtcRtpEncodingParameters`*"] #[wasm_bindgen(method, setter = "degradationPreference")] - fn set_degradation_preference(this: &RtcRtpEncodingParameters, val: RtcDegradationPreference); + pub fn set_degradation_preference( + this: &RtcRtpEncodingParameters, + val: RtcDegradationPreference, + ); #[cfg(feature = "RtcFecParameters")] #[doc = "Get the `fec` field of this object."] #[doc = ""] @@ -35,15 +44,21 @@ extern "C" { #[wasm_bindgen(method, getter = "fec")] pub fn get_fec(this: &RtcRtpEncodingParameters) -> Option; #[cfg(feature = "RtcFecParameters")] + #[doc = "Change the `fec` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcFecParameters`, `RtcRtpEncodingParameters`*"] #[wasm_bindgen(method, setter = "fec")] - fn set_fec(this: &RtcRtpEncodingParameters, val: &RtcFecParameters); + pub fn set_fec(this: &RtcRtpEncodingParameters, val: &RtcFecParameters); #[doc = "Get the `maxBitrate` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"] #[wasm_bindgen(method, getter = "maxBitrate")] pub fn get_max_bitrate(this: &RtcRtpEncodingParameters) -> Option; + #[doc = "Change the `maxBitrate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"] #[wasm_bindgen(method, setter = "maxBitrate")] - fn set_max_bitrate(this: &RtcRtpEncodingParameters, val: u32); + pub fn set_max_bitrate(this: &RtcRtpEncodingParameters, val: u32); #[cfg(feature = "RtcPriorityType")] #[doc = "Get the `priority` field of this object."] #[doc = ""] @@ -51,15 +66,21 @@ extern "C" { #[wasm_bindgen(method, getter = "priority")] pub fn get_priority(this: &RtcRtpEncodingParameters) -> Option; #[cfg(feature = "RtcPriorityType")] + #[doc = "Change the `priority` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcPriorityType`, `RtcRtpEncodingParameters`*"] #[wasm_bindgen(method, setter = "priority")] - fn set_priority(this: &RtcRtpEncodingParameters, val: RtcPriorityType); + pub fn set_priority(this: &RtcRtpEncodingParameters, val: RtcPriorityType); #[doc = "Get the `rid` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"] #[wasm_bindgen(method, getter = "rid")] pub fn get_rid(this: &RtcRtpEncodingParameters) -> Option; + #[doc = "Change the `rid` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"] #[wasm_bindgen(method, setter = "rid")] - fn set_rid(this: &RtcRtpEncodingParameters, val: &str); + pub fn set_rid(this: &RtcRtpEncodingParameters, val: &str); #[cfg(feature = "RtcRtxParameters")] #[doc = "Get the `rtx` field of this object."] #[doc = ""] @@ -67,8 +88,11 @@ extern "C" { #[wasm_bindgen(method, getter = "rtx")] pub fn get_rtx(this: &RtcRtpEncodingParameters) -> Option; #[cfg(feature = "RtcRtxParameters")] + #[doc = "Change the `rtx` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`, `RtcRtxParameters`*"] #[wasm_bindgen(method, setter = "rtx")] - fn set_rtx(this: &RtcRtpEncodingParameters, val: &RtcRtxParameters); + pub fn set_rtx(this: &RtcRtpEncodingParameters, val: &RtcRtxParameters); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `scalabilityMode` field of this object."] #[doc = ""] @@ -78,22 +102,35 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "scalabilityMode")] pub fn get_scalability_mode(this: &RtcRtpEncodingParameters) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `scalabilityMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "scalabilityMode")] - fn set_scalability_mode(this: &RtcRtpEncodingParameters, val: &str); + pub fn set_scalability_mode(this: &RtcRtpEncodingParameters, val: &str); #[doc = "Get the `scaleResolutionDownBy` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"] #[wasm_bindgen(method, getter = "scaleResolutionDownBy")] pub fn get_scale_resolution_down_by(this: &RtcRtpEncodingParameters) -> Option; + #[doc = "Change the `scaleResolutionDownBy` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"] #[wasm_bindgen(method, setter = "scaleResolutionDownBy")] - fn set_scale_resolution_down_by(this: &RtcRtpEncodingParameters, val: f32); + pub fn set_scale_resolution_down_by(this: &RtcRtpEncodingParameters, val: f32); #[doc = "Get the `ssrc` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"] #[wasm_bindgen(method, getter = "ssrc")] pub fn get_ssrc(this: &RtcRtpEncodingParameters) -> Option; + #[doc = "Change the `ssrc` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"] #[wasm_bindgen(method, setter = "ssrc")] - fn set_ssrc(this: &RtcRtpEncodingParameters, val: u32); + pub fn set_ssrc(this: &RtcRtpEncodingParameters, val: u32); } impl RtcRtpEncodingParameters { #[doc = "Construct a new `RtcRtpEncodingParameters`."] @@ -104,80 +141,57 @@ impl RtcRtpEncodingParameters { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `active` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"] + #[deprecated = "Use `set_active()` instead."] pub fn active(&mut self, val: bool) -> &mut Self { self.set_active(val); self } #[cfg(feature = "RtcDegradationPreference")] - #[doc = "Change the `degradationPreference` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcDegradationPreference`, `RtcRtpEncodingParameters`*"] + #[deprecated = "Use `set_degradation_preference()` instead."] pub fn degradation_preference(&mut self, val: RtcDegradationPreference) -> &mut Self { self.set_degradation_preference(val); self } #[cfg(feature = "RtcFecParameters")] - #[doc = "Change the `fec` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcFecParameters`, `RtcRtpEncodingParameters`*"] + #[deprecated = "Use `set_fec()` instead."] pub fn fec(&mut self, val: &RtcFecParameters) -> &mut Self { self.set_fec(val); self } - #[doc = "Change the `maxBitrate` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"] + #[deprecated = "Use `set_max_bitrate()` instead."] pub fn max_bitrate(&mut self, val: u32) -> &mut Self { self.set_max_bitrate(val); self } #[cfg(feature = "RtcPriorityType")] - #[doc = "Change the `priority` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcPriorityType`, `RtcRtpEncodingParameters`*"] + #[deprecated = "Use `set_priority()` instead."] pub fn priority(&mut self, val: RtcPriorityType) -> &mut Self { self.set_priority(val); self } - #[doc = "Change the `rid` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"] + #[deprecated = "Use `set_rid()` instead."] pub fn rid(&mut self, val: &str) -> &mut Self { self.set_rid(val); self } #[cfg(feature = "RtcRtxParameters")] - #[doc = "Change the `rtx` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`, `RtcRtxParameters`*"] + #[deprecated = "Use `set_rtx()` instead."] pub fn rtx(&mut self, val: &RtcRtxParameters) -> &mut Self { self.set_rtx(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `scalabilityMode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_scalability_mode()` instead."] pub fn scalability_mode(&mut self, val: &str) -> &mut Self { self.set_scalability_mode(val); self } - #[doc = "Change the `scaleResolutionDownBy` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"] + #[deprecated = "Use `set_scale_resolution_down_by()` instead."] pub fn scale_resolution_down_by(&mut self, val: f32) -> &mut Self { self.set_scale_resolution_down_by(val); self } - #[doc = "Change the `ssrc` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"] + #[deprecated = "Use `set_ssrc()` instead."] pub fn ssrc(&mut self, val: u32) -> &mut Self { self.set_ssrc(val); self diff --git a/crates/web-sys/src/features/gen_RtcRtpHeaderExtensionCapability.rs b/crates/web-sys/src/features/gen_RtcRtpHeaderExtensionCapability.rs index b997254c6874..9372c5da79a2 100644 --- a/crates/web-sys/src/features/gen_RtcRtpHeaderExtensionCapability.rs +++ b/crates/web-sys/src/features/gen_RtcRtpHeaderExtensionCapability.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RtcRtpHeaderExtensionCapability`*"] #[wasm_bindgen(method, getter = "uri")] pub fn get_uri(this: &RtcRtpHeaderExtensionCapability) -> String; + #[doc = "Change the `uri` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpHeaderExtensionCapability`*"] #[wasm_bindgen(method, setter = "uri")] - fn set_uri(this: &RtcRtpHeaderExtensionCapability, val: &str); + pub fn set_uri(this: &RtcRtpHeaderExtensionCapability, val: &str); } impl RtcRtpHeaderExtensionCapability { #[doc = "Construct a new `RtcRtpHeaderExtensionCapability`."] @@ -28,9 +31,7 @@ impl RtcRtpHeaderExtensionCapability { ret.uri(uri); ret } - #[doc = "Change the `uri` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpHeaderExtensionCapability`*"] + #[deprecated = "Use `set_uri()` instead."] pub fn uri(&mut self, val: &str) -> &mut Self { self.set_uri(val); self diff --git a/crates/web-sys/src/features/gen_RtcRtpHeaderExtensionParameters.rs b/crates/web-sys/src/features/gen_RtcRtpHeaderExtensionParameters.rs index 932ff5c63078..aeeeb11cc802 100644 --- a/crates/web-sys/src/features/gen_RtcRtpHeaderExtensionParameters.rs +++ b/crates/web-sys/src/features/gen_RtcRtpHeaderExtensionParameters.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RtcRtpHeaderExtensionParameters`*"] #[wasm_bindgen(method, getter = "encrypted")] pub fn get_encrypted(this: &RtcRtpHeaderExtensionParameters) -> Option; + #[doc = "Change the `encrypted` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpHeaderExtensionParameters`*"] #[wasm_bindgen(method, setter = "encrypted")] - fn set_encrypted(this: &RtcRtpHeaderExtensionParameters, val: bool); + pub fn set_encrypted(this: &RtcRtpHeaderExtensionParameters, val: bool); #[doc = "Get the `id` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpHeaderExtensionParameters`*"] #[wasm_bindgen(method, getter = "id")] pub fn get_id(this: &RtcRtpHeaderExtensionParameters) -> Option; + #[doc = "Change the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpHeaderExtensionParameters`*"] #[wasm_bindgen(method, setter = "id")] - fn set_id(this: &RtcRtpHeaderExtensionParameters, val: u16); + pub fn set_id(this: &RtcRtpHeaderExtensionParameters, val: u16); #[doc = "Get the `uri` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpHeaderExtensionParameters`*"] #[wasm_bindgen(method, getter = "uri")] pub fn get_uri(this: &RtcRtpHeaderExtensionParameters) -> Option; + #[doc = "Change the `uri` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpHeaderExtensionParameters`*"] #[wasm_bindgen(method, setter = "uri")] - fn set_uri(this: &RtcRtpHeaderExtensionParameters, val: &str); + pub fn set_uri(this: &RtcRtpHeaderExtensionParameters, val: &str); } impl RtcRtpHeaderExtensionParameters { #[doc = "Construct a new `RtcRtpHeaderExtensionParameters`."] @@ -41,23 +50,17 @@ impl RtcRtpHeaderExtensionParameters { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `encrypted` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpHeaderExtensionParameters`*"] + #[deprecated = "Use `set_encrypted()` instead."] pub fn encrypted(&mut self, val: bool) -> &mut Self { self.set_encrypted(val); self } - #[doc = "Change the `id` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpHeaderExtensionParameters`*"] + #[deprecated = "Use `set_id()` instead."] pub fn id(&mut self, val: u16) -> &mut Self { self.set_id(val); self } - #[doc = "Change the `uri` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpHeaderExtensionParameters`*"] + #[deprecated = "Use `set_uri()` instead."] pub fn uri(&mut self, val: &str) -> &mut Self { self.set_uri(val); self diff --git a/crates/web-sys/src/features/gen_RtcRtpParameters.rs b/crates/web-sys/src/features/gen_RtcRtpParameters.rs index 64a79662d508..cd4bd2fa35a9 100644 --- a/crates/web-sys/src/features/gen_RtcRtpParameters.rs +++ b/crates/web-sys/src/features/gen_RtcRtpParameters.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RtcRtpParameters`*"] #[wasm_bindgen(method, getter = "codecs")] pub fn get_codecs(this: &RtcRtpParameters) -> Option<::js_sys::Array>; + #[doc = "Change the `codecs` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpParameters`*"] #[wasm_bindgen(method, setter = "codecs")] - fn set_codecs(this: &RtcRtpParameters, val: &::wasm_bindgen::JsValue); + pub fn set_codecs(this: &RtcRtpParameters, val: &::wasm_bindgen::JsValue); #[doc = "Get the `encodings` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpParameters`*"] #[wasm_bindgen(method, getter = "encodings")] pub fn get_encodings(this: &RtcRtpParameters) -> Option<::js_sys::Array>; + #[doc = "Change the `encodings` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpParameters`*"] #[wasm_bindgen(method, setter = "encodings")] - fn set_encodings(this: &RtcRtpParameters, val: &::wasm_bindgen::JsValue); + pub fn set_encodings(this: &RtcRtpParameters, val: &::wasm_bindgen::JsValue); #[doc = "Get the `headerExtensions` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpParameters`*"] #[wasm_bindgen(method, getter = "headerExtensions")] pub fn get_header_extensions(this: &RtcRtpParameters) -> Option<::js_sys::Array>; + #[doc = "Change the `headerExtensions` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpParameters`*"] #[wasm_bindgen(method, setter = "headerExtensions")] - fn set_header_extensions(this: &RtcRtpParameters, val: &::wasm_bindgen::JsValue); + pub fn set_header_extensions(this: &RtcRtpParameters, val: &::wasm_bindgen::JsValue); #[cfg(feature = "RtcRtcpParameters")] #[doc = "Get the `rtcp` field of this object."] #[doc = ""] @@ -38,8 +47,11 @@ extern "C" { #[wasm_bindgen(method, getter = "rtcp")] pub fn get_rtcp(this: &RtcRtpParameters) -> Option; #[cfg(feature = "RtcRtcpParameters")] + #[doc = "Change the `rtcp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtcpParameters`, `RtcRtpParameters`*"] #[wasm_bindgen(method, setter = "rtcp")] - fn set_rtcp(this: &RtcRtpParameters, val: &RtcRtcpParameters); + pub fn set_rtcp(this: &RtcRtpParameters, val: &RtcRtcpParameters); } impl RtcRtpParameters { #[doc = "Construct a new `RtcRtpParameters`."] @@ -50,31 +62,23 @@ impl RtcRtpParameters { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `codecs` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpParameters`*"] + #[deprecated = "Use `set_codecs()` instead."] pub fn codecs(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_codecs(val); self } - #[doc = "Change the `encodings` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpParameters`*"] + #[deprecated = "Use `set_encodings()` instead."] pub fn encodings(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_encodings(val); self } - #[doc = "Change the `headerExtensions` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpParameters`*"] + #[deprecated = "Use `set_header_extensions()` instead."] pub fn header_extensions(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_header_extensions(val); self } #[cfg(feature = "RtcRtcpParameters")] - #[doc = "Change the `rtcp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtcpParameters`, `RtcRtpParameters`*"] + #[deprecated = "Use `set_rtcp()` instead."] pub fn rtcp(&mut self, val: &RtcRtcpParameters) -> &mut Self { self.set_rtcp(val); self diff --git a/crates/web-sys/src/features/gen_RtcRtpSourceEntry.rs b/crates/web-sys/src/features/gen_RtcRtpSourceEntry.rs index 502b9ee48ca6..880bb6be41d5 100644 --- a/crates/web-sys/src/features/gen_RtcRtpSourceEntry.rs +++ b/crates/web-sys/src/features/gen_RtcRtpSourceEntry.rs @@ -15,29 +15,41 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RtcRtpSourceEntry`*"] #[wasm_bindgen(method, getter = "audioLevel")] pub fn get_audio_level(this: &RtcRtpSourceEntry) -> Option; + #[doc = "Change the `audioLevel` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpSourceEntry`*"] #[wasm_bindgen(method, setter = "audioLevel")] - fn set_audio_level(this: &RtcRtpSourceEntry, val: f64); + pub fn set_audio_level(this: &RtcRtpSourceEntry, val: f64); #[doc = "Get the `source` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpSourceEntry`*"] #[wasm_bindgen(method, getter = "source")] pub fn get_source(this: &RtcRtpSourceEntry) -> u32; + #[doc = "Change the `source` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpSourceEntry`*"] #[wasm_bindgen(method, setter = "source")] - fn set_source(this: &RtcRtpSourceEntry, val: u32); + pub fn set_source(this: &RtcRtpSourceEntry, val: u32); #[doc = "Get the `timestamp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpSourceEntry`*"] #[wasm_bindgen(method, getter = "timestamp")] pub fn get_timestamp(this: &RtcRtpSourceEntry) -> f64; + #[doc = "Change the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpSourceEntry`*"] #[wasm_bindgen(method, setter = "timestamp")] - fn set_timestamp(this: &RtcRtpSourceEntry, val: f64); + pub fn set_timestamp(this: &RtcRtpSourceEntry, val: f64); #[doc = "Get the `voiceActivityFlag` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpSourceEntry`*"] #[wasm_bindgen(method, getter = "voiceActivityFlag")] pub fn get_voice_activity_flag(this: &RtcRtpSourceEntry) -> Option; + #[doc = "Change the `voiceActivityFlag` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpSourceEntry`*"] #[wasm_bindgen(method, setter = "voiceActivityFlag")] - fn set_voice_activity_flag(this: &RtcRtpSourceEntry, val: Option); + pub fn set_voice_activity_flag(this: &RtcRtpSourceEntry, val: Option); #[cfg(feature = "RtcRtpSourceEntryType")] #[doc = "Get the `sourceType` field of this object."] #[doc = ""] @@ -45,8 +57,11 @@ extern "C" { #[wasm_bindgen(method, getter = "sourceType")] pub fn get_source_type(this: &RtcRtpSourceEntry) -> RtcRtpSourceEntryType; #[cfg(feature = "RtcRtpSourceEntryType")] + #[doc = "Change the `sourceType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpSourceEntry`, `RtcRtpSourceEntryType`*"] #[wasm_bindgen(method, setter = "sourceType")] - fn set_source_type(this: &RtcRtpSourceEntry, val: RtcRtpSourceEntryType); + pub fn set_source_type(this: &RtcRtpSourceEntry, val: RtcRtpSourceEntryType); } impl RtcRtpSourceEntry { #[cfg(feature = "RtcRtpSourceEntryType")] @@ -61,38 +76,28 @@ impl RtcRtpSourceEntry { ret.source_type(source_type); ret } - #[doc = "Change the `audioLevel` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpSourceEntry`*"] + #[deprecated = "Use `set_audio_level()` instead."] pub fn audio_level(&mut self, val: f64) -> &mut Self { self.set_audio_level(val); self } - #[doc = "Change the `source` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpSourceEntry`*"] + #[deprecated = "Use `set_source()` instead."] pub fn source(&mut self, val: u32) -> &mut Self { self.set_source(val); self } - #[doc = "Change the `timestamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpSourceEntry`*"] + #[deprecated = "Use `set_timestamp()` instead."] pub fn timestamp(&mut self, val: f64) -> &mut Self { self.set_timestamp(val); self } - #[doc = "Change the `voiceActivityFlag` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpSourceEntry`*"] + #[deprecated = "Use `set_voice_activity_flag()` instead."] pub fn voice_activity_flag(&mut self, val: Option) -> &mut Self { self.set_voice_activity_flag(val); self } #[cfg(feature = "RtcRtpSourceEntryType")] - #[doc = "Change the `sourceType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpSourceEntry`, `RtcRtpSourceEntryType`*"] + #[deprecated = "Use `set_source_type()` instead."] pub fn source_type(&mut self, val: RtcRtpSourceEntryType) -> &mut Self { self.set_source_type(val); self diff --git a/crates/web-sys/src/features/gen_RtcRtpSynchronizationSource.rs b/crates/web-sys/src/features/gen_RtcRtpSynchronizationSource.rs index b0561d7ae540..ad2d27e2feb4 100644 --- a/crates/web-sys/src/features/gen_RtcRtpSynchronizationSource.rs +++ b/crates/web-sys/src/features/gen_RtcRtpSynchronizationSource.rs @@ -15,29 +15,41 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RtcRtpSynchronizationSource`*"] #[wasm_bindgen(method, getter = "audioLevel")] pub fn get_audio_level(this: &RtcRtpSynchronizationSource) -> Option; + #[doc = "Change the `audioLevel` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpSynchronizationSource`*"] #[wasm_bindgen(method, setter = "audioLevel")] - fn set_audio_level(this: &RtcRtpSynchronizationSource, val: f64); + pub fn set_audio_level(this: &RtcRtpSynchronizationSource, val: f64); #[doc = "Get the `source` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpSynchronizationSource`*"] #[wasm_bindgen(method, getter = "source")] pub fn get_source(this: &RtcRtpSynchronizationSource) -> u32; + #[doc = "Change the `source` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpSynchronizationSource`*"] #[wasm_bindgen(method, setter = "source")] - fn set_source(this: &RtcRtpSynchronizationSource, val: u32); + pub fn set_source(this: &RtcRtpSynchronizationSource, val: u32); #[doc = "Get the `timestamp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpSynchronizationSource`*"] #[wasm_bindgen(method, getter = "timestamp")] pub fn get_timestamp(this: &RtcRtpSynchronizationSource) -> f64; + #[doc = "Change the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpSynchronizationSource`*"] #[wasm_bindgen(method, setter = "timestamp")] - fn set_timestamp(this: &RtcRtpSynchronizationSource, val: f64); + pub fn set_timestamp(this: &RtcRtpSynchronizationSource, val: f64); #[doc = "Get the `voiceActivityFlag` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpSynchronizationSource`*"] #[wasm_bindgen(method, getter = "voiceActivityFlag")] pub fn get_voice_activity_flag(this: &RtcRtpSynchronizationSource) -> Option; + #[doc = "Change the `voiceActivityFlag` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpSynchronizationSource`*"] #[wasm_bindgen(method, setter = "voiceActivityFlag")] - fn set_voice_activity_flag(this: &RtcRtpSynchronizationSource, val: Option); + pub fn set_voice_activity_flag(this: &RtcRtpSynchronizationSource, val: Option); } impl RtcRtpSynchronizationSource { #[doc = "Construct a new `RtcRtpSynchronizationSource`."] @@ -50,30 +62,22 @@ impl RtcRtpSynchronizationSource { ret.timestamp(timestamp); ret } - #[doc = "Change the `audioLevel` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpSynchronizationSource`*"] + #[deprecated = "Use `set_audio_level()` instead."] pub fn audio_level(&mut self, val: f64) -> &mut Self { self.set_audio_level(val); self } - #[doc = "Change the `source` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpSynchronizationSource`*"] + #[deprecated = "Use `set_source()` instead."] pub fn source(&mut self, val: u32) -> &mut Self { self.set_source(val); self } - #[doc = "Change the `timestamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpSynchronizationSource`*"] + #[deprecated = "Use `set_timestamp()` instead."] pub fn timestamp(&mut self, val: f64) -> &mut Self { self.set_timestamp(val); self } - #[doc = "Change the `voiceActivityFlag` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpSynchronizationSource`*"] + #[deprecated = "Use `set_voice_activity_flag()` instead."] pub fn voice_activity_flag(&mut self, val: Option) -> &mut Self { self.set_voice_activity_flag(val); self diff --git a/crates/web-sys/src/features/gen_RtcRtpTransceiverInit.rs b/crates/web-sys/src/features/gen_RtcRtpTransceiverInit.rs index a3404bd4b682..e0aae6edc7c0 100644 --- a/crates/web-sys/src/features/gen_RtcRtpTransceiverInit.rs +++ b/crates/web-sys/src/features/gen_RtcRtpTransceiverInit.rs @@ -17,22 +17,31 @@ extern "C" { #[wasm_bindgen(method, getter = "direction")] pub fn get_direction(this: &RtcRtpTransceiverInit) -> Option; #[cfg(feature = "RtcRtpTransceiverDirection")] + #[doc = "Change the `direction` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpTransceiverDirection`, `RtcRtpTransceiverInit`*"] #[wasm_bindgen(method, setter = "direction")] - fn set_direction(this: &RtcRtpTransceiverInit, val: RtcRtpTransceiverDirection); + pub fn set_direction(this: &RtcRtpTransceiverInit, val: RtcRtpTransceiverDirection); #[doc = "Get the `sendEncodings` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpTransceiverInit`*"] #[wasm_bindgen(method, getter = "sendEncodings")] pub fn get_send_encodings(this: &RtcRtpTransceiverInit) -> Option<::js_sys::Array>; + #[doc = "Change the `sendEncodings` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpTransceiverInit`*"] #[wasm_bindgen(method, setter = "sendEncodings")] - fn set_send_encodings(this: &RtcRtpTransceiverInit, val: &::wasm_bindgen::JsValue); + pub fn set_send_encodings(this: &RtcRtpTransceiverInit, val: &::wasm_bindgen::JsValue); #[doc = "Get the `streams` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpTransceiverInit`*"] #[wasm_bindgen(method, getter = "streams")] pub fn get_streams(this: &RtcRtpTransceiverInit) -> Option<::js_sys::Array>; + #[doc = "Change the `streams` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpTransceiverInit`*"] #[wasm_bindgen(method, setter = "streams")] - fn set_streams(this: &RtcRtpTransceiverInit, val: &::wasm_bindgen::JsValue); + pub fn set_streams(this: &RtcRtpTransceiverInit, val: &::wasm_bindgen::JsValue); } impl RtcRtpTransceiverInit { #[doc = "Construct a new `RtcRtpTransceiverInit`."] @@ -44,23 +53,17 @@ impl RtcRtpTransceiverInit { ret } #[cfg(feature = "RtcRtpTransceiverDirection")] - #[doc = "Change the `direction` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpTransceiverDirection`, `RtcRtpTransceiverInit`*"] + #[deprecated = "Use `set_direction()` instead."] pub fn direction(&mut self, val: RtcRtpTransceiverDirection) -> &mut Self { self.set_direction(val); self } - #[doc = "Change the `sendEncodings` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpTransceiverInit`*"] + #[deprecated = "Use `set_send_encodings()` instead."] pub fn send_encodings(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_send_encodings(val); self } - #[doc = "Change the `streams` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpTransceiverInit`*"] + #[deprecated = "Use `set_streams()` instead."] pub fn streams(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_streams(val); self diff --git a/crates/web-sys/src/features/gen_RtcRtxParameters.rs b/crates/web-sys/src/features/gen_RtcRtxParameters.rs index 7d1bdc86719e..6fef2de956b6 100644 --- a/crates/web-sys/src/features/gen_RtcRtxParameters.rs +++ b/crates/web-sys/src/features/gen_RtcRtxParameters.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RtcRtxParameters`*"] #[wasm_bindgen(method, getter = "ssrc")] pub fn get_ssrc(this: &RtcRtxParameters) -> Option; + #[doc = "Change the `ssrc` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtxParameters`*"] #[wasm_bindgen(method, setter = "ssrc")] - fn set_ssrc(this: &RtcRtxParameters, val: u32); + pub fn set_ssrc(this: &RtcRtxParameters, val: u32); } impl RtcRtxParameters { #[doc = "Construct a new `RtcRtxParameters`."] @@ -27,9 +30,7 @@ impl RtcRtxParameters { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `ssrc` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtxParameters`*"] + #[deprecated = "Use `set_ssrc()` instead."] pub fn ssrc(&mut self, val: u32) -> &mut Self { self.set_ssrc(val); self diff --git a/crates/web-sys/src/features/gen_RtcSessionDescriptionInit.rs b/crates/web-sys/src/features/gen_RtcSessionDescriptionInit.rs index de45b4bf2a14..7c159a09ef2e 100644 --- a/crates/web-sys/src/features/gen_RtcSessionDescriptionInit.rs +++ b/crates/web-sys/src/features/gen_RtcSessionDescriptionInit.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RtcSessionDescriptionInit`*"] #[wasm_bindgen(method, getter = "sdp")] pub fn get_sdp(this: &RtcSessionDescriptionInit) -> Option; + #[doc = "Change the `sdp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcSessionDescriptionInit`*"] #[wasm_bindgen(method, setter = "sdp")] - fn set_sdp(this: &RtcSessionDescriptionInit, val: &str); + pub fn set_sdp(this: &RtcSessionDescriptionInit, val: &str); #[cfg(feature = "RtcSdpType")] #[doc = "Get the `type` field of this object."] #[doc = ""] @@ -24,8 +27,11 @@ extern "C" { #[wasm_bindgen(method, getter = "type")] pub fn get_type(this: &RtcSessionDescriptionInit) -> RtcSdpType; #[cfg(feature = "RtcSdpType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcSdpType`, `RtcSessionDescriptionInit`*"] #[wasm_bindgen(method, setter = "type")] - fn set_type(this: &RtcSessionDescriptionInit, val: RtcSdpType); + pub fn set_type(this: &RtcSessionDescriptionInit, val: RtcSdpType); } impl RtcSessionDescriptionInit { #[cfg(feature = "RtcSdpType")] @@ -38,17 +44,13 @@ impl RtcSessionDescriptionInit { ret.type_(type_); ret } - #[doc = "Change the `sdp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcSessionDescriptionInit`*"] + #[deprecated = "Use `set_sdp()` instead."] pub fn sdp(&mut self, val: &str) -> &mut Self { self.set_sdp(val); self } #[cfg(feature = "RtcSdpType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcSdpType`, `RtcSessionDescriptionInit`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: RtcSdpType) -> &mut Self { self.set_type(val); self diff --git a/crates/web-sys/src/features/gen_RtcStats.rs b/crates/web-sys/src/features/gen_RtcStats.rs index b21528702b89..76e02fe410b2 100644 --- a/crates/web-sys/src/features/gen_RtcStats.rs +++ b/crates/web-sys/src/features/gen_RtcStats.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RtcStats`*"] #[wasm_bindgen(method, getter = "id")] pub fn get_id(this: &RtcStats) -> Option; + #[doc = "Change the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStats`*"] #[wasm_bindgen(method, setter = "id")] - fn set_id(this: &RtcStats, val: &str); + pub fn set_id(this: &RtcStats, val: &str); #[doc = "Get the `timestamp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcStats`*"] #[wasm_bindgen(method, getter = "timestamp")] pub fn get_timestamp(this: &RtcStats) -> Option; + #[doc = "Change the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStats`*"] #[wasm_bindgen(method, setter = "timestamp")] - fn set_timestamp(this: &RtcStats, val: f64); + pub fn set_timestamp(this: &RtcStats, val: f64); #[cfg(feature = "RtcStatsType")] #[doc = "Get the `type` field of this object."] #[doc = ""] @@ -31,8 +37,11 @@ extern "C" { #[wasm_bindgen(method, getter = "type")] pub fn get_type(this: &RtcStats) -> Option; #[cfg(feature = "RtcStatsType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStats`, `RtcStatsType`*"] #[wasm_bindgen(method, setter = "type")] - fn set_type(this: &RtcStats, val: RtcStatsType); + pub fn set_type(this: &RtcStats, val: RtcStatsType); } impl RtcStats { #[doc = "Construct a new `RtcStats`."] @@ -43,24 +52,18 @@ impl RtcStats { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `id` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcStats`*"] + #[deprecated = "Use `set_id()` instead."] pub fn id(&mut self, val: &str) -> &mut Self { self.set_id(val); self } - #[doc = "Change the `timestamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcStats`*"] + #[deprecated = "Use `set_timestamp()` instead."] pub fn timestamp(&mut self, val: f64) -> &mut Self { self.set_timestamp(val); self } #[cfg(feature = "RtcStatsType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcStats`, `RtcStatsType`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: RtcStatsType) -> &mut Self { self.set_type(val); self diff --git a/crates/web-sys/src/features/gen_RtcStatsReportInternal.rs b/crates/web-sys/src/features/gen_RtcStatsReportInternal.rs index 0bd4785e0c70..620270ec5983 100644 --- a/crates/web-sys/src/features/gen_RtcStatsReportInternal.rs +++ b/crates/web-sys/src/features/gen_RtcStatsReportInternal.rs @@ -15,120 +15,183 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, getter = "closed")] pub fn get_closed(this: &RtcStatsReportInternal) -> Option; + #[doc = "Change the `closed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, setter = "closed")] - fn set_closed(this: &RtcStatsReportInternal, val: bool); + pub fn set_closed(this: &RtcStatsReportInternal, val: bool); #[doc = "Get the `codecStats` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, getter = "codecStats")] pub fn get_codec_stats(this: &RtcStatsReportInternal) -> Option<::js_sys::Array>; + #[doc = "Change the `codecStats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, setter = "codecStats")] - fn set_codec_stats(this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue); + pub fn set_codec_stats(this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue); #[doc = "Get the `iceCandidatePairStats` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, getter = "iceCandidatePairStats")] pub fn get_ice_candidate_pair_stats(this: &RtcStatsReportInternal) -> Option<::js_sys::Array>; + #[doc = "Change the `iceCandidatePairStats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, setter = "iceCandidatePairStats")] - fn set_ice_candidate_pair_stats(this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue); + pub fn set_ice_candidate_pair_stats( + this: &RtcStatsReportInternal, + val: &::wasm_bindgen::JsValue, + ); #[doc = "Get the `iceCandidateStats` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, getter = "iceCandidateStats")] pub fn get_ice_candidate_stats(this: &RtcStatsReportInternal) -> Option<::js_sys::Array>; + #[doc = "Change the `iceCandidateStats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, setter = "iceCandidateStats")] - fn set_ice_candidate_stats(this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue); + pub fn set_ice_candidate_stats(this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue); #[doc = "Get the `iceComponentStats` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, getter = "iceComponentStats")] pub fn get_ice_component_stats(this: &RtcStatsReportInternal) -> Option<::js_sys::Array>; + #[doc = "Change the `iceComponentStats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, setter = "iceComponentStats")] - fn set_ice_component_stats(this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue); + pub fn set_ice_component_stats(this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue); #[doc = "Get the `iceRestarts` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, getter = "iceRestarts")] pub fn get_ice_restarts(this: &RtcStatsReportInternal) -> Option; + #[doc = "Change the `iceRestarts` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, setter = "iceRestarts")] - fn set_ice_restarts(this: &RtcStatsReportInternal, val: u32); + pub fn set_ice_restarts(this: &RtcStatsReportInternal, val: u32); #[doc = "Get the `iceRollbacks` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, getter = "iceRollbacks")] pub fn get_ice_rollbacks(this: &RtcStatsReportInternal) -> Option; + #[doc = "Change the `iceRollbacks` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, setter = "iceRollbacks")] - fn set_ice_rollbacks(this: &RtcStatsReportInternal, val: u32); + pub fn set_ice_rollbacks(this: &RtcStatsReportInternal, val: u32); #[doc = "Get the `inboundRTPStreamStats` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, getter = "inboundRTPStreamStats")] pub fn get_inbound_rtp_stream_stats(this: &RtcStatsReportInternal) -> Option<::js_sys::Array>; + #[doc = "Change the `inboundRTPStreamStats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, setter = "inboundRTPStreamStats")] - fn set_inbound_rtp_stream_stats(this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue); + pub fn set_inbound_rtp_stream_stats( + this: &RtcStatsReportInternal, + val: &::wasm_bindgen::JsValue, + ); #[doc = "Get the `localSdp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, getter = "localSdp")] pub fn get_local_sdp(this: &RtcStatsReportInternal) -> Option; + #[doc = "Change the `localSdp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, setter = "localSdp")] - fn set_local_sdp(this: &RtcStatsReportInternal, val: &str); + pub fn set_local_sdp(this: &RtcStatsReportInternal, val: &str); #[doc = "Get the `mediaStreamStats` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, getter = "mediaStreamStats")] pub fn get_media_stream_stats(this: &RtcStatsReportInternal) -> Option<::js_sys::Array>; + #[doc = "Change the `mediaStreamStats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, setter = "mediaStreamStats")] - fn set_media_stream_stats(this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue); + pub fn set_media_stream_stats(this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue); #[doc = "Get the `mediaStreamTrackStats` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, getter = "mediaStreamTrackStats")] pub fn get_media_stream_track_stats(this: &RtcStatsReportInternal) -> Option<::js_sys::Array>; + #[doc = "Change the `mediaStreamTrackStats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, setter = "mediaStreamTrackStats")] - fn set_media_stream_track_stats(this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue); + pub fn set_media_stream_track_stats( + this: &RtcStatsReportInternal, + val: &::wasm_bindgen::JsValue, + ); #[doc = "Get the `offerer` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, getter = "offerer")] pub fn get_offerer(this: &RtcStatsReportInternal) -> Option; + #[doc = "Change the `offerer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, setter = "offerer")] - fn set_offerer(this: &RtcStatsReportInternal, val: bool); + pub fn set_offerer(this: &RtcStatsReportInternal, val: bool); #[doc = "Get the `outboundRTPStreamStats` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, getter = "outboundRTPStreamStats")] pub fn get_outbound_rtp_stream_stats(this: &RtcStatsReportInternal) -> Option<::js_sys::Array>; + #[doc = "Change the `outboundRTPStreamStats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, setter = "outboundRTPStreamStats")] - fn set_outbound_rtp_stream_stats(this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue); + pub fn set_outbound_rtp_stream_stats( + this: &RtcStatsReportInternal, + val: &::wasm_bindgen::JsValue, + ); #[doc = "Get the `pcid` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, getter = "pcid")] pub fn get_pcid(this: &RtcStatsReportInternal) -> Option; + #[doc = "Change the `pcid` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, setter = "pcid")] - fn set_pcid(this: &RtcStatsReportInternal, val: &str); + pub fn set_pcid(this: &RtcStatsReportInternal, val: &str); #[doc = "Get the `rawLocalCandidates` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, getter = "rawLocalCandidates")] pub fn get_raw_local_candidates(this: &RtcStatsReportInternal) -> Option<::js_sys::Array>; + #[doc = "Change the `rawLocalCandidates` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, setter = "rawLocalCandidates")] - fn set_raw_local_candidates(this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue); + pub fn set_raw_local_candidates(this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue); #[doc = "Get the `rawRemoteCandidates` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, getter = "rawRemoteCandidates")] pub fn get_raw_remote_candidates(this: &RtcStatsReportInternal) -> Option<::js_sys::Array>; + #[doc = "Change the `rawRemoteCandidates` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, setter = "rawRemoteCandidates")] - fn set_raw_remote_candidates(this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue); + pub fn set_raw_remote_candidates(this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue); #[doc = "Get the `remoteSdp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, getter = "remoteSdp")] pub fn get_remote_sdp(this: &RtcStatsReportInternal) -> Option; + #[doc = "Change the `remoteSdp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, setter = "remoteSdp")] - fn set_remote_sdp(this: &RtcStatsReportInternal, val: &str); + pub fn set_remote_sdp(this: &RtcStatsReportInternal, val: &str); #[doc = "Get the `rtpContributingSourceStats` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] @@ -136,8 +199,11 @@ extern "C" { pub fn get_rtp_contributing_source_stats( this: &RtcStatsReportInternal, ) -> Option<::js_sys::Array>; + #[doc = "Change the `rtpContributingSourceStats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, setter = "rtpContributingSourceStats")] - fn set_rtp_contributing_source_stats( + pub fn set_rtp_contributing_source_stats( this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue, ); @@ -146,15 +212,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, getter = "timestamp")] pub fn get_timestamp(this: &RtcStatsReportInternal) -> Option; + #[doc = "Change the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, setter = "timestamp")] - fn set_timestamp(this: &RtcStatsReportInternal, val: f64); + pub fn set_timestamp(this: &RtcStatsReportInternal, val: f64); #[doc = "Get the `transportStats` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, getter = "transportStats")] pub fn get_transport_stats(this: &RtcStatsReportInternal) -> Option<::js_sys::Array>; + #[doc = "Change the `transportStats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, setter = "transportStats")] - fn set_transport_stats(this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue); + pub fn set_transport_stats(this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue); #[doc = "Get the `trickledIceCandidateStats` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] @@ -162,8 +234,11 @@ extern "C" { pub fn get_trickled_ice_candidate_stats( this: &RtcStatsReportInternal, ) -> Option<::js_sys::Array>; + #[doc = "Change the `trickledIceCandidateStats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, setter = "trickledIceCandidateStats")] - fn set_trickled_ice_candidate_stats( + pub fn set_trickled_ice_candidate_stats( this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue, ); @@ -177,149 +252,107 @@ impl RtcStatsReportInternal { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `closed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[deprecated = "Use `set_closed()` instead."] pub fn closed(&mut self, val: bool) -> &mut Self { self.set_closed(val); self } - #[doc = "Change the `codecStats` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[deprecated = "Use `set_codec_stats()` instead."] pub fn codec_stats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_codec_stats(val); self } - #[doc = "Change the `iceCandidatePairStats` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[deprecated = "Use `set_ice_candidate_pair_stats()` instead."] pub fn ice_candidate_pair_stats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_ice_candidate_pair_stats(val); self } - #[doc = "Change the `iceCandidateStats` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[deprecated = "Use `set_ice_candidate_stats()` instead."] pub fn ice_candidate_stats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_ice_candidate_stats(val); self } - #[doc = "Change the `iceComponentStats` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[deprecated = "Use `set_ice_component_stats()` instead."] pub fn ice_component_stats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_ice_component_stats(val); self } - #[doc = "Change the `iceRestarts` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[deprecated = "Use `set_ice_restarts()` instead."] pub fn ice_restarts(&mut self, val: u32) -> &mut Self { self.set_ice_restarts(val); self } - #[doc = "Change the `iceRollbacks` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[deprecated = "Use `set_ice_rollbacks()` instead."] pub fn ice_rollbacks(&mut self, val: u32) -> &mut Self { self.set_ice_rollbacks(val); self } - #[doc = "Change the `inboundRTPStreamStats` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[deprecated = "Use `set_inbound_rtp_stream_stats()` instead."] pub fn inbound_rtp_stream_stats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_inbound_rtp_stream_stats(val); self } - #[doc = "Change the `localSdp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[deprecated = "Use `set_local_sdp()` instead."] pub fn local_sdp(&mut self, val: &str) -> &mut Self { self.set_local_sdp(val); self } - #[doc = "Change the `mediaStreamStats` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[deprecated = "Use `set_media_stream_stats()` instead."] pub fn media_stream_stats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_media_stream_stats(val); self } - #[doc = "Change the `mediaStreamTrackStats` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[deprecated = "Use `set_media_stream_track_stats()` instead."] pub fn media_stream_track_stats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_media_stream_track_stats(val); self } - #[doc = "Change the `offerer` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[deprecated = "Use `set_offerer()` instead."] pub fn offerer(&mut self, val: bool) -> &mut Self { self.set_offerer(val); self } - #[doc = "Change the `outboundRTPStreamStats` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[deprecated = "Use `set_outbound_rtp_stream_stats()` instead."] pub fn outbound_rtp_stream_stats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_outbound_rtp_stream_stats(val); self } - #[doc = "Change the `pcid` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[deprecated = "Use `set_pcid()` instead."] pub fn pcid(&mut self, val: &str) -> &mut Self { self.set_pcid(val); self } - #[doc = "Change the `rawLocalCandidates` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[deprecated = "Use `set_raw_local_candidates()` instead."] pub fn raw_local_candidates(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_raw_local_candidates(val); self } - #[doc = "Change the `rawRemoteCandidates` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[deprecated = "Use `set_raw_remote_candidates()` instead."] pub fn raw_remote_candidates(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_raw_remote_candidates(val); self } - #[doc = "Change the `remoteSdp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[deprecated = "Use `set_remote_sdp()` instead."] pub fn remote_sdp(&mut self, val: &str) -> &mut Self { self.set_remote_sdp(val); self } - #[doc = "Change the `rtpContributingSourceStats` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[deprecated = "Use `set_rtp_contributing_source_stats()` instead."] pub fn rtp_contributing_source_stats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_rtp_contributing_source_stats(val); self } - #[doc = "Change the `timestamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[deprecated = "Use `set_timestamp()` instead."] pub fn timestamp(&mut self, val: f64) -> &mut Self { self.set_timestamp(val); self } - #[doc = "Change the `transportStats` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[deprecated = "Use `set_transport_stats()` instead."] pub fn transport_stats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_transport_stats(val); self } - #[doc = "Change the `trickledIceCandidateStats` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[deprecated = "Use `set_trickled_ice_candidate_stats()` instead."] pub fn trickled_ice_candidate_stats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_trickled_ice_candidate_stats(val); self diff --git a/crates/web-sys/src/features/gen_RtcTrackEventInit.rs b/crates/web-sys/src/features/gen_RtcTrackEventInit.rs index 64f833ee96b4..e76dc70c25d0 100644 --- a/crates/web-sys/src/features/gen_RtcTrackEventInit.rs +++ b/crates/web-sys/src/features/gen_RtcTrackEventInit.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RtcTrackEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &RtcTrackEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcTrackEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &RtcTrackEventInit, val: bool); + pub fn set_bubbles(this: &RtcTrackEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcTrackEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &RtcTrackEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcTrackEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &RtcTrackEventInit, val: bool); + pub fn set_cancelable(this: &RtcTrackEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcTrackEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &RtcTrackEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcTrackEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &RtcTrackEventInit, val: bool); + pub fn set_composed(this: &RtcTrackEventInit, val: bool); #[cfg(feature = "RtcRtpReceiver")] #[doc = "Get the `receiver` field of this object."] #[doc = ""] @@ -38,15 +47,21 @@ extern "C" { #[wasm_bindgen(method, getter = "receiver")] pub fn get_receiver(this: &RtcTrackEventInit) -> RtcRtpReceiver; #[cfg(feature = "RtcRtpReceiver")] + #[doc = "Change the `receiver` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpReceiver`, `RtcTrackEventInit`*"] #[wasm_bindgen(method, setter = "receiver")] - fn set_receiver(this: &RtcTrackEventInit, val: &RtcRtpReceiver); + pub fn set_receiver(this: &RtcTrackEventInit, val: &RtcRtpReceiver); #[doc = "Get the `streams` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcTrackEventInit`*"] #[wasm_bindgen(method, getter = "streams")] pub fn get_streams(this: &RtcTrackEventInit) -> Option<::js_sys::Array>; + #[doc = "Change the `streams` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcTrackEventInit`*"] #[wasm_bindgen(method, setter = "streams")] - fn set_streams(this: &RtcTrackEventInit, val: &::wasm_bindgen::JsValue); + pub fn set_streams(this: &RtcTrackEventInit, val: &::wasm_bindgen::JsValue); #[cfg(feature = "MediaStreamTrack")] #[doc = "Get the `track` field of this object."] #[doc = ""] @@ -54,8 +69,11 @@ extern "C" { #[wasm_bindgen(method, getter = "track")] pub fn get_track(this: &RtcTrackEventInit) -> MediaStreamTrack; #[cfg(feature = "MediaStreamTrack")] + #[doc = "Change the `track` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrack`, `RtcTrackEventInit`*"] #[wasm_bindgen(method, setter = "track")] - fn set_track(this: &RtcTrackEventInit, val: &MediaStreamTrack); + pub fn set_track(this: &RtcTrackEventInit, val: &MediaStreamTrack); #[cfg(feature = "RtcRtpTransceiver")] #[doc = "Get the `transceiver` field of this object."] #[doc = ""] @@ -63,8 +81,11 @@ extern "C" { #[wasm_bindgen(method, getter = "transceiver")] pub fn get_transceiver(this: &RtcTrackEventInit) -> RtcRtpTransceiver; #[cfg(feature = "RtcRtpTransceiver")] + #[doc = "Change the `transceiver` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpTransceiver`, `RtcTrackEventInit`*"] #[wasm_bindgen(method, setter = "transceiver")] - fn set_transceiver(this: &RtcTrackEventInit, val: &RtcRtpTransceiver); + pub fn set_transceiver(this: &RtcTrackEventInit, val: &RtcRtpTransceiver); } impl RtcTrackEventInit { #[cfg(all( @@ -87,54 +108,40 @@ impl RtcTrackEventInit { ret.transceiver(transceiver); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcTrackEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcTrackEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcTrackEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } #[cfg(feature = "RtcRtpReceiver")] - #[doc = "Change the `receiver` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpReceiver`, `RtcTrackEventInit`*"] + #[deprecated = "Use `set_receiver()` instead."] pub fn receiver(&mut self, val: &RtcRtpReceiver) -> &mut Self { self.set_receiver(val); self } - #[doc = "Change the `streams` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcTrackEventInit`*"] + #[deprecated = "Use `set_streams()` instead."] pub fn streams(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_streams(val); self } #[cfg(feature = "MediaStreamTrack")] - #[doc = "Change the `track` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrack`, `RtcTrackEventInit`*"] + #[deprecated = "Use `set_track()` instead."] pub fn track(&mut self, val: &MediaStreamTrack) -> &mut Self { self.set_track(val); self } #[cfg(feature = "RtcRtpTransceiver")] - #[doc = "Change the `transceiver` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpTransceiver`, `RtcTrackEventInit`*"] + #[deprecated = "Use `set_transceiver()` instead."] pub fn transceiver(&mut self, val: &RtcRtpTransceiver) -> &mut Self { self.set_transceiver(val); self diff --git a/crates/web-sys/src/features/gen_RtcTransportStats.rs b/crates/web-sys/src/features/gen_RtcTransportStats.rs index 08d1c5b4c64e..6564b4c1fab4 100644 --- a/crates/web-sys/src/features/gen_RtcTransportStats.rs +++ b/crates/web-sys/src/features/gen_RtcTransportStats.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RtcTransportStats`*"] #[wasm_bindgen(method, getter = "id")] pub fn get_id(this: &RtcTransportStats) -> Option; + #[doc = "Change the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcTransportStats`*"] #[wasm_bindgen(method, setter = "id")] - fn set_id(this: &RtcTransportStats, val: &str); + pub fn set_id(this: &RtcTransportStats, val: &str); #[doc = "Get the `timestamp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcTransportStats`*"] #[wasm_bindgen(method, getter = "timestamp")] pub fn get_timestamp(this: &RtcTransportStats) -> Option; + #[doc = "Change the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcTransportStats`*"] #[wasm_bindgen(method, setter = "timestamp")] - fn set_timestamp(this: &RtcTransportStats, val: f64); + pub fn set_timestamp(this: &RtcTransportStats, val: f64); #[cfg(feature = "RtcStatsType")] #[doc = "Get the `type` field of this object."] #[doc = ""] @@ -31,22 +37,31 @@ extern "C" { #[wasm_bindgen(method, getter = "type")] pub fn get_type(this: &RtcTransportStats) -> Option; #[cfg(feature = "RtcStatsType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsType`, `RtcTransportStats`*"] #[wasm_bindgen(method, setter = "type")] - fn set_type(this: &RtcTransportStats, val: RtcStatsType); + pub fn set_type(this: &RtcTransportStats, val: RtcStatsType); #[doc = "Get the `bytesReceived` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcTransportStats`*"] #[wasm_bindgen(method, getter = "bytesReceived")] pub fn get_bytes_received(this: &RtcTransportStats) -> Option; + #[doc = "Change the `bytesReceived` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcTransportStats`*"] #[wasm_bindgen(method, setter = "bytesReceived")] - fn set_bytes_received(this: &RtcTransportStats, val: u32); + pub fn set_bytes_received(this: &RtcTransportStats, val: u32); #[doc = "Get the `bytesSent` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcTransportStats`*"] #[wasm_bindgen(method, getter = "bytesSent")] pub fn get_bytes_sent(this: &RtcTransportStats) -> Option; + #[doc = "Change the `bytesSent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcTransportStats`*"] #[wasm_bindgen(method, setter = "bytesSent")] - fn set_bytes_sent(this: &RtcTransportStats, val: u32); + pub fn set_bytes_sent(this: &RtcTransportStats, val: u32); } impl RtcTransportStats { #[doc = "Construct a new `RtcTransportStats`."] @@ -57,38 +72,28 @@ impl RtcTransportStats { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `id` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcTransportStats`*"] + #[deprecated = "Use `set_id()` instead."] pub fn id(&mut self, val: &str) -> &mut Self { self.set_id(val); self } - #[doc = "Change the `timestamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcTransportStats`*"] + #[deprecated = "Use `set_timestamp()` instead."] pub fn timestamp(&mut self, val: f64) -> &mut Self { self.set_timestamp(val); self } #[cfg(feature = "RtcStatsType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcStatsType`, `RtcTransportStats`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: RtcStatsType) -> &mut Self { self.set_type(val); self } - #[doc = "Change the `bytesReceived` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcTransportStats`*"] + #[deprecated = "Use `set_bytes_received()` instead."] pub fn bytes_received(&mut self, val: u32) -> &mut Self { self.set_bytes_received(val); self } - #[doc = "Change the `bytesSent` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcTransportStats`*"] + #[deprecated = "Use `set_bytes_sent()` instead."] pub fn bytes_sent(&mut self, val: u32) -> &mut Self { self.set_bytes_sent(val); self diff --git a/crates/web-sys/src/features/gen_RtcdtmfToneChangeEventInit.rs b/crates/web-sys/src/features/gen_RtcdtmfToneChangeEventInit.rs index f149d02dd93e..760ea9dceff3 100644 --- a/crates/web-sys/src/features/gen_RtcdtmfToneChangeEventInit.rs +++ b/crates/web-sys/src/features/gen_RtcdtmfToneChangeEventInit.rs @@ -15,29 +15,41 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RtcdtmfToneChangeEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &RtcdtmfToneChangeEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcdtmfToneChangeEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &RtcdtmfToneChangeEventInit, val: bool); + pub fn set_bubbles(this: &RtcdtmfToneChangeEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcdtmfToneChangeEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &RtcdtmfToneChangeEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcdtmfToneChangeEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &RtcdtmfToneChangeEventInit, val: bool); + pub fn set_cancelable(this: &RtcdtmfToneChangeEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcdtmfToneChangeEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &RtcdtmfToneChangeEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcdtmfToneChangeEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &RtcdtmfToneChangeEventInit, val: bool); + pub fn set_composed(this: &RtcdtmfToneChangeEventInit, val: bool); #[doc = "Get the `tone` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcdtmfToneChangeEventInit`*"] #[wasm_bindgen(method, getter = "tone")] pub fn get_tone(this: &RtcdtmfToneChangeEventInit) -> Option; + #[doc = "Change the `tone` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcdtmfToneChangeEventInit`*"] #[wasm_bindgen(method, setter = "tone")] - fn set_tone(this: &RtcdtmfToneChangeEventInit, val: &str); + pub fn set_tone(this: &RtcdtmfToneChangeEventInit, val: &str); } impl RtcdtmfToneChangeEventInit { #[doc = "Construct a new `RtcdtmfToneChangeEventInit`."] @@ -48,30 +60,22 @@ impl RtcdtmfToneChangeEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcdtmfToneChangeEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcdtmfToneChangeEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcdtmfToneChangeEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } - #[doc = "Change the `tone` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcdtmfToneChangeEventInit`*"] + #[deprecated = "Use `set_tone()` instead."] pub fn tone(&mut self, val: &str) -> &mut Self { self.set_tone(val); self diff --git a/crates/web-sys/src/features/gen_RtcrtpContributingSourceStats.rs b/crates/web-sys/src/features/gen_RtcrtpContributingSourceStats.rs index 93c193f2713b..c072f9880650 100644 --- a/crates/web-sys/src/features/gen_RtcrtpContributingSourceStats.rs +++ b/crates/web-sys/src/features/gen_RtcrtpContributingSourceStats.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RtcrtpContributingSourceStats`*"] #[wasm_bindgen(method, getter = "id")] pub fn get_id(this: &RtcrtpContributingSourceStats) -> Option; + #[doc = "Change the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpContributingSourceStats`*"] #[wasm_bindgen(method, setter = "id")] - fn set_id(this: &RtcrtpContributingSourceStats, val: &str); + pub fn set_id(this: &RtcrtpContributingSourceStats, val: &str); #[doc = "Get the `timestamp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcrtpContributingSourceStats`*"] #[wasm_bindgen(method, getter = "timestamp")] pub fn get_timestamp(this: &RtcrtpContributingSourceStats) -> Option; + #[doc = "Change the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpContributingSourceStats`*"] #[wasm_bindgen(method, setter = "timestamp")] - fn set_timestamp(this: &RtcrtpContributingSourceStats, val: f64); + pub fn set_timestamp(this: &RtcrtpContributingSourceStats, val: f64); #[cfg(feature = "RtcStatsType")] #[doc = "Get the `type` field of this object."] #[doc = ""] @@ -31,22 +37,31 @@ extern "C" { #[wasm_bindgen(method, getter = "type")] pub fn get_type(this: &RtcrtpContributingSourceStats) -> Option; #[cfg(feature = "RtcStatsType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsType`, `RtcrtpContributingSourceStats`*"] #[wasm_bindgen(method, setter = "type")] - fn set_type(this: &RtcrtpContributingSourceStats, val: RtcStatsType); + pub fn set_type(this: &RtcrtpContributingSourceStats, val: RtcStatsType); #[doc = "Get the `contributorSsrc` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcrtpContributingSourceStats`*"] #[wasm_bindgen(method, getter = "contributorSsrc")] pub fn get_contributor_ssrc(this: &RtcrtpContributingSourceStats) -> Option; + #[doc = "Change the `contributorSsrc` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpContributingSourceStats`*"] #[wasm_bindgen(method, setter = "contributorSsrc")] - fn set_contributor_ssrc(this: &RtcrtpContributingSourceStats, val: u32); + pub fn set_contributor_ssrc(this: &RtcrtpContributingSourceStats, val: u32); #[doc = "Get the `inboundRtpStreamId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcrtpContributingSourceStats`*"] #[wasm_bindgen(method, getter = "inboundRtpStreamId")] pub fn get_inbound_rtp_stream_id(this: &RtcrtpContributingSourceStats) -> Option; + #[doc = "Change the `inboundRtpStreamId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpContributingSourceStats`*"] #[wasm_bindgen(method, setter = "inboundRtpStreamId")] - fn set_inbound_rtp_stream_id(this: &RtcrtpContributingSourceStats, val: &str); + pub fn set_inbound_rtp_stream_id(this: &RtcrtpContributingSourceStats, val: &str); } impl RtcrtpContributingSourceStats { #[doc = "Construct a new `RtcrtpContributingSourceStats`."] @@ -57,38 +72,28 @@ impl RtcrtpContributingSourceStats { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `id` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcrtpContributingSourceStats`*"] + #[deprecated = "Use `set_id()` instead."] pub fn id(&mut self, val: &str) -> &mut Self { self.set_id(val); self } - #[doc = "Change the `timestamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcrtpContributingSourceStats`*"] + #[deprecated = "Use `set_timestamp()` instead."] pub fn timestamp(&mut self, val: f64) -> &mut Self { self.set_timestamp(val); self } #[cfg(feature = "RtcStatsType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcStatsType`, `RtcrtpContributingSourceStats`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: RtcStatsType) -> &mut Self { self.set_type(val); self } - #[doc = "Change the `contributorSsrc` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcrtpContributingSourceStats`*"] + #[deprecated = "Use `set_contributor_ssrc()` instead."] pub fn contributor_ssrc(&mut self, val: u32) -> &mut Self { self.set_contributor_ssrc(val); self } - #[doc = "Change the `inboundRtpStreamId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcrtpContributingSourceStats`*"] + #[deprecated = "Use `set_inbound_rtp_stream_id()` instead."] pub fn inbound_rtp_stream_id(&mut self, val: &str) -> &mut Self { self.set_inbound_rtp_stream_id(val); self diff --git a/crates/web-sys/src/features/gen_RtcrtpStreamStats.rs b/crates/web-sys/src/features/gen_RtcrtpStreamStats.rs index 6c10f0a0a0cd..8348f7fecfff 100644 --- a/crates/web-sys/src/features/gen_RtcrtpStreamStats.rs +++ b/crates/web-sys/src/features/gen_RtcrtpStreamStats.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] #[wasm_bindgen(method, getter = "id")] pub fn get_id(this: &RtcrtpStreamStats) -> Option; + #[doc = "Change the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] #[wasm_bindgen(method, setter = "id")] - fn set_id(this: &RtcrtpStreamStats, val: &str); + pub fn set_id(this: &RtcrtpStreamStats, val: &str); #[doc = "Get the `timestamp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] #[wasm_bindgen(method, getter = "timestamp")] pub fn get_timestamp(this: &RtcrtpStreamStats) -> Option; + #[doc = "Change the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] #[wasm_bindgen(method, setter = "timestamp")] - fn set_timestamp(this: &RtcrtpStreamStats, val: f64); + pub fn set_timestamp(this: &RtcrtpStreamStats, val: f64); #[cfg(feature = "RtcStatsType")] #[doc = "Get the `type` field of this object."] #[doc = ""] @@ -31,106 +37,151 @@ extern "C" { #[wasm_bindgen(method, getter = "type")] pub fn get_type(this: &RtcrtpStreamStats) -> Option; #[cfg(feature = "RtcStatsType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsType`, `RtcrtpStreamStats`*"] #[wasm_bindgen(method, setter = "type")] - fn set_type(this: &RtcrtpStreamStats, val: RtcStatsType); + pub fn set_type(this: &RtcrtpStreamStats, val: RtcStatsType); #[doc = "Get the `bitrateMean` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] #[wasm_bindgen(method, getter = "bitrateMean")] pub fn get_bitrate_mean(this: &RtcrtpStreamStats) -> Option; + #[doc = "Change the `bitrateMean` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] #[wasm_bindgen(method, setter = "bitrateMean")] - fn set_bitrate_mean(this: &RtcrtpStreamStats, val: f64); + pub fn set_bitrate_mean(this: &RtcrtpStreamStats, val: f64); #[doc = "Get the `bitrateStdDev` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] #[wasm_bindgen(method, getter = "bitrateStdDev")] pub fn get_bitrate_std_dev(this: &RtcrtpStreamStats) -> Option; + #[doc = "Change the `bitrateStdDev` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] #[wasm_bindgen(method, setter = "bitrateStdDev")] - fn set_bitrate_std_dev(this: &RtcrtpStreamStats, val: f64); + pub fn set_bitrate_std_dev(this: &RtcrtpStreamStats, val: f64); #[doc = "Get the `codecId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] #[wasm_bindgen(method, getter = "codecId")] pub fn get_codec_id(this: &RtcrtpStreamStats) -> Option; + #[doc = "Change the `codecId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] #[wasm_bindgen(method, setter = "codecId")] - fn set_codec_id(this: &RtcrtpStreamStats, val: &str); + pub fn set_codec_id(this: &RtcrtpStreamStats, val: &str); #[doc = "Get the `firCount` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] #[wasm_bindgen(method, getter = "firCount")] pub fn get_fir_count(this: &RtcrtpStreamStats) -> Option; + #[doc = "Change the `firCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] #[wasm_bindgen(method, setter = "firCount")] - fn set_fir_count(this: &RtcrtpStreamStats, val: u32); + pub fn set_fir_count(this: &RtcrtpStreamStats, val: u32); #[doc = "Get the `framerateMean` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] #[wasm_bindgen(method, getter = "framerateMean")] pub fn get_framerate_mean(this: &RtcrtpStreamStats) -> Option; + #[doc = "Change the `framerateMean` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] #[wasm_bindgen(method, setter = "framerateMean")] - fn set_framerate_mean(this: &RtcrtpStreamStats, val: f64); + pub fn set_framerate_mean(this: &RtcrtpStreamStats, val: f64); #[doc = "Get the `framerateStdDev` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] #[wasm_bindgen(method, getter = "framerateStdDev")] pub fn get_framerate_std_dev(this: &RtcrtpStreamStats) -> Option; + #[doc = "Change the `framerateStdDev` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] #[wasm_bindgen(method, setter = "framerateStdDev")] - fn set_framerate_std_dev(this: &RtcrtpStreamStats, val: f64); + pub fn set_framerate_std_dev(this: &RtcrtpStreamStats, val: f64); #[doc = "Get the `isRemote` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] #[wasm_bindgen(method, getter = "isRemote")] pub fn get_is_remote(this: &RtcrtpStreamStats) -> Option; + #[doc = "Change the `isRemote` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] #[wasm_bindgen(method, setter = "isRemote")] - fn set_is_remote(this: &RtcrtpStreamStats, val: bool); + pub fn set_is_remote(this: &RtcrtpStreamStats, val: bool); #[doc = "Get the `mediaTrackId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] #[wasm_bindgen(method, getter = "mediaTrackId")] pub fn get_media_track_id(this: &RtcrtpStreamStats) -> Option; + #[doc = "Change the `mediaTrackId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] #[wasm_bindgen(method, setter = "mediaTrackId")] - fn set_media_track_id(this: &RtcrtpStreamStats, val: &str); + pub fn set_media_track_id(this: &RtcrtpStreamStats, val: &str); #[doc = "Get the `mediaType` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] #[wasm_bindgen(method, getter = "mediaType")] pub fn get_media_type(this: &RtcrtpStreamStats) -> Option; + #[doc = "Change the `mediaType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] #[wasm_bindgen(method, setter = "mediaType")] - fn set_media_type(this: &RtcrtpStreamStats, val: &str); + pub fn set_media_type(this: &RtcrtpStreamStats, val: &str); #[doc = "Get the `nackCount` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] #[wasm_bindgen(method, getter = "nackCount")] pub fn get_nack_count(this: &RtcrtpStreamStats) -> Option; + #[doc = "Change the `nackCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] #[wasm_bindgen(method, setter = "nackCount")] - fn set_nack_count(this: &RtcrtpStreamStats, val: u32); + pub fn set_nack_count(this: &RtcrtpStreamStats, val: u32); #[doc = "Get the `pliCount` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] #[wasm_bindgen(method, getter = "pliCount")] pub fn get_pli_count(this: &RtcrtpStreamStats) -> Option; + #[doc = "Change the `pliCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] #[wasm_bindgen(method, setter = "pliCount")] - fn set_pli_count(this: &RtcrtpStreamStats, val: u32); + pub fn set_pli_count(this: &RtcrtpStreamStats, val: u32); #[doc = "Get the `remoteId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] #[wasm_bindgen(method, getter = "remoteId")] pub fn get_remote_id(this: &RtcrtpStreamStats) -> Option; + #[doc = "Change the `remoteId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] #[wasm_bindgen(method, setter = "remoteId")] - fn set_remote_id(this: &RtcrtpStreamStats, val: &str); + pub fn set_remote_id(this: &RtcrtpStreamStats, val: &str); #[doc = "Get the `ssrc` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] #[wasm_bindgen(method, getter = "ssrc")] pub fn get_ssrc(this: &RtcrtpStreamStats) -> Option; + #[doc = "Change the `ssrc` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] #[wasm_bindgen(method, setter = "ssrc")] - fn set_ssrc(this: &RtcrtpStreamStats, val: &str); + pub fn set_ssrc(this: &RtcrtpStreamStats, val: &str); #[doc = "Get the `transportId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] #[wasm_bindgen(method, getter = "transportId")] pub fn get_transport_id(this: &RtcrtpStreamStats) -> Option; + #[doc = "Change the `transportId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] #[wasm_bindgen(method, setter = "transportId")] - fn set_transport_id(this: &RtcrtpStreamStats, val: &str); + pub fn set_transport_id(this: &RtcrtpStreamStats, val: &str); } impl RtcrtpStreamStats { #[doc = "Construct a new `RtcrtpStreamStats`."] @@ -141,122 +192,88 @@ impl RtcrtpStreamStats { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `id` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + #[deprecated = "Use `set_id()` instead."] pub fn id(&mut self, val: &str) -> &mut Self { self.set_id(val); self } - #[doc = "Change the `timestamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + #[deprecated = "Use `set_timestamp()` instead."] pub fn timestamp(&mut self, val: f64) -> &mut Self { self.set_timestamp(val); self } #[cfg(feature = "RtcStatsType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcStatsType`, `RtcrtpStreamStats`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: RtcStatsType) -> &mut Self { self.set_type(val); self } - #[doc = "Change the `bitrateMean` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + #[deprecated = "Use `set_bitrate_mean()` instead."] pub fn bitrate_mean(&mut self, val: f64) -> &mut Self { self.set_bitrate_mean(val); self } - #[doc = "Change the `bitrateStdDev` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + #[deprecated = "Use `set_bitrate_std_dev()` instead."] pub fn bitrate_std_dev(&mut self, val: f64) -> &mut Self { self.set_bitrate_std_dev(val); self } - #[doc = "Change the `codecId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + #[deprecated = "Use `set_codec_id()` instead."] pub fn codec_id(&mut self, val: &str) -> &mut Self { self.set_codec_id(val); self } - #[doc = "Change the `firCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + #[deprecated = "Use `set_fir_count()` instead."] pub fn fir_count(&mut self, val: u32) -> &mut Self { self.set_fir_count(val); self } - #[doc = "Change the `framerateMean` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + #[deprecated = "Use `set_framerate_mean()` instead."] pub fn framerate_mean(&mut self, val: f64) -> &mut Self { self.set_framerate_mean(val); self } - #[doc = "Change the `framerateStdDev` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + #[deprecated = "Use `set_framerate_std_dev()` instead."] pub fn framerate_std_dev(&mut self, val: f64) -> &mut Self { self.set_framerate_std_dev(val); self } - #[doc = "Change the `isRemote` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + #[deprecated = "Use `set_is_remote()` instead."] pub fn is_remote(&mut self, val: bool) -> &mut Self { self.set_is_remote(val); self } - #[doc = "Change the `mediaTrackId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + #[deprecated = "Use `set_media_track_id()` instead."] pub fn media_track_id(&mut self, val: &str) -> &mut Self { self.set_media_track_id(val); self } - #[doc = "Change the `mediaType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + #[deprecated = "Use `set_media_type()` instead."] pub fn media_type(&mut self, val: &str) -> &mut Self { self.set_media_type(val); self } - #[doc = "Change the `nackCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + #[deprecated = "Use `set_nack_count()` instead."] pub fn nack_count(&mut self, val: u32) -> &mut Self { self.set_nack_count(val); self } - #[doc = "Change the `pliCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + #[deprecated = "Use `set_pli_count()` instead."] pub fn pli_count(&mut self, val: u32) -> &mut Self { self.set_pli_count(val); self } - #[doc = "Change the `remoteId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + #[deprecated = "Use `set_remote_id()` instead."] pub fn remote_id(&mut self, val: &str) -> &mut Self { self.set_remote_id(val); self } - #[doc = "Change the `ssrc` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + #[deprecated = "Use `set_ssrc()` instead."] pub fn ssrc(&mut self, val: &str) -> &mut Self { self.set_ssrc(val); self } - #[doc = "Change the `transportId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + #[deprecated = "Use `set_transport_id()` instead."] pub fn transport_id(&mut self, val: &str) -> &mut Self { self.set_transport_id(val); self diff --git a/crates/web-sys/src/features/gen_SaveFilePickerOptions.rs b/crates/web-sys/src/features/gen_SaveFilePickerOptions.rs index 0d372d89a85f..3e310a60ca19 100644 --- a/crates/web-sys/src/features/gen_SaveFilePickerOptions.rs +++ b/crates/web-sys/src/features/gen_SaveFilePickerOptions.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "excludeAcceptAllOption")] pub fn get_exclude_accept_all_option(this: &SaveFilePickerOptions) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `excludeAcceptAllOption` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SaveFilePickerOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "excludeAcceptAllOption")] - fn set_exclude_accept_all_option(this: &SaveFilePickerOptions, val: bool); + pub fn set_exclude_accept_all_option(this: &SaveFilePickerOptions, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `id` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "id")] pub fn get_id(this: &SaveFilePickerOptions) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SaveFilePickerOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "id")] - fn set_id(this: &SaveFilePickerOptions, val: &str); + pub fn set_id(this: &SaveFilePickerOptions, val: &str); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `startIn` field of this object."] #[doc = ""] @@ -45,8 +59,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "startIn")] pub fn get_start_in(this: &SaveFilePickerOptions) -> ::wasm_bindgen::JsValue; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `startIn` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SaveFilePickerOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "startIn")] - fn set_start_in(this: &SaveFilePickerOptions, val: &::wasm_bindgen::JsValue); + pub fn set_start_in(this: &SaveFilePickerOptions, val: &::wasm_bindgen::JsValue); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `types` field of this object."] #[doc = ""] @@ -56,8 +77,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "types")] pub fn get_types(this: &SaveFilePickerOptions) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `types` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SaveFilePickerOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "types")] - fn set_types(this: &SaveFilePickerOptions, val: &::wasm_bindgen::JsValue); + pub fn set_types(this: &SaveFilePickerOptions, val: &::wasm_bindgen::JsValue); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `suggestedName` field of this object."] #[doc = ""] @@ -67,8 +95,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "suggestedName")] pub fn get_suggested_name(this: &SaveFilePickerOptions) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `suggestedName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SaveFilePickerOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "suggestedName")] - fn set_suggested_name(this: &SaveFilePickerOptions, val: Option<&str>); + pub fn set_suggested_name(this: &SaveFilePickerOptions, val: Option<&str>); } #[cfg(web_sys_unstable_apis)] impl SaveFilePickerOptions { @@ -84,56 +119,31 @@ impl SaveFilePickerOptions { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `excludeAcceptAllOption` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SaveFilePickerOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_exclude_accept_all_option()` instead."] pub fn exclude_accept_all_option(&mut self, val: bool) -> &mut Self { self.set_exclude_accept_all_option(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `id` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SaveFilePickerOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_id()` instead."] pub fn id(&mut self, val: &str) -> &mut Self { self.set_id(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `startIn` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SaveFilePickerOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_start_in()` instead."] pub fn start_in(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_start_in(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `types` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SaveFilePickerOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_types()` instead."] pub fn types(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_types(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `suggestedName` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SaveFilePickerOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_suggested_name()` instead."] pub fn suggested_name(&mut self, val: Option<&str>) -> &mut Self { self.set_suggested_name(val); self diff --git a/crates/web-sys/src/features/gen_SchedulerPostTaskOptions.rs b/crates/web-sys/src/features/gen_SchedulerPostTaskOptions.rs index bd832ceb58e7..367acaf5a160 100644 --- a/crates/web-sys/src/features/gen_SchedulerPostTaskOptions.rs +++ b/crates/web-sys/src/features/gen_SchedulerPostTaskOptions.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "delay")] pub fn get_delay(this: &SchedulerPostTaskOptions) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `delay` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SchedulerPostTaskOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "delay")] - fn set_delay(this: &SchedulerPostTaskOptions, val: f64); + pub fn set_delay(this: &SchedulerPostTaskOptions, val: f64); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "TaskPriority")] #[doc = "Get the `priority` field of this object."] @@ -35,9 +42,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "priority")] pub fn get_priority(this: &SchedulerPostTaskOptions) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "TaskPriority")] + #[doc = "Change the `priority` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SchedulerPostTaskOptions`, `TaskPriority`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "priority")] - fn set_priority(this: &SchedulerPostTaskOptions, val: TaskPriority); + pub fn set_priority(this: &SchedulerPostTaskOptions, val: TaskPriority); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "AbortSignal")] #[doc = "Get the `signal` field of this object."] @@ -48,9 +62,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "signal")] pub fn get_signal(this: &SchedulerPostTaskOptions) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "AbortSignal")] + #[doc = "Change the `signal` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `SchedulerPostTaskOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "signal")] - fn set_signal(this: &SchedulerPostTaskOptions, val: &AbortSignal); + pub fn set_signal(this: &SchedulerPostTaskOptions, val: &AbortSignal); } #[cfg(web_sys_unstable_apis)] impl SchedulerPostTaskOptions { @@ -66,36 +87,21 @@ impl SchedulerPostTaskOptions { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `delay` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SchedulerPostTaskOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_delay()` instead."] pub fn delay(&mut self, val: f64) -> &mut Self { self.set_delay(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "TaskPriority")] - #[doc = "Change the `priority` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SchedulerPostTaskOptions`, `TaskPriority`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_priority()` instead."] pub fn priority(&mut self, val: TaskPriority) -> &mut Self { self.set_priority(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "AbortSignal")] - #[doc = "Change the `signal` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `SchedulerPostTaskOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_signal()` instead."] pub fn signal(&mut self, val: &AbortSignal) -> &mut Self { self.set_signal(val); self diff --git a/crates/web-sys/src/features/gen_ScrollIntoViewOptions.rs b/crates/web-sys/src/features/gen_ScrollIntoViewOptions.rs index 9f9a1d21dcf8..ec98659e7e3d 100644 --- a/crates/web-sys/src/features/gen_ScrollIntoViewOptions.rs +++ b/crates/web-sys/src/features/gen_ScrollIntoViewOptions.rs @@ -17,8 +17,11 @@ extern "C" { #[wasm_bindgen(method, getter = "behavior")] pub fn get_behavior(this: &ScrollIntoViewOptions) -> Option; #[cfg(feature = "ScrollBehavior")] + #[doc = "Change the `behavior` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ScrollBehavior`, `ScrollIntoViewOptions`*"] #[wasm_bindgen(method, setter = "behavior")] - fn set_behavior(this: &ScrollIntoViewOptions, val: ScrollBehavior); + pub fn set_behavior(this: &ScrollIntoViewOptions, val: ScrollBehavior); #[cfg(feature = "ScrollLogicalPosition")] #[doc = "Get the `block` field of this object."] #[doc = ""] @@ -26,8 +29,11 @@ extern "C" { #[wasm_bindgen(method, getter = "block")] pub fn get_block(this: &ScrollIntoViewOptions) -> Option; #[cfg(feature = "ScrollLogicalPosition")] + #[doc = "Change the `block` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ScrollIntoViewOptions`, `ScrollLogicalPosition`*"] #[wasm_bindgen(method, setter = "block")] - fn set_block(this: &ScrollIntoViewOptions, val: ScrollLogicalPosition); + pub fn set_block(this: &ScrollIntoViewOptions, val: ScrollLogicalPosition); #[cfg(feature = "ScrollLogicalPosition")] #[doc = "Get the `inline` field of this object."] #[doc = ""] @@ -35,8 +41,11 @@ extern "C" { #[wasm_bindgen(method, getter = "inline")] pub fn get_inline(this: &ScrollIntoViewOptions) -> Option; #[cfg(feature = "ScrollLogicalPosition")] + #[doc = "Change the `inline` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ScrollIntoViewOptions`, `ScrollLogicalPosition`*"] #[wasm_bindgen(method, setter = "inline")] - fn set_inline(this: &ScrollIntoViewOptions, val: ScrollLogicalPosition); + pub fn set_inline(this: &ScrollIntoViewOptions, val: ScrollLogicalPosition); } impl ScrollIntoViewOptions { #[doc = "Construct a new `ScrollIntoViewOptions`."] @@ -48,25 +57,19 @@ impl ScrollIntoViewOptions { ret } #[cfg(feature = "ScrollBehavior")] - #[doc = "Change the `behavior` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ScrollBehavior`, `ScrollIntoViewOptions`*"] + #[deprecated = "Use `set_behavior()` instead."] pub fn behavior(&mut self, val: ScrollBehavior) -> &mut Self { self.set_behavior(val); self } #[cfg(feature = "ScrollLogicalPosition")] - #[doc = "Change the `block` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ScrollIntoViewOptions`, `ScrollLogicalPosition`*"] + #[deprecated = "Use `set_block()` instead."] pub fn block(&mut self, val: ScrollLogicalPosition) -> &mut Self { self.set_block(val); self } #[cfg(feature = "ScrollLogicalPosition")] - #[doc = "Change the `inline` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ScrollIntoViewOptions`, `ScrollLogicalPosition`*"] + #[deprecated = "Use `set_inline()` instead."] pub fn inline(&mut self, val: ScrollLogicalPosition) -> &mut Self { self.set_inline(val); self diff --git a/crates/web-sys/src/features/gen_ScrollOptions.rs b/crates/web-sys/src/features/gen_ScrollOptions.rs index 71cfc480f065..0d960dadc0b6 100644 --- a/crates/web-sys/src/features/gen_ScrollOptions.rs +++ b/crates/web-sys/src/features/gen_ScrollOptions.rs @@ -17,8 +17,11 @@ extern "C" { #[wasm_bindgen(method, getter = "behavior")] pub fn get_behavior(this: &ScrollOptions) -> Option; #[cfg(feature = "ScrollBehavior")] + #[doc = "Change the `behavior` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ScrollBehavior`, `ScrollOptions`*"] #[wasm_bindgen(method, setter = "behavior")] - fn set_behavior(this: &ScrollOptions, val: ScrollBehavior); + pub fn set_behavior(this: &ScrollOptions, val: ScrollBehavior); } impl ScrollOptions { #[doc = "Construct a new `ScrollOptions`."] @@ -30,9 +33,7 @@ impl ScrollOptions { ret } #[cfg(feature = "ScrollBehavior")] - #[doc = "Change the `behavior` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ScrollBehavior`, `ScrollOptions`*"] + #[deprecated = "Use `set_behavior()` instead."] pub fn behavior(&mut self, val: ScrollBehavior) -> &mut Self { self.set_behavior(val); self diff --git a/crates/web-sys/src/features/gen_ScrollToOptions.rs b/crates/web-sys/src/features/gen_ScrollToOptions.rs index b62c6cbeed66..497fdb923717 100644 --- a/crates/web-sys/src/features/gen_ScrollToOptions.rs +++ b/crates/web-sys/src/features/gen_ScrollToOptions.rs @@ -17,22 +17,31 @@ extern "C" { #[wasm_bindgen(method, getter = "behavior")] pub fn get_behavior(this: &ScrollToOptions) -> Option; #[cfg(feature = "ScrollBehavior")] + #[doc = "Change the `behavior` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ScrollBehavior`, `ScrollToOptions`*"] #[wasm_bindgen(method, setter = "behavior")] - fn set_behavior(this: &ScrollToOptions, val: ScrollBehavior); + pub fn set_behavior(this: &ScrollToOptions, val: ScrollBehavior); #[doc = "Get the `left` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ScrollToOptions`*"] #[wasm_bindgen(method, getter = "left")] pub fn get_left(this: &ScrollToOptions) -> Option; + #[doc = "Change the `left` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ScrollToOptions`*"] #[wasm_bindgen(method, setter = "left")] - fn set_left(this: &ScrollToOptions, val: f64); + pub fn set_left(this: &ScrollToOptions, val: f64); #[doc = "Get the `top` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ScrollToOptions`*"] #[wasm_bindgen(method, getter = "top")] pub fn get_top(this: &ScrollToOptions) -> Option; + #[doc = "Change the `top` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ScrollToOptions`*"] #[wasm_bindgen(method, setter = "top")] - fn set_top(this: &ScrollToOptions, val: f64); + pub fn set_top(this: &ScrollToOptions, val: f64); } impl ScrollToOptions { #[doc = "Construct a new `ScrollToOptions`."] @@ -44,23 +53,17 @@ impl ScrollToOptions { ret } #[cfg(feature = "ScrollBehavior")] - #[doc = "Change the `behavior` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ScrollBehavior`, `ScrollToOptions`*"] + #[deprecated = "Use `set_behavior()` instead."] pub fn behavior(&mut self, val: ScrollBehavior) -> &mut Self { self.set_behavior(val); self } - #[doc = "Change the `left` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ScrollToOptions`*"] + #[deprecated = "Use `set_left()` instead."] pub fn left(&mut self, val: f64) -> &mut Self { self.set_left(val); self } - #[doc = "Change the `top` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ScrollToOptions`*"] + #[deprecated = "Use `set_top()` instead."] pub fn top(&mut self, val: f64) -> &mut Self { self.set_top(val); self diff --git a/crates/web-sys/src/features/gen_ScrollViewChangeEventInit.rs b/crates/web-sys/src/features/gen_ScrollViewChangeEventInit.rs index 73846fc3d0db..1160275d1c0d 100644 --- a/crates/web-sys/src/features/gen_ScrollViewChangeEventInit.rs +++ b/crates/web-sys/src/features/gen_ScrollViewChangeEventInit.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ScrollViewChangeEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &ScrollViewChangeEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ScrollViewChangeEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &ScrollViewChangeEventInit, val: bool); + pub fn set_bubbles(this: &ScrollViewChangeEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ScrollViewChangeEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &ScrollViewChangeEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ScrollViewChangeEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &ScrollViewChangeEventInit, val: bool); + pub fn set_cancelable(this: &ScrollViewChangeEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ScrollViewChangeEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &ScrollViewChangeEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ScrollViewChangeEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &ScrollViewChangeEventInit, val: bool); + pub fn set_composed(this: &ScrollViewChangeEventInit, val: bool); #[cfg(feature = "ScrollState")] #[doc = "Get the `state` field of this object."] #[doc = ""] @@ -38,8 +47,11 @@ extern "C" { #[wasm_bindgen(method, getter = "state")] pub fn get_state(this: &ScrollViewChangeEventInit) -> Option; #[cfg(feature = "ScrollState")] + #[doc = "Change the `state` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ScrollState`, `ScrollViewChangeEventInit`*"] #[wasm_bindgen(method, setter = "state")] - fn set_state(this: &ScrollViewChangeEventInit, val: ScrollState); + pub fn set_state(this: &ScrollViewChangeEventInit, val: ScrollState); } impl ScrollViewChangeEventInit { #[doc = "Construct a new `ScrollViewChangeEventInit`."] @@ -50,31 +62,23 @@ impl ScrollViewChangeEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ScrollViewChangeEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ScrollViewChangeEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ScrollViewChangeEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } #[cfg(feature = "ScrollState")] - #[doc = "Change the `state` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ScrollState`, `ScrollViewChangeEventInit`*"] + #[deprecated = "Use `set_state()` instead."] pub fn state(&mut self, val: ScrollState) -> &mut Self { self.set_state(val); self diff --git a/crates/web-sys/src/features/gen_SecurityPolicyViolationEventInit.rs b/crates/web-sys/src/features/gen_SecurityPolicyViolationEventInit.rs index 92753e6d677d..5176921a8370 100644 --- a/crates/web-sys/src/features/gen_SecurityPolicyViolationEventInit.rs +++ b/crates/web-sys/src/features/gen_SecurityPolicyViolationEventInit.rs @@ -15,36 +15,51 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &SecurityPolicyViolationEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &SecurityPolicyViolationEventInit, val: bool); + pub fn set_bubbles(this: &SecurityPolicyViolationEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &SecurityPolicyViolationEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &SecurityPolicyViolationEventInit, val: bool); + pub fn set_cancelable(this: &SecurityPolicyViolationEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &SecurityPolicyViolationEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &SecurityPolicyViolationEventInit, val: bool); + pub fn set_composed(this: &SecurityPolicyViolationEventInit, val: bool); #[doc = "Get the `blockedURI` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] #[wasm_bindgen(method, getter = "blockedURI")] pub fn get_blocked_uri(this: &SecurityPolicyViolationEventInit) -> Option; + #[doc = "Change the `blockedURI` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] #[wasm_bindgen(method, setter = "blockedURI")] - fn set_blocked_uri(this: &SecurityPolicyViolationEventInit, val: &str); + pub fn set_blocked_uri(this: &SecurityPolicyViolationEventInit, val: &str); #[doc = "Get the `columnNumber` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] #[wasm_bindgen(method, getter = "columnNumber")] pub fn get_column_number(this: &SecurityPolicyViolationEventInit) -> Option; + #[doc = "Change the `columnNumber` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] #[wasm_bindgen(method, setter = "columnNumber")] - fn set_column_number(this: &SecurityPolicyViolationEventInit, val: i32); + pub fn set_column_number(this: &SecurityPolicyViolationEventInit, val: i32); #[cfg(feature = "SecurityPolicyViolationEventDisposition")] #[doc = "Get the `disposition` field of this object."] #[doc = ""] @@ -54,8 +69,11 @@ extern "C" { this: &SecurityPolicyViolationEventInit, ) -> Option; #[cfg(feature = "SecurityPolicyViolationEventDisposition")] + #[doc = "Change the `disposition` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventDisposition`, `SecurityPolicyViolationEventInit`*"] #[wasm_bindgen(method, setter = "disposition")] - fn set_disposition( + pub fn set_disposition( this: &SecurityPolicyViolationEventInit, val: SecurityPolicyViolationEventDisposition, ); @@ -64,64 +82,91 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] #[wasm_bindgen(method, getter = "documentURI")] pub fn get_document_uri(this: &SecurityPolicyViolationEventInit) -> Option; + #[doc = "Change the `documentURI` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] #[wasm_bindgen(method, setter = "documentURI")] - fn set_document_uri(this: &SecurityPolicyViolationEventInit, val: &str); + pub fn set_document_uri(this: &SecurityPolicyViolationEventInit, val: &str); #[doc = "Get the `effectiveDirective` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] #[wasm_bindgen(method, getter = "effectiveDirective")] pub fn get_effective_directive(this: &SecurityPolicyViolationEventInit) -> Option; + #[doc = "Change the `effectiveDirective` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] #[wasm_bindgen(method, setter = "effectiveDirective")] - fn set_effective_directive(this: &SecurityPolicyViolationEventInit, val: &str); + pub fn set_effective_directive(this: &SecurityPolicyViolationEventInit, val: &str); #[doc = "Get the `lineNumber` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] #[wasm_bindgen(method, getter = "lineNumber")] pub fn get_line_number(this: &SecurityPolicyViolationEventInit) -> Option; + #[doc = "Change the `lineNumber` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] #[wasm_bindgen(method, setter = "lineNumber")] - fn set_line_number(this: &SecurityPolicyViolationEventInit, val: i32); + pub fn set_line_number(this: &SecurityPolicyViolationEventInit, val: i32); #[doc = "Get the `originalPolicy` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] #[wasm_bindgen(method, getter = "originalPolicy")] pub fn get_original_policy(this: &SecurityPolicyViolationEventInit) -> Option; + #[doc = "Change the `originalPolicy` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] #[wasm_bindgen(method, setter = "originalPolicy")] - fn set_original_policy(this: &SecurityPolicyViolationEventInit, val: &str); + pub fn set_original_policy(this: &SecurityPolicyViolationEventInit, val: &str); #[doc = "Get the `referrer` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] #[wasm_bindgen(method, getter = "referrer")] pub fn get_referrer(this: &SecurityPolicyViolationEventInit) -> Option; + #[doc = "Change the `referrer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] #[wasm_bindgen(method, setter = "referrer")] - fn set_referrer(this: &SecurityPolicyViolationEventInit, val: &str); + pub fn set_referrer(this: &SecurityPolicyViolationEventInit, val: &str); #[doc = "Get the `sample` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] #[wasm_bindgen(method, getter = "sample")] pub fn get_sample(this: &SecurityPolicyViolationEventInit) -> Option; + #[doc = "Change the `sample` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] #[wasm_bindgen(method, setter = "sample")] - fn set_sample(this: &SecurityPolicyViolationEventInit, val: &str); + pub fn set_sample(this: &SecurityPolicyViolationEventInit, val: &str); #[doc = "Get the `sourceFile` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] #[wasm_bindgen(method, getter = "sourceFile")] pub fn get_source_file(this: &SecurityPolicyViolationEventInit) -> Option; + #[doc = "Change the `sourceFile` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] #[wasm_bindgen(method, setter = "sourceFile")] - fn set_source_file(this: &SecurityPolicyViolationEventInit, val: &str); + pub fn set_source_file(this: &SecurityPolicyViolationEventInit, val: &str); #[doc = "Get the `statusCode` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] #[wasm_bindgen(method, getter = "statusCode")] pub fn get_status_code(this: &SecurityPolicyViolationEventInit) -> Option; + #[doc = "Change the `statusCode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] #[wasm_bindgen(method, setter = "statusCode")] - fn set_status_code(this: &SecurityPolicyViolationEventInit, val: u16); + pub fn set_status_code(this: &SecurityPolicyViolationEventInit, val: u16); #[doc = "Get the `violatedDirective` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] #[wasm_bindgen(method, getter = "violatedDirective")] pub fn get_violated_directive(this: &SecurityPolicyViolationEventInit) -> Option; + #[doc = "Change the `violatedDirective` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] #[wasm_bindgen(method, setter = "violatedDirective")] - fn set_violated_directive(this: &SecurityPolicyViolationEventInit, val: &str); + pub fn set_violated_directive(this: &SecurityPolicyViolationEventInit, val: &str); } impl SecurityPolicyViolationEventInit { #[doc = "Construct a new `SecurityPolicyViolationEventInit`."] @@ -132,108 +177,78 @@ impl SecurityPolicyViolationEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } - #[doc = "Change the `blockedURI` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] + #[deprecated = "Use `set_blocked_uri()` instead."] pub fn blocked_uri(&mut self, val: &str) -> &mut Self { self.set_blocked_uri(val); self } - #[doc = "Change the `columnNumber` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] + #[deprecated = "Use `set_column_number()` instead."] pub fn column_number(&mut self, val: i32) -> &mut Self { self.set_column_number(val); self } #[cfg(feature = "SecurityPolicyViolationEventDisposition")] - #[doc = "Change the `disposition` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventDisposition`, `SecurityPolicyViolationEventInit`*"] + #[deprecated = "Use `set_disposition()` instead."] pub fn disposition(&mut self, val: SecurityPolicyViolationEventDisposition) -> &mut Self { self.set_disposition(val); self } - #[doc = "Change the `documentURI` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] + #[deprecated = "Use `set_document_uri()` instead."] pub fn document_uri(&mut self, val: &str) -> &mut Self { self.set_document_uri(val); self } - #[doc = "Change the `effectiveDirective` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] + #[deprecated = "Use `set_effective_directive()` instead."] pub fn effective_directive(&mut self, val: &str) -> &mut Self { self.set_effective_directive(val); self } - #[doc = "Change the `lineNumber` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] + #[deprecated = "Use `set_line_number()` instead."] pub fn line_number(&mut self, val: i32) -> &mut Self { self.set_line_number(val); self } - #[doc = "Change the `originalPolicy` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] + #[deprecated = "Use `set_original_policy()` instead."] pub fn original_policy(&mut self, val: &str) -> &mut Self { self.set_original_policy(val); self } - #[doc = "Change the `referrer` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] + #[deprecated = "Use `set_referrer()` instead."] pub fn referrer(&mut self, val: &str) -> &mut Self { self.set_referrer(val); self } - #[doc = "Change the `sample` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] + #[deprecated = "Use `set_sample()` instead."] pub fn sample(&mut self, val: &str) -> &mut Self { self.set_sample(val); self } - #[doc = "Change the `sourceFile` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] + #[deprecated = "Use `set_source_file()` instead."] pub fn source_file(&mut self, val: &str) -> &mut Self { self.set_source_file(val); self } - #[doc = "Change the `statusCode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] + #[deprecated = "Use `set_status_code()` instead."] pub fn status_code(&mut self, val: u16) -> &mut Self { self.set_status_code(val); self } - #[doc = "Change the `violatedDirective` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] + #[deprecated = "Use `set_violated_directive()` instead."] pub fn violated_directive(&mut self, val: &str) -> &mut Self { self.set_violated_directive(val); self diff --git a/crates/web-sys/src/features/gen_SerialInputSignals.rs b/crates/web-sys/src/features/gen_SerialInputSignals.rs index 946cc66ab22d..5cabc7a4ba51 100644 --- a/crates/web-sys/src/features/gen_SerialInputSignals.rs +++ b/crates/web-sys/src/features/gen_SerialInputSignals.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "clearToSend")] pub fn get_clear_to_send(this: &SerialInputSignals) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `clearToSend` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialInputSignals`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "clearToSend")] - fn set_clear_to_send(this: &SerialInputSignals, val: bool); + pub fn set_clear_to_send(this: &SerialInputSignals, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `dataCarrierDetect` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "dataCarrierDetect")] pub fn get_data_carrier_detect(this: &SerialInputSignals) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `dataCarrierDetect` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialInputSignals`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "dataCarrierDetect")] - fn set_data_carrier_detect(this: &SerialInputSignals, val: bool); + pub fn set_data_carrier_detect(this: &SerialInputSignals, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `dataSetReady` field of this object."] #[doc = ""] @@ -45,8 +59,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "dataSetReady")] pub fn get_data_set_ready(this: &SerialInputSignals) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `dataSetReady` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialInputSignals`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "dataSetReady")] - fn set_data_set_ready(this: &SerialInputSignals, val: bool); + pub fn set_data_set_ready(this: &SerialInputSignals, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `ringIndicator` field of this object."] #[doc = ""] @@ -56,8 +77,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "ringIndicator")] pub fn get_ring_indicator(this: &SerialInputSignals) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `ringIndicator` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialInputSignals`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "ringIndicator")] - fn set_ring_indicator(this: &SerialInputSignals, val: bool); + pub fn set_ring_indicator(this: &SerialInputSignals, val: bool); } #[cfg(web_sys_unstable_apis)] impl SerialInputSignals { @@ -82,45 +110,25 @@ impl SerialInputSignals { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `clearToSend` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SerialInputSignals`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_clear_to_send()` instead."] pub fn clear_to_send(&mut self, val: bool) -> &mut Self { self.set_clear_to_send(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `dataCarrierDetect` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SerialInputSignals`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_data_carrier_detect()` instead."] pub fn data_carrier_detect(&mut self, val: bool) -> &mut Self { self.set_data_carrier_detect(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `dataSetReady` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SerialInputSignals`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_data_set_ready()` instead."] pub fn data_set_ready(&mut self, val: bool) -> &mut Self { self.set_data_set_ready(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `ringIndicator` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SerialInputSignals`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_ring_indicator()` instead."] pub fn ring_indicator(&mut self, val: bool) -> &mut Self { self.set_ring_indicator(val); self diff --git a/crates/web-sys/src/features/gen_SerialOptions.rs b/crates/web-sys/src/features/gen_SerialOptions.rs index 895477ce5084..a894c952f73c 100644 --- a/crates/web-sys/src/features/gen_SerialOptions.rs +++ b/crates/web-sys/src/features/gen_SerialOptions.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "baudRate")] pub fn get_baud_rate(this: &SerialOptions) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `baudRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "baudRate")] - fn set_baud_rate(this: &SerialOptions, val: u32); + pub fn set_baud_rate(this: &SerialOptions, val: u32); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `bufferSize` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "bufferSize")] pub fn get_buffer_size(this: &SerialOptions) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `bufferSize` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "bufferSize")] - fn set_buffer_size(this: &SerialOptions, val: u32); + pub fn set_buffer_size(this: &SerialOptions, val: u32); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `dataBits` field of this object."] #[doc = ""] @@ -45,8 +59,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "dataBits")] pub fn get_data_bits(this: &SerialOptions) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `dataBits` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "dataBits")] - fn set_data_bits(this: &SerialOptions, val: u8); + pub fn set_data_bits(this: &SerialOptions, val: u8); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "FlowControlType")] #[doc = "Get the `flowControl` field of this object."] @@ -57,9 +78,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "flowControl")] pub fn get_flow_control(this: &SerialOptions) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "FlowControlType")] + #[doc = "Change the `flowControl` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FlowControlType`, `SerialOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "flowControl")] - fn set_flow_control(this: &SerialOptions, val: FlowControlType); + pub fn set_flow_control(this: &SerialOptions, val: FlowControlType); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "ParityType")] #[doc = "Get the `parity` field of this object."] @@ -70,9 +98,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "parity")] pub fn get_parity(this: &SerialOptions) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "ParityType")] + #[doc = "Change the `parity` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ParityType`, `SerialOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "parity")] - fn set_parity(this: &SerialOptions, val: ParityType); + pub fn set_parity(this: &SerialOptions, val: ParityType); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `stopBits` field of this object."] #[doc = ""] @@ -82,8 +117,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "stopBits")] pub fn get_stop_bits(this: &SerialOptions) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `stopBits` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "stopBits")] - fn set_stop_bits(this: &SerialOptions, val: u8); + pub fn set_stop_bits(this: &SerialOptions, val: u8); } #[cfg(web_sys_unstable_apis)] impl SerialOptions { @@ -100,69 +142,39 @@ impl SerialOptions { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `baudRate` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SerialOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_baud_rate()` instead."] pub fn baud_rate(&mut self, val: u32) -> &mut Self { self.set_baud_rate(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `bufferSize` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SerialOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_buffer_size()` instead."] pub fn buffer_size(&mut self, val: u32) -> &mut Self { self.set_buffer_size(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `dataBits` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SerialOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_data_bits()` instead."] pub fn data_bits(&mut self, val: u8) -> &mut Self { self.set_data_bits(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "FlowControlType")] - #[doc = "Change the `flowControl` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FlowControlType`, `SerialOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_flow_control()` instead."] pub fn flow_control(&mut self, val: FlowControlType) -> &mut Self { self.set_flow_control(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "ParityType")] - #[doc = "Change the `parity` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ParityType`, `SerialOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_parity()` instead."] pub fn parity(&mut self, val: ParityType) -> &mut Self { self.set_parity(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `stopBits` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SerialOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_stop_bits()` instead."] pub fn stop_bits(&mut self, val: u8) -> &mut Self { self.set_stop_bits(val); self diff --git a/crates/web-sys/src/features/gen_SerialOutputSignals.rs b/crates/web-sys/src/features/gen_SerialOutputSignals.rs index 7c1ff733b27e..02a850f66217 100644 --- a/crates/web-sys/src/features/gen_SerialOutputSignals.rs +++ b/crates/web-sys/src/features/gen_SerialOutputSignals.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "break")] pub fn get_break(this: &SerialOutputSignals) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `break` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialOutputSignals`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "break")] - fn set_break(this: &SerialOutputSignals, val: bool); + pub fn set_break(this: &SerialOutputSignals, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `dataTerminalReady` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "dataTerminalReady")] pub fn get_data_terminal_ready(this: &SerialOutputSignals) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `dataTerminalReady` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialOutputSignals`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "dataTerminalReady")] - fn set_data_terminal_ready(this: &SerialOutputSignals, val: bool); + pub fn set_data_terminal_ready(this: &SerialOutputSignals, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `requestToSend` field of this object."] #[doc = ""] @@ -45,8 +59,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "requestToSend")] pub fn get_request_to_send(this: &SerialOutputSignals) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `requestToSend` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialOutputSignals`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "requestToSend")] - fn set_request_to_send(this: &SerialOutputSignals, val: bool); + pub fn set_request_to_send(this: &SerialOutputSignals, val: bool); } #[cfg(web_sys_unstable_apis)] impl SerialOutputSignals { @@ -62,34 +83,19 @@ impl SerialOutputSignals { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `break` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SerialOutputSignals`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_break()` instead."] pub fn break_(&mut self, val: bool) -> &mut Self { self.set_break(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `dataTerminalReady` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SerialOutputSignals`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_data_terminal_ready()` instead."] pub fn data_terminal_ready(&mut self, val: bool) -> &mut Self { self.set_data_terminal_ready(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `requestToSend` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SerialOutputSignals`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_request_to_send()` instead."] pub fn request_to_send(&mut self, val: bool) -> &mut Self { self.set_request_to_send(val); self diff --git a/crates/web-sys/src/features/gen_SerialPortFilter.rs b/crates/web-sys/src/features/gen_SerialPortFilter.rs index 48a87e18154f..99fb46cb5dc7 100644 --- a/crates/web-sys/src/features/gen_SerialPortFilter.rs +++ b/crates/web-sys/src/features/gen_SerialPortFilter.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "usbProductId")] pub fn get_usb_product_id(this: &SerialPortFilter) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `usbProductId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialPortFilter`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "usbProductId")] - fn set_usb_product_id(this: &SerialPortFilter, val: u16); + pub fn set_usb_product_id(this: &SerialPortFilter, val: u16); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `usbVendorId` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "usbVendorId")] pub fn get_usb_vendor_id(this: &SerialPortFilter) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `usbVendorId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialPortFilter`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "usbVendorId")] - fn set_usb_vendor_id(this: &SerialPortFilter, val: u16); + pub fn set_usb_vendor_id(this: &SerialPortFilter, val: u16); } #[cfg(web_sys_unstable_apis)] impl SerialPortFilter { @@ -51,23 +65,13 @@ impl SerialPortFilter { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `usbProductId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SerialPortFilter`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_usb_product_id()` instead."] pub fn usb_product_id(&mut self, val: u16) -> &mut Self { self.set_usb_product_id(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `usbVendorId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SerialPortFilter`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_usb_vendor_id()` instead."] pub fn usb_vendor_id(&mut self, val: u16) -> &mut Self { self.set_usb_vendor_id(val); self diff --git a/crates/web-sys/src/features/gen_SerialPortInfo.rs b/crates/web-sys/src/features/gen_SerialPortInfo.rs index ddcd1c1138ed..07f598e29e7c 100644 --- a/crates/web-sys/src/features/gen_SerialPortInfo.rs +++ b/crates/web-sys/src/features/gen_SerialPortInfo.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "usbProductId")] pub fn get_usb_product_id(this: &SerialPortInfo) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `usbProductId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialPortInfo`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "usbProductId")] - fn set_usb_product_id(this: &SerialPortInfo, val: u16); + pub fn set_usb_product_id(this: &SerialPortInfo, val: u16); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `usbVendorId` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "usbVendorId")] pub fn get_usb_vendor_id(this: &SerialPortInfo) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `usbVendorId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialPortInfo`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "usbVendorId")] - fn set_usb_vendor_id(this: &SerialPortInfo, val: u16); + pub fn set_usb_vendor_id(this: &SerialPortInfo, val: u16); } #[cfg(web_sys_unstable_apis)] impl SerialPortInfo { @@ -51,23 +65,13 @@ impl SerialPortInfo { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `usbProductId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SerialPortInfo`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_usb_product_id()` instead."] pub fn usb_product_id(&mut self, val: u16) -> &mut Self { self.set_usb_product_id(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `usbVendorId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SerialPortInfo`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_usb_vendor_id()` instead."] pub fn usb_vendor_id(&mut self, val: u16) -> &mut Self { self.set_usb_vendor_id(val); self diff --git a/crates/web-sys/src/features/gen_SerialPortRequestOptions.rs b/crates/web-sys/src/features/gen_SerialPortRequestOptions.rs index ce03a63378d2..b00ff33fb634 100644 --- a/crates/web-sys/src/features/gen_SerialPortRequestOptions.rs +++ b/crates/web-sys/src/features/gen_SerialPortRequestOptions.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "filters")] pub fn get_filters(this: &SerialPortRequestOptions) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `filters` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialPortRequestOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "filters")] - fn set_filters(this: &SerialPortRequestOptions, val: &::wasm_bindgen::JsValue); + pub fn set_filters(this: &SerialPortRequestOptions, val: &::wasm_bindgen::JsValue); } #[cfg(web_sys_unstable_apis)] impl SerialPortRequestOptions { @@ -40,12 +47,7 @@ impl SerialPortRequestOptions { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `filters` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SerialPortRequestOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_filters()` instead."] pub fn filters(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_filters(val); self diff --git a/crates/web-sys/src/features/gen_ServerSocketOptions.rs b/crates/web-sys/src/features/gen_ServerSocketOptions.rs index 787c18d81071..803b7d63e11f 100644 --- a/crates/web-sys/src/features/gen_ServerSocketOptions.rs +++ b/crates/web-sys/src/features/gen_ServerSocketOptions.rs @@ -17,8 +17,11 @@ extern "C" { #[wasm_bindgen(method, getter = "binaryType")] pub fn get_binary_type(this: &ServerSocketOptions) -> Option; #[cfg(feature = "TcpSocketBinaryType")] + #[doc = "Change the `binaryType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ServerSocketOptions`, `TcpSocketBinaryType`*"] #[wasm_bindgen(method, setter = "binaryType")] - fn set_binary_type(this: &ServerSocketOptions, val: TcpSocketBinaryType); + pub fn set_binary_type(this: &ServerSocketOptions, val: TcpSocketBinaryType); } impl ServerSocketOptions { #[doc = "Construct a new `ServerSocketOptions`."] @@ -30,9 +33,7 @@ impl ServerSocketOptions { ret } #[cfg(feature = "TcpSocketBinaryType")] - #[doc = "Change the `binaryType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ServerSocketOptions`, `TcpSocketBinaryType`*"] + #[deprecated = "Use `set_binary_type()` instead."] pub fn binary_type(&mut self, val: TcpSocketBinaryType) -> &mut Self { self.set_binary_type(val); self diff --git a/crates/web-sys/src/features/gen_ShadowRootInit.rs b/crates/web-sys/src/features/gen_ShadowRootInit.rs index 7ee99632f2d0..995f1541770b 100644 --- a/crates/web-sys/src/features/gen_ShadowRootInit.rs +++ b/crates/web-sys/src/features/gen_ShadowRootInit.rs @@ -17,8 +17,11 @@ extern "C" { #[wasm_bindgen(method, getter = "mode")] pub fn get_mode(this: &ShadowRootInit) -> ShadowRootMode; #[cfg(feature = "ShadowRootMode")] + #[doc = "Change the `mode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ShadowRootInit`, `ShadowRootMode`*"] #[wasm_bindgen(method, setter = "mode")] - fn set_mode(this: &ShadowRootInit, val: ShadowRootMode); + pub fn set_mode(this: &ShadowRootInit, val: ShadowRootMode); } impl ShadowRootInit { #[cfg(feature = "ShadowRootMode")] @@ -32,9 +35,7 @@ impl ShadowRootInit { ret } #[cfg(feature = "ShadowRootMode")] - #[doc = "Change the `mode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ShadowRootInit`, `ShadowRootMode`*"] + #[deprecated = "Use `set_mode()` instead."] pub fn mode(&mut self, val: ShadowRootMode) -> &mut Self { self.set_mode(val); self diff --git a/crates/web-sys/src/features/gen_ShareData.rs b/crates/web-sys/src/features/gen_ShareData.rs index d47074f0af1f..2f366fb822ce 100644 --- a/crates/web-sys/src/features/gen_ShareData.rs +++ b/crates/web-sys/src/features/gen_ShareData.rs @@ -15,29 +15,41 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ShareData`*"] #[wasm_bindgen(method, getter = "files")] pub fn get_files(this: &ShareData) -> Option<::js_sys::Array>; + #[doc = "Change the `files` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ShareData`*"] #[wasm_bindgen(method, setter = "files")] - fn set_files(this: &ShareData, val: &::wasm_bindgen::JsValue); + pub fn set_files(this: &ShareData, val: &::wasm_bindgen::JsValue); #[doc = "Get the `text` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ShareData`*"] #[wasm_bindgen(method, getter = "text")] pub fn get_text(this: &ShareData) -> Option; + #[doc = "Change the `text` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ShareData`*"] #[wasm_bindgen(method, setter = "text")] - fn set_text(this: &ShareData, val: &str); + pub fn set_text(this: &ShareData, val: &str); #[doc = "Get the `title` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ShareData`*"] #[wasm_bindgen(method, getter = "title")] pub fn get_title(this: &ShareData) -> Option; + #[doc = "Change the `title` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ShareData`*"] #[wasm_bindgen(method, setter = "title")] - fn set_title(this: &ShareData, val: &str); + pub fn set_title(this: &ShareData, val: &str); #[doc = "Get the `url` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ShareData`*"] #[wasm_bindgen(method, getter = "url")] pub fn get_url(this: &ShareData) -> Option; + #[doc = "Change the `url` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ShareData`*"] #[wasm_bindgen(method, setter = "url")] - fn set_url(this: &ShareData, val: &str); + pub fn set_url(this: &ShareData, val: &str); } impl ShareData { #[doc = "Construct a new `ShareData`."] @@ -48,30 +60,22 @@ impl ShareData { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `files` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ShareData`*"] + #[deprecated = "Use `set_files()` instead."] pub fn files(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_files(val); self } - #[doc = "Change the `text` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ShareData`*"] + #[deprecated = "Use `set_text()` instead."] pub fn text(&mut self, val: &str) -> &mut Self { self.set_text(val); self } - #[doc = "Change the `title` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ShareData`*"] + #[deprecated = "Use `set_title()` instead."] pub fn title(&mut self, val: &str) -> &mut Self { self.set_title(val); self } - #[doc = "Change the `url` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ShareData`*"] + #[deprecated = "Use `set_url()` instead."] pub fn url(&mut self, val: &str) -> &mut Self { self.set_url(val); self diff --git a/crates/web-sys/src/features/gen_SignResponse.rs b/crates/web-sys/src/features/gen_SignResponse.rs index 06364e5fbaa6..248bfe60512d 100644 --- a/crates/web-sys/src/features/gen_SignResponse.rs +++ b/crates/web-sys/src/features/gen_SignResponse.rs @@ -15,36 +15,51 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `SignResponse`*"] #[wasm_bindgen(method, getter = "clientData")] pub fn get_client_data(this: &SignResponse) -> Option; + #[doc = "Change the `clientData` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SignResponse`*"] #[wasm_bindgen(method, setter = "clientData")] - fn set_client_data(this: &SignResponse, val: &str); + pub fn set_client_data(this: &SignResponse, val: &str); #[doc = "Get the `errorCode` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SignResponse`*"] #[wasm_bindgen(method, getter = "errorCode")] pub fn get_error_code(this: &SignResponse) -> Option; + #[doc = "Change the `errorCode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SignResponse`*"] #[wasm_bindgen(method, setter = "errorCode")] - fn set_error_code(this: &SignResponse, val: Option); + pub fn set_error_code(this: &SignResponse, val: Option); #[doc = "Get the `errorMessage` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SignResponse`*"] #[wasm_bindgen(method, getter = "errorMessage")] pub fn get_error_message(this: &SignResponse) -> Option; + #[doc = "Change the `errorMessage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SignResponse`*"] #[wasm_bindgen(method, setter = "errorMessage")] - fn set_error_message(this: &SignResponse, val: Option<&str>); + pub fn set_error_message(this: &SignResponse, val: Option<&str>); #[doc = "Get the `keyHandle` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SignResponse`*"] #[wasm_bindgen(method, getter = "keyHandle")] pub fn get_key_handle(this: &SignResponse) -> Option; + #[doc = "Change the `keyHandle` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SignResponse`*"] #[wasm_bindgen(method, setter = "keyHandle")] - fn set_key_handle(this: &SignResponse, val: &str); + pub fn set_key_handle(this: &SignResponse, val: &str); #[doc = "Get the `signatureData` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SignResponse`*"] #[wasm_bindgen(method, getter = "signatureData")] pub fn get_signature_data(this: &SignResponse) -> Option; + #[doc = "Change the `signatureData` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SignResponse`*"] #[wasm_bindgen(method, setter = "signatureData")] - fn set_signature_data(this: &SignResponse, val: &str); + pub fn set_signature_data(this: &SignResponse, val: &str); } impl SignResponse { #[doc = "Construct a new `SignResponse`."] @@ -55,37 +70,27 @@ impl SignResponse { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `clientData` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SignResponse`*"] + #[deprecated = "Use `set_client_data()` instead."] pub fn client_data(&mut self, val: &str) -> &mut Self { self.set_client_data(val); self } - #[doc = "Change the `errorCode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SignResponse`*"] + #[deprecated = "Use `set_error_code()` instead."] pub fn error_code(&mut self, val: Option) -> &mut Self { self.set_error_code(val); self } - #[doc = "Change the `errorMessage` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SignResponse`*"] + #[deprecated = "Use `set_error_message()` instead."] pub fn error_message(&mut self, val: Option<&str>) -> &mut Self { self.set_error_message(val); self } - #[doc = "Change the `keyHandle` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SignResponse`*"] + #[deprecated = "Use `set_key_handle()` instead."] pub fn key_handle(&mut self, val: &str) -> &mut Self { self.set_key_handle(val); self } - #[doc = "Change the `signatureData` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SignResponse`*"] + #[deprecated = "Use `set_signature_data()` instead."] pub fn signature_data(&mut self, val: &str) -> &mut Self { self.set_signature_data(val); self diff --git a/crates/web-sys/src/features/gen_SocketElement.rs b/crates/web-sys/src/features/gen_SocketElement.rs index 00437ccb0b86..e1270b6a2471 100644 --- a/crates/web-sys/src/features/gen_SocketElement.rs +++ b/crates/web-sys/src/features/gen_SocketElement.rs @@ -15,43 +15,61 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `SocketElement`*"] #[wasm_bindgen(method, getter = "active")] pub fn get_active(this: &SocketElement) -> Option; + #[doc = "Change the `active` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SocketElement`*"] #[wasm_bindgen(method, setter = "active")] - fn set_active(this: &SocketElement, val: bool); + pub fn set_active(this: &SocketElement, val: bool); #[doc = "Get the `host` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SocketElement`*"] #[wasm_bindgen(method, getter = "host")] pub fn get_host(this: &SocketElement) -> Option; + #[doc = "Change the `host` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SocketElement`*"] #[wasm_bindgen(method, setter = "host")] - fn set_host(this: &SocketElement, val: &str); + pub fn set_host(this: &SocketElement, val: &str); #[doc = "Get the `port` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SocketElement`*"] #[wasm_bindgen(method, getter = "port")] pub fn get_port(this: &SocketElement) -> Option; + #[doc = "Change the `port` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SocketElement`*"] #[wasm_bindgen(method, setter = "port")] - fn set_port(this: &SocketElement, val: u32); + pub fn set_port(this: &SocketElement, val: u32); #[doc = "Get the `received` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SocketElement`*"] #[wasm_bindgen(method, getter = "received")] pub fn get_received(this: &SocketElement) -> Option; + #[doc = "Change the `received` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SocketElement`*"] #[wasm_bindgen(method, setter = "received")] - fn set_received(this: &SocketElement, val: f64); + pub fn set_received(this: &SocketElement, val: f64); #[doc = "Get the `sent` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SocketElement`*"] #[wasm_bindgen(method, getter = "sent")] pub fn get_sent(this: &SocketElement) -> Option; + #[doc = "Change the `sent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SocketElement`*"] #[wasm_bindgen(method, setter = "sent")] - fn set_sent(this: &SocketElement, val: f64); + pub fn set_sent(this: &SocketElement, val: f64); #[doc = "Get the `tcp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SocketElement`*"] #[wasm_bindgen(method, getter = "tcp")] pub fn get_tcp(this: &SocketElement) -> Option; + #[doc = "Change the `tcp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SocketElement`*"] #[wasm_bindgen(method, setter = "tcp")] - fn set_tcp(this: &SocketElement, val: bool); + pub fn set_tcp(this: &SocketElement, val: bool); } impl SocketElement { #[doc = "Construct a new `SocketElement`."] @@ -62,44 +80,32 @@ impl SocketElement { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `active` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SocketElement`*"] + #[deprecated = "Use `set_active()` instead."] pub fn active(&mut self, val: bool) -> &mut Self { self.set_active(val); self } - #[doc = "Change the `host` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SocketElement`*"] + #[deprecated = "Use `set_host()` instead."] pub fn host(&mut self, val: &str) -> &mut Self { self.set_host(val); self } - #[doc = "Change the `port` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SocketElement`*"] + #[deprecated = "Use `set_port()` instead."] pub fn port(&mut self, val: u32) -> &mut Self { self.set_port(val); self } - #[doc = "Change the `received` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SocketElement`*"] + #[deprecated = "Use `set_received()` instead."] pub fn received(&mut self, val: f64) -> &mut Self { self.set_received(val); self } - #[doc = "Change the `sent` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SocketElement`*"] + #[deprecated = "Use `set_sent()` instead."] pub fn sent(&mut self, val: f64) -> &mut Self { self.set_sent(val); self } - #[doc = "Change the `tcp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SocketElement`*"] + #[deprecated = "Use `set_tcp()` instead."] pub fn tcp(&mut self, val: bool) -> &mut Self { self.set_tcp(val); self diff --git a/crates/web-sys/src/features/gen_SocketOptions.rs b/crates/web-sys/src/features/gen_SocketOptions.rs index 4c8f364bae95..3d99e6381c8a 100644 --- a/crates/web-sys/src/features/gen_SocketOptions.rs +++ b/crates/web-sys/src/features/gen_SocketOptions.rs @@ -17,15 +17,21 @@ extern "C" { #[wasm_bindgen(method, getter = "binaryType")] pub fn get_binary_type(this: &SocketOptions) -> Option; #[cfg(feature = "TcpSocketBinaryType")] + #[doc = "Change the `binaryType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SocketOptions`, `TcpSocketBinaryType`*"] #[wasm_bindgen(method, setter = "binaryType")] - fn set_binary_type(this: &SocketOptions, val: TcpSocketBinaryType); + pub fn set_binary_type(this: &SocketOptions, val: TcpSocketBinaryType); #[doc = "Get the `useSecureTransport` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SocketOptions`*"] #[wasm_bindgen(method, getter = "useSecureTransport")] pub fn get_use_secure_transport(this: &SocketOptions) -> Option; + #[doc = "Change the `useSecureTransport` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SocketOptions`*"] #[wasm_bindgen(method, setter = "useSecureTransport")] - fn set_use_secure_transport(this: &SocketOptions, val: bool); + pub fn set_use_secure_transport(this: &SocketOptions, val: bool); } impl SocketOptions { #[doc = "Construct a new `SocketOptions`."] @@ -37,16 +43,12 @@ impl SocketOptions { ret } #[cfg(feature = "TcpSocketBinaryType")] - #[doc = "Change the `binaryType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SocketOptions`, `TcpSocketBinaryType`*"] + #[deprecated = "Use `set_binary_type()` instead."] pub fn binary_type(&mut self, val: TcpSocketBinaryType) -> &mut Self { self.set_binary_type(val); self } - #[doc = "Change the `useSecureTransport` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SocketOptions`*"] + #[deprecated = "Use `set_use_secure_transport()` instead."] pub fn use_secure_transport(&mut self, val: bool) -> &mut Self { self.set_use_secure_transport(val); self diff --git a/crates/web-sys/src/features/gen_SocketsDict.rs b/crates/web-sys/src/features/gen_SocketsDict.rs index 02c7675df014..6a892687caec 100644 --- a/crates/web-sys/src/features/gen_SocketsDict.rs +++ b/crates/web-sys/src/features/gen_SocketsDict.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `SocketsDict`*"] #[wasm_bindgen(method, getter = "received")] pub fn get_received(this: &SocketsDict) -> Option; + #[doc = "Change the `received` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SocketsDict`*"] #[wasm_bindgen(method, setter = "received")] - fn set_received(this: &SocketsDict, val: f64); + pub fn set_received(this: &SocketsDict, val: f64); #[doc = "Get the `sent` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SocketsDict`*"] #[wasm_bindgen(method, getter = "sent")] pub fn get_sent(this: &SocketsDict) -> Option; + #[doc = "Change the `sent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SocketsDict`*"] #[wasm_bindgen(method, setter = "sent")] - fn set_sent(this: &SocketsDict, val: f64); + pub fn set_sent(this: &SocketsDict, val: f64); #[doc = "Get the `sockets` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SocketsDict`*"] #[wasm_bindgen(method, getter = "sockets")] pub fn get_sockets(this: &SocketsDict) -> Option<::js_sys::Array>; + #[doc = "Change the `sockets` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SocketsDict`*"] #[wasm_bindgen(method, setter = "sockets")] - fn set_sockets(this: &SocketsDict, val: &::wasm_bindgen::JsValue); + pub fn set_sockets(this: &SocketsDict, val: &::wasm_bindgen::JsValue); } impl SocketsDict { #[doc = "Construct a new `SocketsDict`."] @@ -41,23 +50,17 @@ impl SocketsDict { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `received` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SocketsDict`*"] + #[deprecated = "Use `set_received()` instead."] pub fn received(&mut self, val: f64) -> &mut Self { self.set_received(val); self } - #[doc = "Change the `sent` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SocketsDict`*"] + #[deprecated = "Use `set_sent()` instead."] pub fn sent(&mut self, val: f64) -> &mut Self { self.set_sent(val); self } - #[doc = "Change the `sockets` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SocketsDict`*"] + #[deprecated = "Use `set_sockets()` instead."] pub fn sockets(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_sockets(val); self diff --git a/crates/web-sys/src/features/gen_SpeechRecognitionErrorInit.rs b/crates/web-sys/src/features/gen_SpeechRecognitionErrorInit.rs index bf0ac37b404c..bc5e60a4e8ef 100644 --- a/crates/web-sys/src/features/gen_SpeechRecognitionErrorInit.rs +++ b/crates/web-sys/src/features/gen_SpeechRecognitionErrorInit.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionErrorInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &SpeechRecognitionErrorInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionErrorInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &SpeechRecognitionErrorInit, val: bool); + pub fn set_bubbles(this: &SpeechRecognitionErrorInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionErrorInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &SpeechRecognitionErrorInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionErrorInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &SpeechRecognitionErrorInit, val: bool); + pub fn set_cancelable(this: &SpeechRecognitionErrorInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionErrorInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &SpeechRecognitionErrorInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionErrorInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &SpeechRecognitionErrorInit, val: bool); + pub fn set_composed(this: &SpeechRecognitionErrorInit, val: bool); #[cfg(feature = "SpeechRecognitionErrorCode")] #[doc = "Get the `error` field of this object."] #[doc = ""] @@ -38,15 +47,21 @@ extern "C" { #[wasm_bindgen(method, getter = "error")] pub fn get_error(this: &SpeechRecognitionErrorInit) -> Option; #[cfg(feature = "SpeechRecognitionErrorCode")] + #[doc = "Change the `error` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionErrorCode`, `SpeechRecognitionErrorInit`*"] #[wasm_bindgen(method, setter = "error")] - fn set_error(this: &SpeechRecognitionErrorInit, val: SpeechRecognitionErrorCode); + pub fn set_error(this: &SpeechRecognitionErrorInit, val: SpeechRecognitionErrorCode); #[doc = "Get the `message` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionErrorInit`*"] #[wasm_bindgen(method, getter = "message")] pub fn get_message(this: &SpeechRecognitionErrorInit) -> Option; + #[doc = "Change the `message` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionErrorInit`*"] #[wasm_bindgen(method, setter = "message")] - fn set_message(this: &SpeechRecognitionErrorInit, val: &str); + pub fn set_message(this: &SpeechRecognitionErrorInit, val: &str); } impl SpeechRecognitionErrorInit { #[doc = "Construct a new `SpeechRecognitionErrorInit`."] @@ -57,38 +72,28 @@ impl SpeechRecognitionErrorInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionErrorInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionErrorInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionErrorInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } #[cfg(feature = "SpeechRecognitionErrorCode")] - #[doc = "Change the `error` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionErrorCode`, `SpeechRecognitionErrorInit`*"] + #[deprecated = "Use `set_error()` instead."] pub fn error(&mut self, val: SpeechRecognitionErrorCode) -> &mut Self { self.set_error(val); self } - #[doc = "Change the `message` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionErrorInit`*"] + #[deprecated = "Use `set_message()` instead."] pub fn message(&mut self, val: &str) -> &mut Self { self.set_message(val); self diff --git a/crates/web-sys/src/features/gen_SpeechRecognitionEventInit.rs b/crates/web-sys/src/features/gen_SpeechRecognitionEventInit.rs index 93662d7e6574..dcd41c8616f3 100644 --- a/crates/web-sys/src/features/gen_SpeechRecognitionEventInit.rs +++ b/crates/web-sys/src/features/gen_SpeechRecognitionEventInit.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &SpeechRecognitionEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &SpeechRecognitionEventInit, val: bool); + pub fn set_bubbles(this: &SpeechRecognitionEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &SpeechRecognitionEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &SpeechRecognitionEventInit, val: bool); + pub fn set_cancelable(this: &SpeechRecognitionEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &SpeechRecognitionEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &SpeechRecognitionEventInit, val: bool); + pub fn set_composed(this: &SpeechRecognitionEventInit, val: bool); #[cfg(feature = "Document")] #[doc = "Get the `emma` field of this object."] #[doc = ""] @@ -38,22 +47,31 @@ extern "C" { #[wasm_bindgen(method, getter = "emma")] pub fn get_emma(this: &SpeechRecognitionEventInit) -> Option; #[cfg(feature = "Document")] + #[doc = "Change the `emma` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Document`, `SpeechRecognitionEventInit`*"] #[wasm_bindgen(method, setter = "emma")] - fn set_emma(this: &SpeechRecognitionEventInit, val: Option<&Document>); + pub fn set_emma(this: &SpeechRecognitionEventInit, val: Option<&Document>); #[doc = "Get the `interpretation` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`*"] #[wasm_bindgen(method, getter = "interpretation")] pub fn get_interpretation(this: &SpeechRecognitionEventInit) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `interpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`*"] #[wasm_bindgen(method, setter = "interpretation")] - fn set_interpretation(this: &SpeechRecognitionEventInit, val: &::wasm_bindgen::JsValue); + pub fn set_interpretation(this: &SpeechRecognitionEventInit, val: &::wasm_bindgen::JsValue); #[doc = "Get the `resultIndex` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`*"] #[wasm_bindgen(method, getter = "resultIndex")] pub fn get_result_index(this: &SpeechRecognitionEventInit) -> Option; + #[doc = "Change the `resultIndex` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`*"] #[wasm_bindgen(method, setter = "resultIndex")] - fn set_result_index(this: &SpeechRecognitionEventInit, val: u32); + pub fn set_result_index(this: &SpeechRecognitionEventInit, val: u32); #[cfg(feature = "SpeechRecognitionResultList")] #[doc = "Get the `results` field of this object."] #[doc = ""] @@ -61,8 +79,14 @@ extern "C" { #[wasm_bindgen(method, getter = "results")] pub fn get_results(this: &SpeechRecognitionEventInit) -> Option; #[cfg(feature = "SpeechRecognitionResultList")] + #[doc = "Change the `results` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`, `SpeechRecognitionResultList`*"] #[wasm_bindgen(method, setter = "results")] - fn set_results(this: &SpeechRecognitionEventInit, val: Option<&SpeechRecognitionResultList>); + pub fn set_results( + this: &SpeechRecognitionEventInit, + val: Option<&SpeechRecognitionResultList>, + ); } impl SpeechRecognitionEventInit { #[doc = "Construct a new `SpeechRecognitionEventInit`."] @@ -73,53 +97,39 @@ impl SpeechRecognitionEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } #[cfg(feature = "Document")] - #[doc = "Change the `emma` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `Document`, `SpeechRecognitionEventInit`*"] + #[deprecated = "Use `set_emma()` instead."] pub fn emma(&mut self, val: Option<&Document>) -> &mut Self { self.set_emma(val); self } - #[doc = "Change the `interpretation` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`*"] + #[deprecated = "Use `set_interpretation()` instead."] pub fn interpretation(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_interpretation(val); self } - #[doc = "Change the `resultIndex` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`*"] + #[deprecated = "Use `set_result_index()` instead."] pub fn result_index(&mut self, val: u32) -> &mut Self { self.set_result_index(val); self } #[cfg(feature = "SpeechRecognitionResultList")] - #[doc = "Change the `results` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`, `SpeechRecognitionResultList`*"] + #[deprecated = "Use `set_results()` instead."] pub fn results(&mut self, val: Option<&SpeechRecognitionResultList>) -> &mut Self { self.set_results(val); self diff --git a/crates/web-sys/src/features/gen_SpeechSynthesisErrorEventInit.rs b/crates/web-sys/src/features/gen_SpeechSynthesisErrorEventInit.rs index 820b35699a61..5ffb68250378 100644 --- a/crates/web-sys/src/features/gen_SpeechSynthesisErrorEventInit.rs +++ b/crates/web-sys/src/features/gen_SpeechSynthesisErrorEventInit.rs @@ -15,50 +15,71 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &SpeechSynthesisErrorEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &SpeechSynthesisErrorEventInit, val: bool); + pub fn set_bubbles(this: &SpeechSynthesisErrorEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &SpeechSynthesisErrorEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &SpeechSynthesisErrorEventInit, val: bool); + pub fn set_cancelable(this: &SpeechSynthesisErrorEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &SpeechSynthesisErrorEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &SpeechSynthesisErrorEventInit, val: bool); + pub fn set_composed(this: &SpeechSynthesisErrorEventInit, val: bool); #[doc = "Get the `charIndex` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] #[wasm_bindgen(method, getter = "charIndex")] pub fn get_char_index(this: &SpeechSynthesisErrorEventInit) -> Option; + #[doc = "Change the `charIndex` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] #[wasm_bindgen(method, setter = "charIndex")] - fn set_char_index(this: &SpeechSynthesisErrorEventInit, val: u32); + pub fn set_char_index(this: &SpeechSynthesisErrorEventInit, val: u32); #[doc = "Get the `charLength` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] #[wasm_bindgen(method, getter = "charLength")] pub fn get_char_length(this: &SpeechSynthesisErrorEventInit) -> Option; + #[doc = "Change the `charLength` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] #[wasm_bindgen(method, setter = "charLength")] - fn set_char_length(this: &SpeechSynthesisErrorEventInit, val: Option); + pub fn set_char_length(this: &SpeechSynthesisErrorEventInit, val: Option); #[doc = "Get the `elapsedTime` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] #[wasm_bindgen(method, getter = "elapsedTime")] pub fn get_elapsed_time(this: &SpeechSynthesisErrorEventInit) -> Option; + #[doc = "Change the `elapsedTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] #[wasm_bindgen(method, setter = "elapsedTime")] - fn set_elapsed_time(this: &SpeechSynthesisErrorEventInit, val: f32); + pub fn set_elapsed_time(this: &SpeechSynthesisErrorEventInit, val: f32); #[doc = "Get the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] #[wasm_bindgen(method, getter = "name")] pub fn get_name(this: &SpeechSynthesisErrorEventInit) -> Option; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] #[wasm_bindgen(method, setter = "name")] - fn set_name(this: &SpeechSynthesisErrorEventInit, val: &str); + pub fn set_name(this: &SpeechSynthesisErrorEventInit, val: &str); #[cfg(feature = "SpeechSynthesisUtterance")] #[doc = "Get the `utterance` field of this object."] #[doc = ""] @@ -66,8 +87,11 @@ extern "C" { #[wasm_bindgen(method, getter = "utterance")] pub fn get_utterance(this: &SpeechSynthesisErrorEventInit) -> SpeechSynthesisUtterance; #[cfg(feature = "SpeechSynthesisUtterance")] + #[doc = "Change the `utterance` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`, `SpeechSynthesisUtterance`*"] #[wasm_bindgen(method, setter = "utterance")] - fn set_utterance(this: &SpeechSynthesisErrorEventInit, val: &SpeechSynthesisUtterance); + pub fn set_utterance(this: &SpeechSynthesisErrorEventInit, val: &SpeechSynthesisUtterance); #[cfg(feature = "SpeechSynthesisErrorCode")] #[doc = "Get the `error` field of this object."] #[doc = ""] @@ -75,8 +99,11 @@ extern "C" { #[wasm_bindgen(method, getter = "error")] pub fn get_error(this: &SpeechSynthesisErrorEventInit) -> SpeechSynthesisErrorCode; #[cfg(feature = "SpeechSynthesisErrorCode")] + #[doc = "Change the `error` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorCode`, `SpeechSynthesisErrorEventInit`*"] #[wasm_bindgen(method, setter = "error")] - fn set_error(this: &SpeechSynthesisErrorEventInit, val: SpeechSynthesisErrorCode); + pub fn set_error(this: &SpeechSynthesisErrorEventInit, val: SpeechSynthesisErrorCode); } impl SpeechSynthesisErrorEventInit { #[cfg(all( @@ -93,67 +120,49 @@ impl SpeechSynthesisErrorEventInit { ret.error(error); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } - #[doc = "Change the `charIndex` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] + #[deprecated = "Use `set_char_index()` instead."] pub fn char_index(&mut self, val: u32) -> &mut Self { self.set_char_index(val); self } - #[doc = "Change the `charLength` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] + #[deprecated = "Use `set_char_length()` instead."] pub fn char_length(&mut self, val: Option) -> &mut Self { self.set_char_length(val); self } - #[doc = "Change the `elapsedTime` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] + #[deprecated = "Use `set_elapsed_time()` instead."] pub fn elapsed_time(&mut self, val: f32) -> &mut Self { self.set_elapsed_time(val); self } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { self.set_name(val); self } #[cfg(feature = "SpeechSynthesisUtterance")] - #[doc = "Change the `utterance` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`, `SpeechSynthesisUtterance`*"] + #[deprecated = "Use `set_utterance()` instead."] pub fn utterance(&mut self, val: &SpeechSynthesisUtterance) -> &mut Self { self.set_utterance(val); self } #[cfg(feature = "SpeechSynthesisErrorCode")] - #[doc = "Change the `error` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorCode`, `SpeechSynthesisErrorEventInit`*"] + #[deprecated = "Use `set_error()` instead."] pub fn error(&mut self, val: SpeechSynthesisErrorCode) -> &mut Self { self.set_error(val); self diff --git a/crates/web-sys/src/features/gen_SpeechSynthesisEventInit.rs b/crates/web-sys/src/features/gen_SpeechSynthesisEventInit.rs index b15866446069..e3f4eed47a74 100644 --- a/crates/web-sys/src/features/gen_SpeechSynthesisEventInit.rs +++ b/crates/web-sys/src/features/gen_SpeechSynthesisEventInit.rs @@ -15,50 +15,71 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &SpeechSynthesisEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &SpeechSynthesisEventInit, val: bool); + pub fn set_bubbles(this: &SpeechSynthesisEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &SpeechSynthesisEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &SpeechSynthesisEventInit, val: bool); + pub fn set_cancelable(this: &SpeechSynthesisEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &SpeechSynthesisEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &SpeechSynthesisEventInit, val: bool); + pub fn set_composed(this: &SpeechSynthesisEventInit, val: bool); #[doc = "Get the `charIndex` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] #[wasm_bindgen(method, getter = "charIndex")] pub fn get_char_index(this: &SpeechSynthesisEventInit) -> Option; + #[doc = "Change the `charIndex` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] #[wasm_bindgen(method, setter = "charIndex")] - fn set_char_index(this: &SpeechSynthesisEventInit, val: u32); + pub fn set_char_index(this: &SpeechSynthesisEventInit, val: u32); #[doc = "Get the `charLength` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] #[wasm_bindgen(method, getter = "charLength")] pub fn get_char_length(this: &SpeechSynthesisEventInit) -> Option; + #[doc = "Change the `charLength` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] #[wasm_bindgen(method, setter = "charLength")] - fn set_char_length(this: &SpeechSynthesisEventInit, val: Option); + pub fn set_char_length(this: &SpeechSynthesisEventInit, val: Option); #[doc = "Get the `elapsedTime` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] #[wasm_bindgen(method, getter = "elapsedTime")] pub fn get_elapsed_time(this: &SpeechSynthesisEventInit) -> Option; + #[doc = "Change the `elapsedTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] #[wasm_bindgen(method, setter = "elapsedTime")] - fn set_elapsed_time(this: &SpeechSynthesisEventInit, val: f32); + pub fn set_elapsed_time(this: &SpeechSynthesisEventInit, val: f32); #[doc = "Get the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] #[wasm_bindgen(method, getter = "name")] pub fn get_name(this: &SpeechSynthesisEventInit) -> Option; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] #[wasm_bindgen(method, setter = "name")] - fn set_name(this: &SpeechSynthesisEventInit, val: &str); + pub fn set_name(this: &SpeechSynthesisEventInit, val: &str); #[cfg(feature = "SpeechSynthesisUtterance")] #[doc = "Get the `utterance` field of this object."] #[doc = ""] @@ -66,8 +87,11 @@ extern "C" { #[wasm_bindgen(method, getter = "utterance")] pub fn get_utterance(this: &SpeechSynthesisEventInit) -> SpeechSynthesisUtterance; #[cfg(feature = "SpeechSynthesisUtterance")] + #[doc = "Change the `utterance` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`, `SpeechSynthesisUtterance`*"] #[wasm_bindgen(method, setter = "utterance")] - fn set_utterance(this: &SpeechSynthesisEventInit, val: &SpeechSynthesisUtterance); + pub fn set_utterance(this: &SpeechSynthesisEventInit, val: &SpeechSynthesisUtterance); } impl SpeechSynthesisEventInit { #[cfg(feature = "SpeechSynthesisUtterance")] @@ -80,59 +104,43 @@ impl SpeechSynthesisEventInit { ret.utterance(utterance); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } - #[doc = "Change the `charIndex` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] + #[deprecated = "Use `set_char_index()` instead."] pub fn char_index(&mut self, val: u32) -> &mut Self { self.set_char_index(val); self } - #[doc = "Change the `charLength` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] + #[deprecated = "Use `set_char_length()` instead."] pub fn char_length(&mut self, val: Option) -> &mut Self { self.set_char_length(val); self } - #[doc = "Change the `elapsedTime` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] + #[deprecated = "Use `set_elapsed_time()` instead."] pub fn elapsed_time(&mut self, val: f32) -> &mut Self { self.set_elapsed_time(val); self } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { self.set_name(val); self } #[cfg(feature = "SpeechSynthesisUtterance")] - #[doc = "Change the `utterance` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`, `SpeechSynthesisUtterance`*"] + #[deprecated = "Use `set_utterance()` instead."] pub fn utterance(&mut self, val: &SpeechSynthesisUtterance) -> &mut Self { self.set_utterance(val); self diff --git a/crates/web-sys/src/features/gen_StereoPannerOptions.rs b/crates/web-sys/src/features/gen_StereoPannerOptions.rs index 727162ab9128..3a56b27f0135 100644 --- a/crates/web-sys/src/features/gen_StereoPannerOptions.rs +++ b/crates/web-sys/src/features/gen_StereoPannerOptions.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `StereoPannerOptions`*"] #[wasm_bindgen(method, getter = "channelCount")] pub fn get_channel_count(this: &StereoPannerOptions) -> Option; + #[doc = "Change the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StereoPannerOptions`*"] #[wasm_bindgen(method, setter = "channelCount")] - fn set_channel_count(this: &StereoPannerOptions, val: u32); + pub fn set_channel_count(this: &StereoPannerOptions, val: u32); #[cfg(feature = "ChannelCountMode")] #[doc = "Get the `channelCountMode` field of this object."] #[doc = ""] @@ -24,8 +27,11 @@ extern "C" { #[wasm_bindgen(method, getter = "channelCountMode")] pub fn get_channel_count_mode(this: &StereoPannerOptions) -> Option; #[cfg(feature = "ChannelCountMode")] + #[doc = "Change the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `StereoPannerOptions`*"] #[wasm_bindgen(method, setter = "channelCountMode")] - fn set_channel_count_mode(this: &StereoPannerOptions, val: ChannelCountMode); + pub fn set_channel_count_mode(this: &StereoPannerOptions, val: ChannelCountMode); #[cfg(feature = "ChannelInterpretation")] #[doc = "Get the `channelInterpretation` field of this object."] #[doc = ""] @@ -33,15 +39,21 @@ extern "C" { #[wasm_bindgen(method, getter = "channelInterpretation")] pub fn get_channel_interpretation(this: &StereoPannerOptions) -> Option; #[cfg(feature = "ChannelInterpretation")] + #[doc = "Change the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `StereoPannerOptions`*"] #[wasm_bindgen(method, setter = "channelInterpretation")] - fn set_channel_interpretation(this: &StereoPannerOptions, val: ChannelInterpretation); + pub fn set_channel_interpretation(this: &StereoPannerOptions, val: ChannelInterpretation); #[doc = "Get the `pan` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StereoPannerOptions`*"] #[wasm_bindgen(method, getter = "pan")] pub fn get_pan(this: &StereoPannerOptions) -> Option; + #[doc = "Change the `pan` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StereoPannerOptions`*"] #[wasm_bindgen(method, setter = "pan")] - fn set_pan(this: &StereoPannerOptions, val: f32); + pub fn set_pan(this: &StereoPannerOptions, val: f32); } impl StereoPannerOptions { #[doc = "Construct a new `StereoPannerOptions`."] @@ -52,32 +64,24 @@ impl StereoPannerOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `channelCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `StereoPannerOptions`*"] + #[deprecated = "Use `set_channel_count()` instead."] pub fn channel_count(&mut self, val: u32) -> &mut Self { self.set_channel_count(val); self } #[cfg(feature = "ChannelCountMode")] - #[doc = "Change the `channelCountMode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `StereoPannerOptions`*"] + #[deprecated = "Use `set_channel_count_mode()` instead."] pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self { self.set_channel_count_mode(val); self } #[cfg(feature = "ChannelInterpretation")] - #[doc = "Change the `channelInterpretation` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `StereoPannerOptions`*"] + #[deprecated = "Use `set_channel_interpretation()` instead."] pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self { self.set_channel_interpretation(val); self } - #[doc = "Change the `pan` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `StereoPannerOptions`*"] + #[deprecated = "Use `set_pan()` instead."] pub fn pan(&mut self, val: f32) -> &mut Self { self.set_pan(val); self diff --git a/crates/web-sys/src/features/gen_StorageEstimate.rs b/crates/web-sys/src/features/gen_StorageEstimate.rs index 66965a7d3f77..bd360574641f 100644 --- a/crates/web-sys/src/features/gen_StorageEstimate.rs +++ b/crates/web-sys/src/features/gen_StorageEstimate.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `StorageEstimate`*"] #[wasm_bindgen(method, getter = "quota")] pub fn get_quota(this: &StorageEstimate) -> Option; + #[doc = "Change the `quota` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StorageEstimate`*"] #[wasm_bindgen(method, setter = "quota")] - fn set_quota(this: &StorageEstimate, val: f64); + pub fn set_quota(this: &StorageEstimate, val: f64); #[doc = "Get the `usage` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StorageEstimate`*"] #[wasm_bindgen(method, getter = "usage")] pub fn get_usage(this: &StorageEstimate) -> Option; + #[doc = "Change the `usage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StorageEstimate`*"] #[wasm_bindgen(method, setter = "usage")] - fn set_usage(this: &StorageEstimate, val: f64); + pub fn set_usage(this: &StorageEstimate, val: f64); } impl StorageEstimate { #[doc = "Construct a new `StorageEstimate`."] @@ -34,16 +40,12 @@ impl StorageEstimate { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `quota` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `StorageEstimate`*"] + #[deprecated = "Use `set_quota()` instead."] pub fn quota(&mut self, val: f64) -> &mut Self { self.set_quota(val); self } - #[doc = "Change the `usage` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `StorageEstimate`*"] + #[deprecated = "Use `set_usage()` instead."] pub fn usage(&mut self, val: f64) -> &mut Self { self.set_usage(val); self diff --git a/crates/web-sys/src/features/gen_StorageEventInit.rs b/crates/web-sys/src/features/gen_StorageEventInit.rs index 105b51cccede..51db65614851 100644 --- a/crates/web-sys/src/features/gen_StorageEventInit.rs +++ b/crates/web-sys/src/features/gen_StorageEventInit.rs @@ -15,43 +15,61 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &StorageEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &StorageEventInit, val: bool); + pub fn set_bubbles(this: &StorageEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &StorageEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &StorageEventInit, val: bool); + pub fn set_cancelable(this: &StorageEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &StorageEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &StorageEventInit, val: bool); + pub fn set_composed(this: &StorageEventInit, val: bool); #[doc = "Get the `key` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] #[wasm_bindgen(method, getter = "key")] pub fn get_key(this: &StorageEventInit) -> Option; + #[doc = "Change the `key` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] #[wasm_bindgen(method, setter = "key")] - fn set_key(this: &StorageEventInit, val: Option<&str>); + pub fn set_key(this: &StorageEventInit, val: Option<&str>); #[doc = "Get the `newValue` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] #[wasm_bindgen(method, getter = "newValue")] pub fn get_new_value(this: &StorageEventInit) -> Option; + #[doc = "Change the `newValue` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] #[wasm_bindgen(method, setter = "newValue")] - fn set_new_value(this: &StorageEventInit, val: Option<&str>); + pub fn set_new_value(this: &StorageEventInit, val: Option<&str>); #[doc = "Get the `oldValue` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] #[wasm_bindgen(method, getter = "oldValue")] pub fn get_old_value(this: &StorageEventInit) -> Option; + #[doc = "Change the `oldValue` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] #[wasm_bindgen(method, setter = "oldValue")] - fn set_old_value(this: &StorageEventInit, val: Option<&str>); + pub fn set_old_value(this: &StorageEventInit, val: Option<&str>); #[cfg(feature = "Storage")] #[doc = "Get the `storageArea` field of this object."] #[doc = ""] @@ -59,15 +77,21 @@ extern "C" { #[wasm_bindgen(method, getter = "storageArea")] pub fn get_storage_area(this: &StorageEventInit) -> Option; #[cfg(feature = "Storage")] + #[doc = "Change the `storageArea` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Storage`, `StorageEventInit`*"] #[wasm_bindgen(method, setter = "storageArea")] - fn set_storage_area(this: &StorageEventInit, val: Option<&Storage>); + pub fn set_storage_area(this: &StorageEventInit, val: Option<&Storage>); #[doc = "Get the `url` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] #[wasm_bindgen(method, getter = "url")] pub fn get_url(this: &StorageEventInit) -> Option; + #[doc = "Change the `url` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] #[wasm_bindgen(method, setter = "url")] - fn set_url(this: &StorageEventInit, val: &str); + pub fn set_url(this: &StorageEventInit, val: &str); } impl StorageEventInit { #[doc = "Construct a new `StorageEventInit`."] @@ -78,59 +102,43 @@ impl StorageEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } - #[doc = "Change the `key` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] + #[deprecated = "Use `set_key()` instead."] pub fn key(&mut self, val: Option<&str>) -> &mut Self { self.set_key(val); self } - #[doc = "Change the `newValue` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] + #[deprecated = "Use `set_new_value()` instead."] pub fn new_value(&mut self, val: Option<&str>) -> &mut Self { self.set_new_value(val); self } - #[doc = "Change the `oldValue` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] + #[deprecated = "Use `set_old_value()` instead."] pub fn old_value(&mut self, val: Option<&str>) -> &mut Self { self.set_old_value(val); self } #[cfg(feature = "Storage")] - #[doc = "Change the `storageArea` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `Storage`, `StorageEventInit`*"] + #[deprecated = "Use `set_storage_area()` instead."] pub fn storage_area(&mut self, val: Option<&Storage>) -> &mut Self { self.set_storage_area(val); self } - #[doc = "Change the `url` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] + #[deprecated = "Use `set_url()` instead."] pub fn url(&mut self, val: &str) -> &mut Self { self.set_url(val); self diff --git a/crates/web-sys/src/features/gen_StreamPipeOptions.rs b/crates/web-sys/src/features/gen_StreamPipeOptions.rs index d86a0cf0778c..a23579d144b5 100644 --- a/crates/web-sys/src/features/gen_StreamPipeOptions.rs +++ b/crates/web-sys/src/features/gen_StreamPipeOptions.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `StreamPipeOptions`*"] #[wasm_bindgen(method, getter = "preventAbort")] pub fn get_prevent_abort(this: &StreamPipeOptions) -> Option; + #[doc = "Change the `preventAbort` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StreamPipeOptions`*"] #[wasm_bindgen(method, setter = "preventAbort")] - fn set_prevent_abort(this: &StreamPipeOptions, val: bool); + pub fn set_prevent_abort(this: &StreamPipeOptions, val: bool); #[doc = "Get the `preventCancel` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StreamPipeOptions`*"] #[wasm_bindgen(method, getter = "preventCancel")] pub fn get_prevent_cancel(this: &StreamPipeOptions) -> Option; + #[doc = "Change the `preventCancel` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StreamPipeOptions`*"] #[wasm_bindgen(method, setter = "preventCancel")] - fn set_prevent_cancel(this: &StreamPipeOptions, val: bool); + pub fn set_prevent_cancel(this: &StreamPipeOptions, val: bool); #[doc = "Get the `preventClose` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StreamPipeOptions`*"] #[wasm_bindgen(method, getter = "preventClose")] pub fn get_prevent_close(this: &StreamPipeOptions) -> Option; + #[doc = "Change the `preventClose` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StreamPipeOptions`*"] #[wasm_bindgen(method, setter = "preventClose")] - fn set_prevent_close(this: &StreamPipeOptions, val: bool); + pub fn set_prevent_close(this: &StreamPipeOptions, val: bool); #[cfg(feature = "AbortSignal")] #[doc = "Get the `signal` field of this object."] #[doc = ""] @@ -38,8 +47,11 @@ extern "C" { #[wasm_bindgen(method, getter = "signal")] pub fn get_signal(this: &StreamPipeOptions) -> Option; #[cfg(feature = "AbortSignal")] + #[doc = "Change the `signal` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `StreamPipeOptions`*"] #[wasm_bindgen(method, setter = "signal")] - fn set_signal(this: &StreamPipeOptions, val: &AbortSignal); + pub fn set_signal(this: &StreamPipeOptions, val: &AbortSignal); } impl StreamPipeOptions { #[doc = "Construct a new `StreamPipeOptions`."] @@ -50,31 +62,23 @@ impl StreamPipeOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `preventAbort` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `StreamPipeOptions`*"] + #[deprecated = "Use `set_prevent_abort()` instead."] pub fn prevent_abort(&mut self, val: bool) -> &mut Self { self.set_prevent_abort(val); self } - #[doc = "Change the `preventCancel` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `StreamPipeOptions`*"] + #[deprecated = "Use `set_prevent_cancel()` instead."] pub fn prevent_cancel(&mut self, val: bool) -> &mut Self { self.set_prevent_cancel(val); self } - #[doc = "Change the `preventClose` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `StreamPipeOptions`*"] + #[deprecated = "Use `set_prevent_close()` instead."] pub fn prevent_close(&mut self, val: bool) -> &mut Self { self.set_prevent_close(val); self } #[cfg(feature = "AbortSignal")] - #[doc = "Change the `signal` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `StreamPipeOptions`*"] + #[deprecated = "Use `set_signal()` instead."] pub fn signal(&mut self, val: &AbortSignal) -> &mut Self { self.set_signal(val); self diff --git a/crates/web-sys/src/features/gen_StyleRuleChangeEventInit.rs b/crates/web-sys/src/features/gen_StyleRuleChangeEventInit.rs index 5202c670aa36..9366e1e73451 100644 --- a/crates/web-sys/src/features/gen_StyleRuleChangeEventInit.rs +++ b/crates/web-sys/src/features/gen_StyleRuleChangeEventInit.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `StyleRuleChangeEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &StyleRuleChangeEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StyleRuleChangeEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &StyleRuleChangeEventInit, val: bool); + pub fn set_bubbles(this: &StyleRuleChangeEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StyleRuleChangeEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &StyleRuleChangeEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StyleRuleChangeEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &StyleRuleChangeEventInit, val: bool); + pub fn set_cancelable(this: &StyleRuleChangeEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StyleRuleChangeEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &StyleRuleChangeEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StyleRuleChangeEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &StyleRuleChangeEventInit, val: bool); + pub fn set_composed(this: &StyleRuleChangeEventInit, val: bool); #[cfg(feature = "CssRule")] #[doc = "Get the `rule` field of this object."] #[doc = ""] @@ -38,8 +47,11 @@ extern "C" { #[wasm_bindgen(method, getter = "rule")] pub fn get_rule(this: &StyleRuleChangeEventInit) -> Option; #[cfg(feature = "CssRule")] + #[doc = "Change the `rule` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CssRule`, `StyleRuleChangeEventInit`*"] #[wasm_bindgen(method, setter = "rule")] - fn set_rule(this: &StyleRuleChangeEventInit, val: Option<&CssRule>); + pub fn set_rule(this: &StyleRuleChangeEventInit, val: Option<&CssRule>); #[cfg(feature = "CssStyleSheet")] #[doc = "Get the `stylesheet` field of this object."] #[doc = ""] @@ -47,8 +59,11 @@ extern "C" { #[wasm_bindgen(method, getter = "stylesheet")] pub fn get_stylesheet(this: &StyleRuleChangeEventInit) -> Option; #[cfg(feature = "CssStyleSheet")] + #[doc = "Change the `stylesheet` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CssStyleSheet`, `StyleRuleChangeEventInit`*"] #[wasm_bindgen(method, setter = "stylesheet")] - fn set_stylesheet(this: &StyleRuleChangeEventInit, val: Option<&CssStyleSheet>); + pub fn set_stylesheet(this: &StyleRuleChangeEventInit, val: Option<&CssStyleSheet>); } impl StyleRuleChangeEventInit { #[doc = "Construct a new `StyleRuleChangeEventInit`."] @@ -59,39 +74,29 @@ impl StyleRuleChangeEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `StyleRuleChangeEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `StyleRuleChangeEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `StyleRuleChangeEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } #[cfg(feature = "CssRule")] - #[doc = "Change the `rule` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CssRule`, `StyleRuleChangeEventInit`*"] + #[deprecated = "Use `set_rule()` instead."] pub fn rule(&mut self, val: Option<&CssRule>) -> &mut Self { self.set_rule(val); self } #[cfg(feature = "CssStyleSheet")] - #[doc = "Change the `stylesheet` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CssStyleSheet`, `StyleRuleChangeEventInit`*"] + #[deprecated = "Use `set_stylesheet()` instead."] pub fn stylesheet(&mut self, val: Option<&CssStyleSheet>) -> &mut Self { self.set_stylesheet(val); self diff --git a/crates/web-sys/src/features/gen_StyleSheetApplicableStateChangeEventInit.rs b/crates/web-sys/src/features/gen_StyleSheetApplicableStateChangeEventInit.rs index c4d2647998af..70aecd5ed6fe 100644 --- a/crates/web-sys/src/features/gen_StyleSheetApplicableStateChangeEventInit.rs +++ b/crates/web-sys/src/features/gen_StyleSheetApplicableStateChangeEventInit.rs @@ -15,29 +15,41 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `StyleSheetApplicableStateChangeEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &StyleSheetApplicableStateChangeEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StyleSheetApplicableStateChangeEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &StyleSheetApplicableStateChangeEventInit, val: bool); + pub fn set_bubbles(this: &StyleSheetApplicableStateChangeEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StyleSheetApplicableStateChangeEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &StyleSheetApplicableStateChangeEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StyleSheetApplicableStateChangeEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &StyleSheetApplicableStateChangeEventInit, val: bool); + pub fn set_cancelable(this: &StyleSheetApplicableStateChangeEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StyleSheetApplicableStateChangeEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &StyleSheetApplicableStateChangeEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StyleSheetApplicableStateChangeEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &StyleSheetApplicableStateChangeEventInit, val: bool); + pub fn set_composed(this: &StyleSheetApplicableStateChangeEventInit, val: bool); #[doc = "Get the `applicable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StyleSheetApplicableStateChangeEventInit`*"] #[wasm_bindgen(method, getter = "applicable")] pub fn get_applicable(this: &StyleSheetApplicableStateChangeEventInit) -> Option; + #[doc = "Change the `applicable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StyleSheetApplicableStateChangeEventInit`*"] #[wasm_bindgen(method, setter = "applicable")] - fn set_applicable(this: &StyleSheetApplicableStateChangeEventInit, val: bool); + pub fn set_applicable(this: &StyleSheetApplicableStateChangeEventInit, val: bool); #[cfg(feature = "CssStyleSheet")] #[doc = "Get the `stylesheet` field of this object."] #[doc = ""] @@ -46,8 +58,14 @@ extern "C" { pub fn get_stylesheet(this: &StyleSheetApplicableStateChangeEventInit) -> Option; #[cfg(feature = "CssStyleSheet")] + #[doc = "Change the `stylesheet` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CssStyleSheet`, `StyleSheetApplicableStateChangeEventInit`*"] #[wasm_bindgen(method, setter = "stylesheet")] - fn set_stylesheet(this: &StyleSheetApplicableStateChangeEventInit, val: Option<&CssStyleSheet>); + pub fn set_stylesheet( + this: &StyleSheetApplicableStateChangeEventInit, + val: Option<&CssStyleSheet>, + ); } impl StyleSheetApplicableStateChangeEventInit { #[doc = "Construct a new `StyleSheetApplicableStateChangeEventInit`."] @@ -58,38 +76,28 @@ impl StyleSheetApplicableStateChangeEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `StyleSheetApplicableStateChangeEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `StyleSheetApplicableStateChangeEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `StyleSheetApplicableStateChangeEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } - #[doc = "Change the `applicable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `StyleSheetApplicableStateChangeEventInit`*"] + #[deprecated = "Use `set_applicable()` instead."] pub fn applicable(&mut self, val: bool) -> &mut Self { self.set_applicable(val); self } #[cfg(feature = "CssStyleSheet")] - #[doc = "Change the `stylesheet` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CssStyleSheet`, `StyleSheetApplicableStateChangeEventInit`*"] + #[deprecated = "Use `set_stylesheet()` instead."] pub fn stylesheet(&mut self, val: Option<&CssStyleSheet>) -> &mut Self { self.set_stylesheet(val); self diff --git a/crates/web-sys/src/features/gen_StyleSheetChangeEventInit.rs b/crates/web-sys/src/features/gen_StyleSheetChangeEventInit.rs index 39b4a0e370b4..a0d658a71fdf 100644 --- a/crates/web-sys/src/features/gen_StyleSheetChangeEventInit.rs +++ b/crates/web-sys/src/features/gen_StyleSheetChangeEventInit.rs @@ -15,29 +15,41 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `StyleSheetChangeEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &StyleSheetChangeEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StyleSheetChangeEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &StyleSheetChangeEventInit, val: bool); + pub fn set_bubbles(this: &StyleSheetChangeEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StyleSheetChangeEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &StyleSheetChangeEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StyleSheetChangeEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &StyleSheetChangeEventInit, val: bool); + pub fn set_cancelable(this: &StyleSheetChangeEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StyleSheetChangeEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &StyleSheetChangeEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StyleSheetChangeEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &StyleSheetChangeEventInit, val: bool); + pub fn set_composed(this: &StyleSheetChangeEventInit, val: bool); #[doc = "Get the `documentSheet` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StyleSheetChangeEventInit`*"] #[wasm_bindgen(method, getter = "documentSheet")] pub fn get_document_sheet(this: &StyleSheetChangeEventInit) -> Option; + #[doc = "Change the `documentSheet` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StyleSheetChangeEventInit`*"] #[wasm_bindgen(method, setter = "documentSheet")] - fn set_document_sheet(this: &StyleSheetChangeEventInit, val: bool); + pub fn set_document_sheet(this: &StyleSheetChangeEventInit, val: bool); #[cfg(feature = "CssStyleSheet")] #[doc = "Get the `stylesheet` field of this object."] #[doc = ""] @@ -45,8 +57,11 @@ extern "C" { #[wasm_bindgen(method, getter = "stylesheet")] pub fn get_stylesheet(this: &StyleSheetChangeEventInit) -> Option; #[cfg(feature = "CssStyleSheet")] + #[doc = "Change the `stylesheet` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CssStyleSheet`, `StyleSheetChangeEventInit`*"] #[wasm_bindgen(method, setter = "stylesheet")] - fn set_stylesheet(this: &StyleSheetChangeEventInit, val: Option<&CssStyleSheet>); + pub fn set_stylesheet(this: &StyleSheetChangeEventInit, val: Option<&CssStyleSheet>); } impl StyleSheetChangeEventInit { #[doc = "Construct a new `StyleSheetChangeEventInit`."] @@ -57,38 +72,28 @@ impl StyleSheetChangeEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `StyleSheetChangeEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `StyleSheetChangeEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `StyleSheetChangeEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } - #[doc = "Change the `documentSheet` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `StyleSheetChangeEventInit`*"] + #[deprecated = "Use `set_document_sheet()` instead."] pub fn document_sheet(&mut self, val: bool) -> &mut Self { self.set_document_sheet(val); self } #[cfg(feature = "CssStyleSheet")] - #[doc = "Change the `stylesheet` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CssStyleSheet`, `StyleSheetChangeEventInit`*"] + #[deprecated = "Use `set_stylesheet()` instead."] pub fn stylesheet(&mut self, val: Option<&CssStyleSheet>) -> &mut Self { self.set_stylesheet(val); self diff --git a/crates/web-sys/src/features/gen_SubmitEventInit.rs b/crates/web-sys/src/features/gen_SubmitEventInit.rs index c5e04f944623..4d954d50e3f4 100644 --- a/crates/web-sys/src/features/gen_SubmitEventInit.rs +++ b/crates/web-sys/src/features/gen_SubmitEventInit.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `SubmitEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &SubmitEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SubmitEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &SubmitEventInit, val: bool); + pub fn set_bubbles(this: &SubmitEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SubmitEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &SubmitEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SubmitEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &SubmitEventInit, val: bool); + pub fn set_cancelable(this: &SubmitEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SubmitEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &SubmitEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SubmitEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &SubmitEventInit, val: bool); + pub fn set_composed(this: &SubmitEventInit, val: bool); #[cfg(feature = "HtmlElement")] #[doc = "Get the `submitter` field of this object."] #[doc = ""] @@ -38,8 +47,11 @@ extern "C" { #[wasm_bindgen(method, getter = "submitter")] pub fn get_submitter(this: &SubmitEventInit) -> Option; #[cfg(feature = "HtmlElement")] + #[doc = "Change the `submitter` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HtmlElement`, `SubmitEventInit`*"] #[wasm_bindgen(method, setter = "submitter")] - fn set_submitter(this: &SubmitEventInit, val: Option<&HtmlElement>); + pub fn set_submitter(this: &SubmitEventInit, val: Option<&HtmlElement>); } impl SubmitEventInit { #[doc = "Construct a new `SubmitEventInit`."] @@ -50,31 +62,23 @@ impl SubmitEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SubmitEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SubmitEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SubmitEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } #[cfg(feature = "HtmlElement")] - #[doc = "Change the `submitter` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HtmlElement`, `SubmitEventInit`*"] + #[deprecated = "Use `set_submitter()` instead."] pub fn submitter(&mut self, val: Option<&HtmlElement>) -> &mut Self { self.set_submitter(val); self diff --git a/crates/web-sys/src/features/gen_SvcOutputMetadata.rs b/crates/web-sys/src/features/gen_SvcOutputMetadata.rs index 7c7d3028cf5c..84f9d00dd6a6 100644 --- a/crates/web-sys/src/features/gen_SvcOutputMetadata.rs +++ b/crates/web-sys/src/features/gen_SvcOutputMetadata.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "temporalLayerId")] pub fn get_temporal_layer_id(this: &SvcOutputMetadata) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `temporalLayerId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SvcOutputMetadata`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "temporalLayerId")] - fn set_temporal_layer_id(this: &SvcOutputMetadata, val: u32); + pub fn set_temporal_layer_id(this: &SvcOutputMetadata, val: u32); } #[cfg(web_sys_unstable_apis)] impl SvcOutputMetadata { @@ -40,12 +47,7 @@ impl SvcOutputMetadata { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `temporalLayerId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SvcOutputMetadata`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_temporal_layer_id()` instead."] pub fn temporal_layer_id(&mut self, val: u32) -> &mut Self { self.set_temporal_layer_id(val); self diff --git a/crates/web-sys/src/features/gen_SvgBoundingBoxOptions.rs b/crates/web-sys/src/features/gen_SvgBoundingBoxOptions.rs index 781d581db54a..fc9141bf2fc2 100644 --- a/crates/web-sys/src/features/gen_SvgBoundingBoxOptions.rs +++ b/crates/web-sys/src/features/gen_SvgBoundingBoxOptions.rs @@ -15,29 +15,41 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `SvgBoundingBoxOptions`*"] #[wasm_bindgen(method, getter = "clipped")] pub fn get_clipped(this: &SvgBoundingBoxOptions) -> Option; + #[doc = "Change the `clipped` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SvgBoundingBoxOptions`*"] #[wasm_bindgen(method, setter = "clipped")] - fn set_clipped(this: &SvgBoundingBoxOptions, val: bool); + pub fn set_clipped(this: &SvgBoundingBoxOptions, val: bool); #[doc = "Get the `fill` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SvgBoundingBoxOptions`*"] #[wasm_bindgen(method, getter = "fill")] pub fn get_fill(this: &SvgBoundingBoxOptions) -> Option; + #[doc = "Change the `fill` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SvgBoundingBoxOptions`*"] #[wasm_bindgen(method, setter = "fill")] - fn set_fill(this: &SvgBoundingBoxOptions, val: bool); + pub fn set_fill(this: &SvgBoundingBoxOptions, val: bool); #[doc = "Get the `markers` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SvgBoundingBoxOptions`*"] #[wasm_bindgen(method, getter = "markers")] pub fn get_markers(this: &SvgBoundingBoxOptions) -> Option; + #[doc = "Change the `markers` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SvgBoundingBoxOptions`*"] #[wasm_bindgen(method, setter = "markers")] - fn set_markers(this: &SvgBoundingBoxOptions, val: bool); + pub fn set_markers(this: &SvgBoundingBoxOptions, val: bool); #[doc = "Get the `stroke` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SvgBoundingBoxOptions`*"] #[wasm_bindgen(method, getter = "stroke")] pub fn get_stroke(this: &SvgBoundingBoxOptions) -> Option; + #[doc = "Change the `stroke` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SvgBoundingBoxOptions`*"] #[wasm_bindgen(method, setter = "stroke")] - fn set_stroke(this: &SvgBoundingBoxOptions, val: bool); + pub fn set_stroke(this: &SvgBoundingBoxOptions, val: bool); } impl SvgBoundingBoxOptions { #[doc = "Construct a new `SvgBoundingBoxOptions`."] @@ -48,30 +60,22 @@ impl SvgBoundingBoxOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `clipped` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SvgBoundingBoxOptions`*"] + #[deprecated = "Use `set_clipped()` instead."] pub fn clipped(&mut self, val: bool) -> &mut Self { self.set_clipped(val); self } - #[doc = "Change the `fill` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SvgBoundingBoxOptions`*"] + #[deprecated = "Use `set_fill()` instead."] pub fn fill(&mut self, val: bool) -> &mut Self { self.set_fill(val); self } - #[doc = "Change the `markers` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SvgBoundingBoxOptions`*"] + #[deprecated = "Use `set_markers()` instead."] pub fn markers(&mut self, val: bool) -> &mut Self { self.set_markers(val); self } - #[doc = "Change the `stroke` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SvgBoundingBoxOptions`*"] + #[deprecated = "Use `set_stroke()` instead."] pub fn stroke(&mut self, val: bool) -> &mut Self { self.set_stroke(val); self diff --git a/crates/web-sys/src/features/gen_TaskControllerInit.rs b/crates/web-sys/src/features/gen_TaskControllerInit.rs index ff679374020e..71b2c5a0e468 100644 --- a/crates/web-sys/src/features/gen_TaskControllerInit.rs +++ b/crates/web-sys/src/features/gen_TaskControllerInit.rs @@ -24,9 +24,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "priority")] pub fn get_priority(this: &TaskControllerInit) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "TaskPriority")] + #[doc = "Change the `priority` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TaskControllerInit`, `TaskPriority`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "priority")] - fn set_priority(this: &TaskControllerInit, val: TaskPriority); + pub fn set_priority(this: &TaskControllerInit, val: TaskPriority); } #[cfg(web_sys_unstable_apis)] impl TaskControllerInit { @@ -43,12 +50,7 @@ impl TaskControllerInit { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "TaskPriority")] - #[doc = "Change the `priority` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TaskControllerInit`, `TaskPriority`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_priority()` instead."] pub fn priority(&mut self, val: TaskPriority) -> &mut Self { self.set_priority(val); self diff --git a/crates/web-sys/src/features/gen_TaskPriorityChangeEventInit.rs b/crates/web-sys/src/features/gen_TaskPriorityChangeEventInit.rs index 6270965f398a..9180af229541 100644 --- a/crates/web-sys/src/features/gen_TaskPriorityChangeEventInit.rs +++ b/crates/web-sys/src/features/gen_TaskPriorityChangeEventInit.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &TaskPriorityChangeEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TaskPriorityChangeEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &TaskPriorityChangeEventInit, val: bool); + pub fn set_bubbles(this: &TaskPriorityChangeEventInit, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `cancelable` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &TaskPriorityChangeEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TaskPriorityChangeEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &TaskPriorityChangeEventInit, val: bool); + pub fn set_cancelable(this: &TaskPriorityChangeEventInit, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `composed` field of this object."] #[doc = ""] @@ -45,8 +59,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &TaskPriorityChangeEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TaskPriorityChangeEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &TaskPriorityChangeEventInit, val: bool); + pub fn set_composed(this: &TaskPriorityChangeEventInit, val: bool); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "TaskPriority")] #[doc = "Get the `previousPriority` field of this object."] @@ -57,9 +78,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "previousPriority")] pub fn get_previous_priority(this: &TaskPriorityChangeEventInit) -> TaskPriority; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "TaskPriority")] + #[doc = "Change the `previousPriority` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TaskPriority`, `TaskPriorityChangeEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "previousPriority")] - fn set_previous_priority(this: &TaskPriorityChangeEventInit, val: TaskPriority); + pub fn set_previous_priority(this: &TaskPriorityChangeEventInit, val: TaskPriority); } #[cfg(web_sys_unstable_apis)] impl TaskPriorityChangeEventInit { @@ -77,46 +105,26 @@ impl TaskPriorityChangeEventInit { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TaskPriorityChangeEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TaskPriorityChangeEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TaskPriorityChangeEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "TaskPriority")] - #[doc = "Change the `previousPriority` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TaskPriority`, `TaskPriorityChangeEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_previous_priority()` instead."] pub fn previous_priority(&mut self, val: TaskPriority) -> &mut Self { self.set_previous_priority(val); self diff --git a/crates/web-sys/src/features/gen_TaskSignalAnyInit.rs b/crates/web-sys/src/features/gen_TaskSignalAnyInit.rs index 28cbe3e33bce..61fc8bc9de03 100644 --- a/crates/web-sys/src/features/gen_TaskSignalAnyInit.rs +++ b/crates/web-sys/src/features/gen_TaskSignalAnyInit.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "priority")] pub fn get_priority(this: &TaskSignalAnyInit) -> ::wasm_bindgen::JsValue; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `priority` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TaskSignalAnyInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "priority")] - fn set_priority(this: &TaskSignalAnyInit, val: &::wasm_bindgen::JsValue); + pub fn set_priority(this: &TaskSignalAnyInit, val: &::wasm_bindgen::JsValue); } #[cfg(web_sys_unstable_apis)] impl TaskSignalAnyInit { @@ -40,12 +47,7 @@ impl TaskSignalAnyInit { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `priority` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TaskSignalAnyInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_priority()` instead."] pub fn priority(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_priority(val); self diff --git a/crates/web-sys/src/features/gen_TcpServerSocketEventInit.rs b/crates/web-sys/src/features/gen_TcpServerSocketEventInit.rs index 84ede6937386..1021c266f492 100644 --- a/crates/web-sys/src/features/gen_TcpServerSocketEventInit.rs +++ b/crates/web-sys/src/features/gen_TcpServerSocketEventInit.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `TcpServerSocketEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &TcpServerSocketEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TcpServerSocketEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &TcpServerSocketEventInit, val: bool); + pub fn set_bubbles(this: &TcpServerSocketEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TcpServerSocketEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &TcpServerSocketEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TcpServerSocketEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &TcpServerSocketEventInit, val: bool); + pub fn set_cancelable(this: &TcpServerSocketEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TcpServerSocketEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &TcpServerSocketEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TcpServerSocketEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &TcpServerSocketEventInit, val: bool); + pub fn set_composed(this: &TcpServerSocketEventInit, val: bool); #[cfg(feature = "TcpSocket")] #[doc = "Get the `socket` field of this object."] #[doc = ""] @@ -38,8 +47,11 @@ extern "C" { #[wasm_bindgen(method, getter = "socket")] pub fn get_socket(this: &TcpServerSocketEventInit) -> Option; #[cfg(feature = "TcpSocket")] + #[doc = "Change the `socket` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TcpServerSocketEventInit`, `TcpSocket`*"] #[wasm_bindgen(method, setter = "socket")] - fn set_socket(this: &TcpServerSocketEventInit, val: Option<&TcpSocket>); + pub fn set_socket(this: &TcpServerSocketEventInit, val: Option<&TcpSocket>); } impl TcpServerSocketEventInit { #[doc = "Construct a new `TcpServerSocketEventInit`."] @@ -50,31 +62,23 @@ impl TcpServerSocketEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TcpServerSocketEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TcpServerSocketEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TcpServerSocketEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } #[cfg(feature = "TcpSocket")] - #[doc = "Change the `socket` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TcpServerSocketEventInit`, `TcpSocket`*"] + #[deprecated = "Use `set_socket()` instead."] pub fn socket(&mut self, val: Option<&TcpSocket>) -> &mut Self { self.set_socket(val); self diff --git a/crates/web-sys/src/features/gen_TcpSocketErrorEventInit.rs b/crates/web-sys/src/features/gen_TcpSocketErrorEventInit.rs index 9d72b0e18177..63c13ff03975 100644 --- a/crates/web-sys/src/features/gen_TcpSocketErrorEventInit.rs +++ b/crates/web-sys/src/features/gen_TcpSocketErrorEventInit.rs @@ -15,36 +15,51 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `TcpSocketErrorEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &TcpSocketErrorEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TcpSocketErrorEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &TcpSocketErrorEventInit, val: bool); + pub fn set_bubbles(this: &TcpSocketErrorEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TcpSocketErrorEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &TcpSocketErrorEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TcpSocketErrorEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &TcpSocketErrorEventInit, val: bool); + pub fn set_cancelable(this: &TcpSocketErrorEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TcpSocketErrorEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &TcpSocketErrorEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TcpSocketErrorEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &TcpSocketErrorEventInit, val: bool); + pub fn set_composed(this: &TcpSocketErrorEventInit, val: bool); #[doc = "Get the `message` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TcpSocketErrorEventInit`*"] #[wasm_bindgen(method, getter = "message")] pub fn get_message(this: &TcpSocketErrorEventInit) -> Option; + #[doc = "Change the `message` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TcpSocketErrorEventInit`*"] #[wasm_bindgen(method, setter = "message")] - fn set_message(this: &TcpSocketErrorEventInit, val: &str); + pub fn set_message(this: &TcpSocketErrorEventInit, val: &str); #[doc = "Get the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TcpSocketErrorEventInit`*"] #[wasm_bindgen(method, getter = "name")] pub fn get_name(this: &TcpSocketErrorEventInit) -> Option; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TcpSocketErrorEventInit`*"] #[wasm_bindgen(method, setter = "name")] - fn set_name(this: &TcpSocketErrorEventInit, val: &str); + pub fn set_name(this: &TcpSocketErrorEventInit, val: &str); } impl TcpSocketErrorEventInit { #[doc = "Construct a new `TcpSocketErrorEventInit`."] @@ -55,37 +70,27 @@ impl TcpSocketErrorEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TcpSocketErrorEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TcpSocketErrorEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TcpSocketErrorEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } - #[doc = "Change the `message` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TcpSocketErrorEventInit`*"] + #[deprecated = "Use `set_message()` instead."] pub fn message(&mut self, val: &str) -> &mut Self { self.set_message(val); self } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TcpSocketErrorEventInit`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { self.set_name(val); self diff --git a/crates/web-sys/src/features/gen_TcpSocketEventInit.rs b/crates/web-sys/src/features/gen_TcpSocketEventInit.rs index f918179f035a..5980130f25a1 100644 --- a/crates/web-sys/src/features/gen_TcpSocketEventInit.rs +++ b/crates/web-sys/src/features/gen_TcpSocketEventInit.rs @@ -15,29 +15,41 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `TcpSocketEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &TcpSocketEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TcpSocketEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &TcpSocketEventInit, val: bool); + pub fn set_bubbles(this: &TcpSocketEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TcpSocketEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &TcpSocketEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TcpSocketEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &TcpSocketEventInit, val: bool); + pub fn set_cancelable(this: &TcpSocketEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TcpSocketEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &TcpSocketEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TcpSocketEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &TcpSocketEventInit, val: bool); + pub fn set_composed(this: &TcpSocketEventInit, val: bool); #[doc = "Get the `data` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TcpSocketEventInit`*"] #[wasm_bindgen(method, getter = "data")] pub fn get_data(this: &TcpSocketEventInit) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TcpSocketEventInit`*"] #[wasm_bindgen(method, setter = "data")] - fn set_data(this: &TcpSocketEventInit, val: &::wasm_bindgen::JsValue); + pub fn set_data(this: &TcpSocketEventInit, val: &::wasm_bindgen::JsValue); } impl TcpSocketEventInit { #[doc = "Construct a new `TcpSocketEventInit`."] @@ -48,30 +60,22 @@ impl TcpSocketEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TcpSocketEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TcpSocketEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TcpSocketEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } - #[doc = "Change the `data` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TcpSocketEventInit`*"] + #[deprecated = "Use `set_data()` instead."] pub fn data(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_data(val); self diff --git a/crates/web-sys/src/features/gen_TextDecodeOptions.rs b/crates/web-sys/src/features/gen_TextDecodeOptions.rs index 2c3569afffd4..e9176c5d9e8e 100644 --- a/crates/web-sys/src/features/gen_TextDecodeOptions.rs +++ b/crates/web-sys/src/features/gen_TextDecodeOptions.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `TextDecodeOptions`*"] #[wasm_bindgen(method, getter = "stream")] pub fn get_stream(this: &TextDecodeOptions) -> Option; + #[doc = "Change the `stream` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TextDecodeOptions`*"] #[wasm_bindgen(method, setter = "stream")] - fn set_stream(this: &TextDecodeOptions, val: bool); + pub fn set_stream(this: &TextDecodeOptions, val: bool); } impl TextDecodeOptions { #[doc = "Construct a new `TextDecodeOptions`."] @@ -27,9 +30,7 @@ impl TextDecodeOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `stream` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TextDecodeOptions`*"] + #[deprecated = "Use `set_stream()` instead."] pub fn stream(&mut self, val: bool) -> &mut Self { self.set_stream(val); self diff --git a/crates/web-sys/src/features/gen_TextDecoderOptions.rs b/crates/web-sys/src/features/gen_TextDecoderOptions.rs index e8d414471856..1ca8079c0cde 100644 --- a/crates/web-sys/src/features/gen_TextDecoderOptions.rs +++ b/crates/web-sys/src/features/gen_TextDecoderOptions.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `TextDecoderOptions`*"] #[wasm_bindgen(method, getter = "fatal")] pub fn get_fatal(this: &TextDecoderOptions) -> Option; + #[doc = "Change the `fatal` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TextDecoderOptions`*"] #[wasm_bindgen(method, setter = "fatal")] - fn set_fatal(this: &TextDecoderOptions, val: bool); + pub fn set_fatal(this: &TextDecoderOptions, val: bool); } impl TextDecoderOptions { #[doc = "Construct a new `TextDecoderOptions`."] @@ -27,9 +30,7 @@ impl TextDecoderOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `fatal` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TextDecoderOptions`*"] + #[deprecated = "Use `set_fatal()` instead."] pub fn fatal(&mut self, val: bool) -> &mut Self { self.set_fatal(val); self diff --git a/crates/web-sys/src/features/gen_TouchEventInit.rs b/crates/web-sys/src/features/gen_TouchEventInit.rs index 7148c7ae8900..18c280b631f8 100644 --- a/crates/web-sys/src/features/gen_TouchEventInit.rs +++ b/crates/web-sys/src/features/gen_TouchEventInit.rs @@ -15,29 +15,41 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &TouchEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &TouchEventInit, val: bool); + pub fn set_bubbles(this: &TouchEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &TouchEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &TouchEventInit, val: bool); + pub fn set_cancelable(this: &TouchEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &TouchEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &TouchEventInit, val: bool); + pub fn set_composed(this: &TouchEventInit, val: bool); #[doc = "Get the `detail` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, getter = "detail")] pub fn get_detail(this: &TouchEventInit) -> Option; + #[doc = "Change the `detail` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, setter = "detail")] - fn set_detail(this: &TouchEventInit, val: i32); + pub fn set_detail(this: &TouchEventInit, val: i32); #[cfg(feature = "Window")] #[doc = "Get the `view` field of this object."] #[doc = ""] @@ -45,120 +57,171 @@ extern "C" { #[wasm_bindgen(method, getter = "view")] pub fn get_view(this: &TouchEventInit) -> Option; #[cfg(feature = "Window")] + #[doc = "Change the `view` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`, `Window`*"] #[wasm_bindgen(method, setter = "view")] - fn set_view(this: &TouchEventInit, val: Option<&Window>); + pub fn set_view(this: &TouchEventInit, val: Option<&Window>); #[doc = "Get the `altKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, getter = "altKey")] pub fn get_alt_key(this: &TouchEventInit) -> Option; + #[doc = "Change the `altKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, setter = "altKey")] - fn set_alt_key(this: &TouchEventInit, val: bool); + pub fn set_alt_key(this: &TouchEventInit, val: bool); #[doc = "Get the `ctrlKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, getter = "ctrlKey")] pub fn get_ctrl_key(this: &TouchEventInit) -> Option; + #[doc = "Change the `ctrlKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, setter = "ctrlKey")] - fn set_ctrl_key(this: &TouchEventInit, val: bool); + pub fn set_ctrl_key(this: &TouchEventInit, val: bool); #[doc = "Get the `metaKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, getter = "metaKey")] pub fn get_meta_key(this: &TouchEventInit) -> Option; + #[doc = "Change the `metaKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, setter = "metaKey")] - fn set_meta_key(this: &TouchEventInit, val: bool); + pub fn set_meta_key(this: &TouchEventInit, val: bool); #[doc = "Get the `modifierAltGraph` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, getter = "modifierAltGraph")] pub fn get_modifier_alt_graph(this: &TouchEventInit) -> Option; + #[doc = "Change the `modifierAltGraph` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, setter = "modifierAltGraph")] - fn set_modifier_alt_graph(this: &TouchEventInit, val: bool); + pub fn set_modifier_alt_graph(this: &TouchEventInit, val: bool); #[doc = "Get the `modifierCapsLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, getter = "modifierCapsLock")] pub fn get_modifier_caps_lock(this: &TouchEventInit) -> Option; + #[doc = "Change the `modifierCapsLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, setter = "modifierCapsLock")] - fn set_modifier_caps_lock(this: &TouchEventInit, val: bool); + pub fn set_modifier_caps_lock(this: &TouchEventInit, val: bool); #[doc = "Get the `modifierFn` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, getter = "modifierFn")] pub fn get_modifier_fn(this: &TouchEventInit) -> Option; + #[doc = "Change the `modifierFn` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, setter = "modifierFn")] - fn set_modifier_fn(this: &TouchEventInit, val: bool); + pub fn set_modifier_fn(this: &TouchEventInit, val: bool); #[doc = "Get the `modifierFnLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, getter = "modifierFnLock")] pub fn get_modifier_fn_lock(this: &TouchEventInit) -> Option; + #[doc = "Change the `modifierFnLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, setter = "modifierFnLock")] - fn set_modifier_fn_lock(this: &TouchEventInit, val: bool); + pub fn set_modifier_fn_lock(this: &TouchEventInit, val: bool); #[doc = "Get the `modifierNumLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, getter = "modifierNumLock")] pub fn get_modifier_num_lock(this: &TouchEventInit) -> Option; + #[doc = "Change the `modifierNumLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, setter = "modifierNumLock")] - fn set_modifier_num_lock(this: &TouchEventInit, val: bool); + pub fn set_modifier_num_lock(this: &TouchEventInit, val: bool); #[doc = "Get the `modifierOS` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, getter = "modifierOS")] pub fn get_modifier_os(this: &TouchEventInit) -> Option; + #[doc = "Change the `modifierOS` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, setter = "modifierOS")] - fn set_modifier_os(this: &TouchEventInit, val: bool); + pub fn set_modifier_os(this: &TouchEventInit, val: bool); #[doc = "Get the `modifierScrollLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, getter = "modifierScrollLock")] pub fn get_modifier_scroll_lock(this: &TouchEventInit) -> Option; + #[doc = "Change the `modifierScrollLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, setter = "modifierScrollLock")] - fn set_modifier_scroll_lock(this: &TouchEventInit, val: bool); + pub fn set_modifier_scroll_lock(this: &TouchEventInit, val: bool); #[doc = "Get the `modifierSymbol` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, getter = "modifierSymbol")] pub fn get_modifier_symbol(this: &TouchEventInit) -> Option; + #[doc = "Change the `modifierSymbol` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, setter = "modifierSymbol")] - fn set_modifier_symbol(this: &TouchEventInit, val: bool); + pub fn set_modifier_symbol(this: &TouchEventInit, val: bool); #[doc = "Get the `modifierSymbolLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, getter = "modifierSymbolLock")] pub fn get_modifier_symbol_lock(this: &TouchEventInit) -> Option; + #[doc = "Change the `modifierSymbolLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, setter = "modifierSymbolLock")] - fn set_modifier_symbol_lock(this: &TouchEventInit, val: bool); + pub fn set_modifier_symbol_lock(this: &TouchEventInit, val: bool); #[doc = "Get the `shiftKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, getter = "shiftKey")] pub fn get_shift_key(this: &TouchEventInit) -> Option; + #[doc = "Change the `shiftKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, setter = "shiftKey")] - fn set_shift_key(this: &TouchEventInit, val: bool); + pub fn set_shift_key(this: &TouchEventInit, val: bool); #[doc = "Get the `changedTouches` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, getter = "changedTouches")] pub fn get_changed_touches(this: &TouchEventInit) -> Option<::js_sys::Array>; + #[doc = "Change the `changedTouches` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, setter = "changedTouches")] - fn set_changed_touches(this: &TouchEventInit, val: &::wasm_bindgen::JsValue); + pub fn set_changed_touches(this: &TouchEventInit, val: &::wasm_bindgen::JsValue); #[doc = "Get the `targetTouches` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, getter = "targetTouches")] pub fn get_target_touches(this: &TouchEventInit) -> Option<::js_sys::Array>; + #[doc = "Change the `targetTouches` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, setter = "targetTouches")] - fn set_target_touches(this: &TouchEventInit, val: &::wasm_bindgen::JsValue); + pub fn set_target_touches(this: &TouchEventInit, val: &::wasm_bindgen::JsValue); #[doc = "Get the `touches` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, getter = "touches")] pub fn get_touches(this: &TouchEventInit) -> Option<::js_sys::Array>; + #[doc = "Change the `touches` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, setter = "touches")] - fn set_touches(this: &TouchEventInit, val: &::wasm_bindgen::JsValue); + pub fn set_touches(this: &TouchEventInit, val: &::wasm_bindgen::JsValue); } impl TouchEventInit { #[doc = "Construct a new `TouchEventInit`."] @@ -169,150 +232,108 @@ impl TouchEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } - #[doc = "Change the `detail` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[deprecated = "Use `set_detail()` instead."] pub fn detail(&mut self, val: i32) -> &mut Self { self.set_detail(val); self } #[cfg(feature = "Window")] - #[doc = "Change the `view` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`, `Window`*"] + #[deprecated = "Use `set_view()` instead."] pub fn view(&mut self, val: Option<&Window>) -> &mut Self { self.set_view(val); self } - #[doc = "Change the `altKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[deprecated = "Use `set_alt_key()` instead."] pub fn alt_key(&mut self, val: bool) -> &mut Self { self.set_alt_key(val); self } - #[doc = "Change the `ctrlKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[deprecated = "Use `set_ctrl_key()` instead."] pub fn ctrl_key(&mut self, val: bool) -> &mut Self { self.set_ctrl_key(val); self } - #[doc = "Change the `metaKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[deprecated = "Use `set_meta_key()` instead."] pub fn meta_key(&mut self, val: bool) -> &mut Self { self.set_meta_key(val); self } - #[doc = "Change the `modifierAltGraph` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[deprecated = "Use `set_modifier_alt_graph()` instead."] pub fn modifier_alt_graph(&mut self, val: bool) -> &mut Self { self.set_modifier_alt_graph(val); self } - #[doc = "Change the `modifierCapsLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[deprecated = "Use `set_modifier_caps_lock()` instead."] pub fn modifier_caps_lock(&mut self, val: bool) -> &mut Self { self.set_modifier_caps_lock(val); self } - #[doc = "Change the `modifierFn` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[deprecated = "Use `set_modifier_fn()` instead."] pub fn modifier_fn(&mut self, val: bool) -> &mut Self { self.set_modifier_fn(val); self } - #[doc = "Change the `modifierFnLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[deprecated = "Use `set_modifier_fn_lock()` instead."] pub fn modifier_fn_lock(&mut self, val: bool) -> &mut Self { self.set_modifier_fn_lock(val); self } - #[doc = "Change the `modifierNumLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[deprecated = "Use `set_modifier_num_lock()` instead."] pub fn modifier_num_lock(&mut self, val: bool) -> &mut Self { self.set_modifier_num_lock(val); self } - #[doc = "Change the `modifierOS` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[deprecated = "Use `set_modifier_os()` instead."] pub fn modifier_os(&mut self, val: bool) -> &mut Self { self.set_modifier_os(val); self } - #[doc = "Change the `modifierScrollLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[deprecated = "Use `set_modifier_scroll_lock()` instead."] pub fn modifier_scroll_lock(&mut self, val: bool) -> &mut Self { self.set_modifier_scroll_lock(val); self } - #[doc = "Change the `modifierSymbol` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[deprecated = "Use `set_modifier_symbol()` instead."] pub fn modifier_symbol(&mut self, val: bool) -> &mut Self { self.set_modifier_symbol(val); self } - #[doc = "Change the `modifierSymbolLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[deprecated = "Use `set_modifier_symbol_lock()` instead."] pub fn modifier_symbol_lock(&mut self, val: bool) -> &mut Self { self.set_modifier_symbol_lock(val); self } - #[doc = "Change the `shiftKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[deprecated = "Use `set_shift_key()` instead."] pub fn shift_key(&mut self, val: bool) -> &mut Self { self.set_shift_key(val); self } - #[doc = "Change the `changedTouches` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[deprecated = "Use `set_changed_touches()` instead."] pub fn changed_touches(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_changed_touches(val); self } - #[doc = "Change the `targetTouches` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[deprecated = "Use `set_target_touches()` instead."] pub fn target_touches(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_target_touches(val); self } - #[doc = "Change the `touches` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[deprecated = "Use `set_touches()` instead."] pub fn touches(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_touches(val); self diff --git a/crates/web-sys/src/features/gen_TouchInit.rs b/crates/web-sys/src/features/gen_TouchInit.rs index 99321a1b34b7..37c8a7ab01de 100644 --- a/crates/web-sys/src/features/gen_TouchInit.rs +++ b/crates/web-sys/src/features/gen_TouchInit.rs @@ -15,78 +15,111 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] #[wasm_bindgen(method, getter = "clientX")] pub fn get_client_x(this: &TouchInit) -> Option; + #[doc = "Change the `clientX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] #[wasm_bindgen(method, setter = "clientX")] - fn set_client_x(this: &TouchInit, val: i32); + pub fn set_client_x(this: &TouchInit, val: i32); #[doc = "Get the `clientY` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] #[wasm_bindgen(method, getter = "clientY")] pub fn get_client_y(this: &TouchInit) -> Option; + #[doc = "Change the `clientY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] #[wasm_bindgen(method, setter = "clientY")] - fn set_client_y(this: &TouchInit, val: i32); + pub fn set_client_y(this: &TouchInit, val: i32); #[doc = "Get the `force` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] #[wasm_bindgen(method, getter = "force")] pub fn get_force(this: &TouchInit) -> Option; + #[doc = "Change the `force` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] #[wasm_bindgen(method, setter = "force")] - fn set_force(this: &TouchInit, val: f32); + pub fn set_force(this: &TouchInit, val: f32); #[doc = "Get the `identifier` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] #[wasm_bindgen(method, getter = "identifier")] pub fn get_identifier(this: &TouchInit) -> i32; + #[doc = "Change the `identifier` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] #[wasm_bindgen(method, setter = "identifier")] - fn set_identifier(this: &TouchInit, val: i32); + pub fn set_identifier(this: &TouchInit, val: i32); #[doc = "Get the `pageX` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] #[wasm_bindgen(method, getter = "pageX")] pub fn get_page_x(this: &TouchInit) -> Option; + #[doc = "Change the `pageX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] #[wasm_bindgen(method, setter = "pageX")] - fn set_page_x(this: &TouchInit, val: i32); + pub fn set_page_x(this: &TouchInit, val: i32); #[doc = "Get the `pageY` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] #[wasm_bindgen(method, getter = "pageY")] pub fn get_page_y(this: &TouchInit) -> Option; + #[doc = "Change the `pageY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] #[wasm_bindgen(method, setter = "pageY")] - fn set_page_y(this: &TouchInit, val: i32); + pub fn set_page_y(this: &TouchInit, val: i32); #[doc = "Get the `radiusX` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] #[wasm_bindgen(method, getter = "radiusX")] pub fn get_radius_x(this: &TouchInit) -> Option; + #[doc = "Change the `radiusX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] #[wasm_bindgen(method, setter = "radiusX")] - fn set_radius_x(this: &TouchInit, val: f32); + pub fn set_radius_x(this: &TouchInit, val: f32); #[doc = "Get the `radiusY` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] #[wasm_bindgen(method, getter = "radiusY")] pub fn get_radius_y(this: &TouchInit) -> Option; + #[doc = "Change the `radiusY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] #[wasm_bindgen(method, setter = "radiusY")] - fn set_radius_y(this: &TouchInit, val: f32); + pub fn set_radius_y(this: &TouchInit, val: f32); #[doc = "Get the `rotationAngle` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] #[wasm_bindgen(method, getter = "rotationAngle")] pub fn get_rotation_angle(this: &TouchInit) -> Option; + #[doc = "Change the `rotationAngle` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] #[wasm_bindgen(method, setter = "rotationAngle")] - fn set_rotation_angle(this: &TouchInit, val: f32); + pub fn set_rotation_angle(this: &TouchInit, val: f32); #[doc = "Get the `screenX` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] #[wasm_bindgen(method, getter = "screenX")] pub fn get_screen_x(this: &TouchInit) -> Option; + #[doc = "Change the `screenX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] #[wasm_bindgen(method, setter = "screenX")] - fn set_screen_x(this: &TouchInit, val: i32); + pub fn set_screen_x(this: &TouchInit, val: i32); #[doc = "Get the `screenY` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] #[wasm_bindgen(method, getter = "screenY")] pub fn get_screen_y(this: &TouchInit) -> Option; + #[doc = "Change the `screenY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] #[wasm_bindgen(method, setter = "screenY")] - fn set_screen_y(this: &TouchInit, val: i32); + pub fn set_screen_y(this: &TouchInit, val: i32); #[cfg(feature = "EventTarget")] #[doc = "Get the `target` field of this object."] #[doc = ""] @@ -94,8 +127,11 @@ extern "C" { #[wasm_bindgen(method, getter = "target")] pub fn get_target(this: &TouchInit) -> EventTarget; #[cfg(feature = "EventTarget")] + #[doc = "Change the `target` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventTarget`, `TouchInit`*"] #[wasm_bindgen(method, setter = "target")] - fn set_target(this: &TouchInit, val: &EventTarget); + pub fn set_target(this: &TouchInit, val: &EventTarget); } impl TouchInit { #[cfg(feature = "EventTarget")] @@ -109,87 +145,63 @@ impl TouchInit { ret.target(target); ret } - #[doc = "Change the `clientX` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] + #[deprecated = "Use `set_client_x()` instead."] pub fn client_x(&mut self, val: i32) -> &mut Self { self.set_client_x(val); self } - #[doc = "Change the `clientY` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] + #[deprecated = "Use `set_client_y()` instead."] pub fn client_y(&mut self, val: i32) -> &mut Self { self.set_client_y(val); self } - #[doc = "Change the `force` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] + #[deprecated = "Use `set_force()` instead."] pub fn force(&mut self, val: f32) -> &mut Self { self.set_force(val); self } - #[doc = "Change the `identifier` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] + #[deprecated = "Use `set_identifier()` instead."] pub fn identifier(&mut self, val: i32) -> &mut Self { self.set_identifier(val); self } - #[doc = "Change the `pageX` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] + #[deprecated = "Use `set_page_x()` instead."] pub fn page_x(&mut self, val: i32) -> &mut Self { self.set_page_x(val); self } - #[doc = "Change the `pageY` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] + #[deprecated = "Use `set_page_y()` instead."] pub fn page_y(&mut self, val: i32) -> &mut Self { self.set_page_y(val); self } - #[doc = "Change the `radiusX` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] + #[deprecated = "Use `set_radius_x()` instead."] pub fn radius_x(&mut self, val: f32) -> &mut Self { self.set_radius_x(val); self } - #[doc = "Change the `radiusY` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] + #[deprecated = "Use `set_radius_y()` instead."] pub fn radius_y(&mut self, val: f32) -> &mut Self { self.set_radius_y(val); self } - #[doc = "Change the `rotationAngle` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] + #[deprecated = "Use `set_rotation_angle()` instead."] pub fn rotation_angle(&mut self, val: f32) -> &mut Self { self.set_rotation_angle(val); self } - #[doc = "Change the `screenX` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] + #[deprecated = "Use `set_screen_x()` instead."] pub fn screen_x(&mut self, val: i32) -> &mut Self { self.set_screen_x(val); self } - #[doc = "Change the `screenY` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] + #[deprecated = "Use `set_screen_y()` instead."] pub fn screen_y(&mut self, val: i32) -> &mut Self { self.set_screen_y(val); self } #[cfg(feature = "EventTarget")] - #[doc = "Change the `target` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventTarget`, `TouchInit`*"] + #[deprecated = "Use `set_target()` instead."] pub fn target(&mut self, val: &EventTarget) -> &mut Self { self.set_target(val); self diff --git a/crates/web-sys/src/features/gen_TrackEventInit.rs b/crates/web-sys/src/features/gen_TrackEventInit.rs index fc0b55112a18..8097517d9528 100644 --- a/crates/web-sys/src/features/gen_TrackEventInit.rs +++ b/crates/web-sys/src/features/gen_TrackEventInit.rs @@ -15,29 +15,41 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `TrackEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &TrackEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TrackEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &TrackEventInit, val: bool); + pub fn set_bubbles(this: &TrackEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TrackEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &TrackEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TrackEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &TrackEventInit, val: bool); + pub fn set_cancelable(this: &TrackEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TrackEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &TrackEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TrackEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &TrackEventInit, val: bool); + pub fn set_composed(this: &TrackEventInit, val: bool); #[doc = "Get the `track` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TrackEventInit`*"] #[wasm_bindgen(method, getter = "track")] pub fn get_track(this: &TrackEventInit) -> Option<::js_sys::Object>; + #[doc = "Change the `track` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TrackEventInit`*"] #[wasm_bindgen(method, setter = "track")] - fn set_track(this: &TrackEventInit, val: Option<&::js_sys::Object>); + pub fn set_track(this: &TrackEventInit, val: Option<&::js_sys::Object>); } impl TrackEventInit { #[doc = "Construct a new `TrackEventInit`."] @@ -48,30 +60,22 @@ impl TrackEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TrackEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TrackEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TrackEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } - #[doc = "Change the `track` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TrackEventInit`*"] + #[deprecated = "Use `set_track()` instead."] pub fn track(&mut self, val: Option<&::js_sys::Object>) -> &mut Self { self.set_track(val); self diff --git a/crates/web-sys/src/features/gen_Transformer.rs b/crates/web-sys/src/features/gen_Transformer.rs index 09cf0e2d5641..77d6965fa3f1 100644 --- a/crates/web-sys/src/features/gen_Transformer.rs +++ b/crates/web-sys/src/features/gen_Transformer.rs @@ -15,36 +15,51 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `Transformer`*"] #[wasm_bindgen(method, getter = "flush")] pub fn get_flush(this: &Transformer) -> Option<::js_sys::Function>; + #[doc = "Change the `flush` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Transformer`*"] #[wasm_bindgen(method, setter = "flush")] - fn set_flush(this: &Transformer, val: &::js_sys::Function); + pub fn set_flush(this: &Transformer, val: &::js_sys::Function); #[doc = "Get the `readableType` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `Transformer`*"] #[wasm_bindgen(method, getter = "readableType")] pub fn get_readable_type(this: &Transformer) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `readableType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Transformer`*"] #[wasm_bindgen(method, setter = "readableType")] - fn set_readable_type(this: &Transformer, val: &::wasm_bindgen::JsValue); + pub fn set_readable_type(this: &Transformer, val: &::wasm_bindgen::JsValue); #[doc = "Get the `start` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `Transformer`*"] #[wasm_bindgen(method, getter = "start")] pub fn get_start(this: &Transformer) -> Option<::js_sys::Function>; + #[doc = "Change the `start` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Transformer`*"] #[wasm_bindgen(method, setter = "start")] - fn set_start(this: &Transformer, val: &::js_sys::Function); + pub fn set_start(this: &Transformer, val: &::js_sys::Function); #[doc = "Get the `transform` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `Transformer`*"] #[wasm_bindgen(method, getter = "transform")] pub fn get_transform(this: &Transformer) -> Option<::js_sys::Function>; + #[doc = "Change the `transform` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Transformer`*"] #[wasm_bindgen(method, setter = "transform")] - fn set_transform(this: &Transformer, val: &::js_sys::Function); + pub fn set_transform(this: &Transformer, val: &::js_sys::Function); #[doc = "Get the `writableType` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `Transformer`*"] #[wasm_bindgen(method, getter = "writableType")] pub fn get_writable_type(this: &Transformer) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `writableType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Transformer`*"] #[wasm_bindgen(method, setter = "writableType")] - fn set_writable_type(this: &Transformer, val: &::wasm_bindgen::JsValue); + pub fn set_writable_type(this: &Transformer, val: &::wasm_bindgen::JsValue); } impl Transformer { #[doc = "Construct a new `Transformer`."] @@ -55,37 +70,27 @@ impl Transformer { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `flush` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `Transformer`*"] + #[deprecated = "Use `set_flush()` instead."] pub fn flush(&mut self, val: &::js_sys::Function) -> &mut Self { self.set_flush(val); self } - #[doc = "Change the `readableType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `Transformer`*"] + #[deprecated = "Use `set_readable_type()` instead."] pub fn readable_type(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_readable_type(val); self } - #[doc = "Change the `start` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `Transformer`*"] + #[deprecated = "Use `set_start()` instead."] pub fn start(&mut self, val: &::js_sys::Function) -> &mut Self { self.set_start(val); self } - #[doc = "Change the `transform` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `Transformer`*"] + #[deprecated = "Use `set_transform()` instead."] pub fn transform(&mut self, val: &::js_sys::Function) -> &mut Self { self.set_transform(val); self } - #[doc = "Change the `writableType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `Transformer`*"] + #[deprecated = "Use `set_writable_type()` instead."] pub fn writable_type(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_writable_type(val); self diff --git a/crates/web-sys/src/features/gen_TransitionEventInit.rs b/crates/web-sys/src/features/gen_TransitionEventInit.rs index 04ddf51573a2..b3ede75c465b 100644 --- a/crates/web-sys/src/features/gen_TransitionEventInit.rs +++ b/crates/web-sys/src/features/gen_TransitionEventInit.rs @@ -15,43 +15,61 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `TransitionEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &TransitionEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TransitionEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &TransitionEventInit, val: bool); + pub fn set_bubbles(this: &TransitionEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TransitionEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &TransitionEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TransitionEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &TransitionEventInit, val: bool); + pub fn set_cancelable(this: &TransitionEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TransitionEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &TransitionEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TransitionEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &TransitionEventInit, val: bool); + pub fn set_composed(this: &TransitionEventInit, val: bool); #[doc = "Get the `elapsedTime` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TransitionEventInit`*"] #[wasm_bindgen(method, getter = "elapsedTime")] pub fn get_elapsed_time(this: &TransitionEventInit) -> Option; + #[doc = "Change the `elapsedTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TransitionEventInit`*"] #[wasm_bindgen(method, setter = "elapsedTime")] - fn set_elapsed_time(this: &TransitionEventInit, val: f32); + pub fn set_elapsed_time(this: &TransitionEventInit, val: f32); #[doc = "Get the `propertyName` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TransitionEventInit`*"] #[wasm_bindgen(method, getter = "propertyName")] pub fn get_property_name(this: &TransitionEventInit) -> Option; + #[doc = "Change the `propertyName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TransitionEventInit`*"] #[wasm_bindgen(method, setter = "propertyName")] - fn set_property_name(this: &TransitionEventInit, val: &str); + pub fn set_property_name(this: &TransitionEventInit, val: &str); #[doc = "Get the `pseudoElement` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TransitionEventInit`*"] #[wasm_bindgen(method, getter = "pseudoElement")] pub fn get_pseudo_element(this: &TransitionEventInit) -> Option; + #[doc = "Change the `pseudoElement` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TransitionEventInit`*"] #[wasm_bindgen(method, setter = "pseudoElement")] - fn set_pseudo_element(this: &TransitionEventInit, val: &str); + pub fn set_pseudo_element(this: &TransitionEventInit, val: &str); } impl TransitionEventInit { #[doc = "Construct a new `TransitionEventInit`."] @@ -62,44 +80,32 @@ impl TransitionEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TransitionEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TransitionEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TransitionEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } - #[doc = "Change the `elapsedTime` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TransitionEventInit`*"] + #[deprecated = "Use `set_elapsed_time()` instead."] pub fn elapsed_time(&mut self, val: f32) -> &mut Self { self.set_elapsed_time(val); self } - #[doc = "Change the `propertyName` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TransitionEventInit`*"] + #[deprecated = "Use `set_property_name()` instead."] pub fn property_name(&mut self, val: &str) -> &mut Self { self.set_property_name(val); self } - #[doc = "Change the `pseudoElement` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TransitionEventInit`*"] + #[deprecated = "Use `set_pseudo_element()` instead."] pub fn pseudo_element(&mut self, val: &str) -> &mut Self { self.set_pseudo_element(val); self diff --git a/crates/web-sys/src/features/gen_TreeCellInfo.rs b/crates/web-sys/src/features/gen_TreeCellInfo.rs index d1e7787d3c17..75327d1ee855 100644 --- a/crates/web-sys/src/features/gen_TreeCellInfo.rs +++ b/crates/web-sys/src/features/gen_TreeCellInfo.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `TreeCellInfo`*"] #[wasm_bindgen(method, getter = "childElt")] pub fn get_child_elt(this: &TreeCellInfo) -> Option; + #[doc = "Change the `childElt` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TreeCellInfo`*"] #[wasm_bindgen(method, setter = "childElt")] - fn set_child_elt(this: &TreeCellInfo, val: &str); + pub fn set_child_elt(this: &TreeCellInfo, val: &str); #[doc = "Get the `row` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TreeCellInfo`*"] #[wasm_bindgen(method, getter = "row")] pub fn get_row(this: &TreeCellInfo) -> Option; + #[doc = "Change the `row` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TreeCellInfo`*"] #[wasm_bindgen(method, setter = "row")] - fn set_row(this: &TreeCellInfo, val: i32); + pub fn set_row(this: &TreeCellInfo, val: i32); } impl TreeCellInfo { #[doc = "Construct a new `TreeCellInfo`."] @@ -34,16 +40,12 @@ impl TreeCellInfo { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `childElt` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TreeCellInfo`*"] + #[deprecated = "Use `set_child_elt()` instead."] pub fn child_elt(&mut self, val: &str) -> &mut Self { self.set_child_elt(val); self } - #[doc = "Change the `row` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TreeCellInfo`*"] + #[deprecated = "Use `set_row()` instead."] pub fn row(&mut self, val: i32) -> &mut Self { self.set_row(val); self diff --git a/crates/web-sys/src/features/gen_U2fClientData.rs b/crates/web-sys/src/features/gen_U2fClientData.rs index 428814f80079..a67f45af5d57 100644 --- a/crates/web-sys/src/features/gen_U2fClientData.rs +++ b/crates/web-sys/src/features/gen_U2fClientData.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `U2fClientData`*"] #[wasm_bindgen(method, getter = "challenge")] pub fn get_challenge(this: &U2fClientData) -> Option; + #[doc = "Change the `challenge` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `U2fClientData`*"] #[wasm_bindgen(method, setter = "challenge")] - fn set_challenge(this: &U2fClientData, val: &str); + pub fn set_challenge(this: &U2fClientData, val: &str); #[doc = "Get the `origin` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `U2fClientData`*"] #[wasm_bindgen(method, getter = "origin")] pub fn get_origin(this: &U2fClientData) -> Option; + #[doc = "Change the `origin` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `U2fClientData`*"] #[wasm_bindgen(method, setter = "origin")] - fn set_origin(this: &U2fClientData, val: &str); + pub fn set_origin(this: &U2fClientData, val: &str); #[doc = "Get the `typ` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `U2fClientData`*"] #[wasm_bindgen(method, getter = "typ")] pub fn get_typ(this: &U2fClientData) -> Option; + #[doc = "Change the `typ` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `U2fClientData`*"] #[wasm_bindgen(method, setter = "typ")] - fn set_typ(this: &U2fClientData, val: &str); + pub fn set_typ(this: &U2fClientData, val: &str); } impl U2fClientData { #[doc = "Construct a new `U2fClientData`."] @@ -41,23 +50,17 @@ impl U2fClientData { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `challenge` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `U2fClientData`*"] + #[deprecated = "Use `set_challenge()` instead."] pub fn challenge(&mut self, val: &str) -> &mut Self { self.set_challenge(val); self } - #[doc = "Change the `origin` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `U2fClientData`*"] + #[deprecated = "Use `set_origin()` instead."] pub fn origin(&mut self, val: &str) -> &mut Self { self.set_origin(val); self } - #[doc = "Change the `typ` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `U2fClientData`*"] + #[deprecated = "Use `set_typ()` instead."] pub fn typ(&mut self, val: &str) -> &mut Self { self.set_typ(val); self diff --git a/crates/web-sys/src/features/gen_ULongRange.rs b/crates/web-sys/src/features/gen_ULongRange.rs index 107557a21770..acf295622ee4 100644 --- a/crates/web-sys/src/features/gen_ULongRange.rs +++ b/crates/web-sys/src/features/gen_ULongRange.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "max")] pub fn get_max(this: &ULongRange) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `max` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ULongRange`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "max")] - fn set_max(this: &ULongRange, val: u32); + pub fn set_max(this: &ULongRange, val: u32); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `min` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "min")] pub fn get_min(this: &ULongRange) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `min` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ULongRange`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "min")] - fn set_min(this: &ULongRange, val: u32); + pub fn set_min(this: &ULongRange, val: u32); } #[cfg(web_sys_unstable_apis)] impl ULongRange { @@ -51,23 +65,13 @@ impl ULongRange { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `max` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ULongRange`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_max()` instead."] pub fn max(&mut self, val: u32) -> &mut Self { self.set_max(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `min` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ULongRange`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_min()` instead."] pub fn min(&mut self, val: u32) -> &mut Self { self.set_min(val); self diff --git a/crates/web-sys/src/features/gen_UdpMessageEventInit.rs b/crates/web-sys/src/features/gen_UdpMessageEventInit.rs index 7779a87a20ab..7d8c01cf491f 100644 --- a/crates/web-sys/src/features/gen_UdpMessageEventInit.rs +++ b/crates/web-sys/src/features/gen_UdpMessageEventInit.rs @@ -15,43 +15,61 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &UdpMessageEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &UdpMessageEventInit, val: bool); + pub fn set_bubbles(this: &UdpMessageEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &UdpMessageEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &UdpMessageEventInit, val: bool); + pub fn set_cancelable(this: &UdpMessageEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &UdpMessageEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &UdpMessageEventInit, val: bool); + pub fn set_composed(this: &UdpMessageEventInit, val: bool); #[doc = "Get the `data` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"] #[wasm_bindgen(method, getter = "data")] pub fn get_data(this: &UdpMessageEventInit) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"] #[wasm_bindgen(method, setter = "data")] - fn set_data(this: &UdpMessageEventInit, val: &::wasm_bindgen::JsValue); + pub fn set_data(this: &UdpMessageEventInit, val: &::wasm_bindgen::JsValue); #[doc = "Get the `remoteAddress` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"] #[wasm_bindgen(method, getter = "remoteAddress")] pub fn get_remote_address(this: &UdpMessageEventInit) -> Option; + #[doc = "Change the `remoteAddress` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"] #[wasm_bindgen(method, setter = "remoteAddress")] - fn set_remote_address(this: &UdpMessageEventInit, val: &str); + pub fn set_remote_address(this: &UdpMessageEventInit, val: &str); #[doc = "Get the `remotePort` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"] #[wasm_bindgen(method, getter = "remotePort")] pub fn get_remote_port(this: &UdpMessageEventInit) -> Option; + #[doc = "Change the `remotePort` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"] #[wasm_bindgen(method, setter = "remotePort")] - fn set_remote_port(this: &UdpMessageEventInit, val: u16); + pub fn set_remote_port(this: &UdpMessageEventInit, val: u16); } impl UdpMessageEventInit { #[doc = "Construct a new `UdpMessageEventInit`."] @@ -62,44 +80,32 @@ impl UdpMessageEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } - #[doc = "Change the `data` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"] + #[deprecated = "Use `set_data()` instead."] pub fn data(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_data(val); self } - #[doc = "Change the `remoteAddress` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"] + #[deprecated = "Use `set_remote_address()` instead."] pub fn remote_address(&mut self, val: &str) -> &mut Self { self.set_remote_address(val); self } - #[doc = "Change the `remotePort` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"] + #[deprecated = "Use `set_remote_port()` instead."] pub fn remote_port(&mut self, val: u16) -> &mut Self { self.set_remote_port(val); self diff --git a/crates/web-sys/src/features/gen_UdpOptions.rs b/crates/web-sys/src/features/gen_UdpOptions.rs index f05987833b5b..99b8f998ea14 100644 --- a/crates/web-sys/src/features/gen_UdpOptions.rs +++ b/crates/web-sys/src/features/gen_UdpOptions.rs @@ -15,43 +15,61 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `UdpOptions`*"] #[wasm_bindgen(method, getter = "addressReuse")] pub fn get_address_reuse(this: &UdpOptions) -> Option; + #[doc = "Change the `addressReuse` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UdpOptions`*"] #[wasm_bindgen(method, setter = "addressReuse")] - fn set_address_reuse(this: &UdpOptions, val: bool); + pub fn set_address_reuse(this: &UdpOptions, val: bool); #[doc = "Get the `localAddress` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UdpOptions`*"] #[wasm_bindgen(method, getter = "localAddress")] pub fn get_local_address(this: &UdpOptions) -> Option; + #[doc = "Change the `localAddress` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UdpOptions`*"] #[wasm_bindgen(method, setter = "localAddress")] - fn set_local_address(this: &UdpOptions, val: &str); + pub fn set_local_address(this: &UdpOptions, val: &str); #[doc = "Get the `localPort` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UdpOptions`*"] #[wasm_bindgen(method, getter = "localPort")] pub fn get_local_port(this: &UdpOptions) -> Option; + #[doc = "Change the `localPort` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UdpOptions`*"] #[wasm_bindgen(method, setter = "localPort")] - fn set_local_port(this: &UdpOptions, val: u16); + pub fn set_local_port(this: &UdpOptions, val: u16); #[doc = "Get the `loopback` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UdpOptions`*"] #[wasm_bindgen(method, getter = "loopback")] pub fn get_loopback(this: &UdpOptions) -> Option; + #[doc = "Change the `loopback` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UdpOptions`*"] #[wasm_bindgen(method, setter = "loopback")] - fn set_loopback(this: &UdpOptions, val: bool); + pub fn set_loopback(this: &UdpOptions, val: bool); #[doc = "Get the `remoteAddress` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UdpOptions`*"] #[wasm_bindgen(method, getter = "remoteAddress")] pub fn get_remote_address(this: &UdpOptions) -> Option; + #[doc = "Change the `remoteAddress` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UdpOptions`*"] #[wasm_bindgen(method, setter = "remoteAddress")] - fn set_remote_address(this: &UdpOptions, val: &str); + pub fn set_remote_address(this: &UdpOptions, val: &str); #[doc = "Get the `remotePort` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UdpOptions`*"] #[wasm_bindgen(method, getter = "remotePort")] pub fn get_remote_port(this: &UdpOptions) -> Option; + #[doc = "Change the `remotePort` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UdpOptions`*"] #[wasm_bindgen(method, setter = "remotePort")] - fn set_remote_port(this: &UdpOptions, val: u16); + pub fn set_remote_port(this: &UdpOptions, val: u16); } impl UdpOptions { #[doc = "Construct a new `UdpOptions`."] @@ -62,44 +80,32 @@ impl UdpOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `addressReuse` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UdpOptions`*"] + #[deprecated = "Use `set_address_reuse()` instead."] pub fn address_reuse(&mut self, val: bool) -> &mut Self { self.set_address_reuse(val); self } - #[doc = "Change the `localAddress` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UdpOptions`*"] + #[deprecated = "Use `set_local_address()` instead."] pub fn local_address(&mut self, val: &str) -> &mut Self { self.set_local_address(val); self } - #[doc = "Change the `localPort` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UdpOptions`*"] + #[deprecated = "Use `set_local_port()` instead."] pub fn local_port(&mut self, val: u16) -> &mut Self { self.set_local_port(val); self } - #[doc = "Change the `loopback` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UdpOptions`*"] + #[deprecated = "Use `set_loopback()` instead."] pub fn loopback(&mut self, val: bool) -> &mut Self { self.set_loopback(val); self } - #[doc = "Change the `remoteAddress` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UdpOptions`*"] + #[deprecated = "Use `set_remote_address()` instead."] pub fn remote_address(&mut self, val: &str) -> &mut Self { self.set_remote_address(val); self } - #[doc = "Change the `remotePort` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UdpOptions`*"] + #[deprecated = "Use `set_remote_port()` instead."] pub fn remote_port(&mut self, val: u16) -> &mut Self { self.set_remote_port(val); self diff --git a/crates/web-sys/src/features/gen_UiEventInit.rs b/crates/web-sys/src/features/gen_UiEventInit.rs index fdc1f560aa29..75bdfc8b2602 100644 --- a/crates/web-sys/src/features/gen_UiEventInit.rs +++ b/crates/web-sys/src/features/gen_UiEventInit.rs @@ -15,29 +15,41 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `UiEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &UiEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UiEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &UiEventInit, val: bool); + pub fn set_bubbles(this: &UiEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UiEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &UiEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UiEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &UiEventInit, val: bool); + pub fn set_cancelable(this: &UiEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UiEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &UiEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UiEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &UiEventInit, val: bool); + pub fn set_composed(this: &UiEventInit, val: bool); #[doc = "Get the `detail` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UiEventInit`*"] #[wasm_bindgen(method, getter = "detail")] pub fn get_detail(this: &UiEventInit) -> Option; + #[doc = "Change the `detail` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UiEventInit`*"] #[wasm_bindgen(method, setter = "detail")] - fn set_detail(this: &UiEventInit, val: i32); + pub fn set_detail(this: &UiEventInit, val: i32); #[cfg(feature = "Window")] #[doc = "Get the `view` field of this object."] #[doc = ""] @@ -45,8 +57,11 @@ extern "C" { #[wasm_bindgen(method, getter = "view")] pub fn get_view(this: &UiEventInit) -> Option; #[cfg(feature = "Window")] + #[doc = "Change the `view` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UiEventInit`, `Window`*"] #[wasm_bindgen(method, setter = "view")] - fn set_view(this: &UiEventInit, val: Option<&Window>); + pub fn set_view(this: &UiEventInit, val: Option<&Window>); } impl UiEventInit { #[doc = "Construct a new `UiEventInit`."] @@ -57,38 +72,28 @@ impl UiEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UiEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UiEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UiEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } - #[doc = "Change the `detail` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UiEventInit`*"] + #[deprecated = "Use `set_detail()` instead."] pub fn detail(&mut self, val: i32) -> &mut Self { self.set_detail(val); self } #[cfg(feature = "Window")] - #[doc = "Change the `view` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UiEventInit`, `Window`*"] + #[deprecated = "Use `set_view()` instead."] pub fn view(&mut self, val: Option<&Window>) -> &mut Self { self.set_view(val); self diff --git a/crates/web-sys/src/features/gen_UnderlyingSink.rs b/crates/web-sys/src/features/gen_UnderlyingSink.rs index 172f7cec964a..c01268facf93 100644 --- a/crates/web-sys/src/features/gen_UnderlyingSink.rs +++ b/crates/web-sys/src/features/gen_UnderlyingSink.rs @@ -15,36 +15,51 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"] #[wasm_bindgen(method, getter = "abort")] pub fn get_abort(this: &UnderlyingSink) -> Option<::js_sys::Function>; + #[doc = "Change the `abort` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"] #[wasm_bindgen(method, setter = "abort")] - fn set_abort(this: &UnderlyingSink, val: &::js_sys::Function); + pub fn set_abort(this: &UnderlyingSink, val: &::js_sys::Function); #[doc = "Get the `close` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"] #[wasm_bindgen(method, getter = "close")] pub fn get_close(this: &UnderlyingSink) -> Option<::js_sys::Function>; + #[doc = "Change the `close` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"] #[wasm_bindgen(method, setter = "close")] - fn set_close(this: &UnderlyingSink, val: &::js_sys::Function); + pub fn set_close(this: &UnderlyingSink, val: &::js_sys::Function); #[doc = "Get the `start` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"] #[wasm_bindgen(method, getter = "start")] pub fn get_start(this: &UnderlyingSink) -> Option<::js_sys::Function>; + #[doc = "Change the `start` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"] #[wasm_bindgen(method, setter = "start")] - fn set_start(this: &UnderlyingSink, val: &::js_sys::Function); + pub fn set_start(this: &UnderlyingSink, val: &::js_sys::Function); #[doc = "Get the `type` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"] #[wasm_bindgen(method, getter = "type")] pub fn get_type(this: &UnderlyingSink) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"] #[wasm_bindgen(method, setter = "type")] - fn set_type(this: &UnderlyingSink, val: &::wasm_bindgen::JsValue); + pub fn set_type(this: &UnderlyingSink, val: &::wasm_bindgen::JsValue); #[doc = "Get the `write` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"] #[wasm_bindgen(method, getter = "write")] pub fn get_write(this: &UnderlyingSink) -> Option<::js_sys::Function>; + #[doc = "Change the `write` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"] #[wasm_bindgen(method, setter = "write")] - fn set_write(this: &UnderlyingSink, val: &::js_sys::Function); + pub fn set_write(this: &UnderlyingSink, val: &::js_sys::Function); } impl UnderlyingSink { #[doc = "Construct a new `UnderlyingSink`."] @@ -55,37 +70,27 @@ impl UnderlyingSink { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `abort` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"] + #[deprecated = "Use `set_abort()` instead."] pub fn abort(&mut self, val: &::js_sys::Function) -> &mut Self { self.set_abort(val); self } - #[doc = "Change the `close` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"] + #[deprecated = "Use `set_close()` instead."] pub fn close(&mut self, val: &::js_sys::Function) -> &mut Self { self.set_close(val); self } - #[doc = "Change the `start` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"] + #[deprecated = "Use `set_start()` instead."] pub fn start(&mut self, val: &::js_sys::Function) -> &mut Self { self.set_start(val); self } - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_type(val); self } - #[doc = "Change the `write` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"] + #[deprecated = "Use `set_write()` instead."] pub fn write(&mut self, val: &::js_sys::Function) -> &mut Self { self.set_write(val); self diff --git a/crates/web-sys/src/features/gen_UnderlyingSource.rs b/crates/web-sys/src/features/gen_UnderlyingSource.rs index 7856676f5416..c1da8cc9c1d1 100644 --- a/crates/web-sys/src/features/gen_UnderlyingSource.rs +++ b/crates/web-sys/src/features/gen_UnderlyingSource.rs @@ -15,29 +15,41 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `UnderlyingSource`*"] #[wasm_bindgen(method, getter = "autoAllocateChunkSize")] pub fn get_auto_allocate_chunk_size(this: &UnderlyingSource) -> Option; + #[doc = "Change the `autoAllocateChunkSize` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UnderlyingSource`*"] #[wasm_bindgen(method, setter = "autoAllocateChunkSize")] - fn set_auto_allocate_chunk_size(this: &UnderlyingSource, val: f64); + pub fn set_auto_allocate_chunk_size(this: &UnderlyingSource, val: f64); #[doc = "Get the `cancel` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UnderlyingSource`*"] #[wasm_bindgen(method, getter = "cancel")] pub fn get_cancel(this: &UnderlyingSource) -> Option<::js_sys::Function>; + #[doc = "Change the `cancel` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UnderlyingSource`*"] #[wasm_bindgen(method, setter = "cancel")] - fn set_cancel(this: &UnderlyingSource, val: &::js_sys::Function); + pub fn set_cancel(this: &UnderlyingSource, val: &::js_sys::Function); #[doc = "Get the `pull` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UnderlyingSource`*"] #[wasm_bindgen(method, getter = "pull")] pub fn get_pull(this: &UnderlyingSource) -> Option<::js_sys::Function>; + #[doc = "Change the `pull` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UnderlyingSource`*"] #[wasm_bindgen(method, setter = "pull")] - fn set_pull(this: &UnderlyingSource, val: &::js_sys::Function); + pub fn set_pull(this: &UnderlyingSource, val: &::js_sys::Function); #[doc = "Get the `start` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UnderlyingSource`*"] #[wasm_bindgen(method, getter = "start")] pub fn get_start(this: &UnderlyingSource) -> Option<::js_sys::Function>; + #[doc = "Change the `start` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UnderlyingSource`*"] #[wasm_bindgen(method, setter = "start")] - fn set_start(this: &UnderlyingSource, val: &::js_sys::Function); + pub fn set_start(this: &UnderlyingSource, val: &::js_sys::Function); #[cfg(feature = "ReadableStreamType")] #[doc = "Get the `type` field of this object."] #[doc = ""] @@ -45,8 +57,11 @@ extern "C" { #[wasm_bindgen(method, getter = "type")] pub fn get_type(this: &UnderlyingSource) -> Option; #[cfg(feature = "ReadableStreamType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ReadableStreamType`, `UnderlyingSource`*"] #[wasm_bindgen(method, setter = "type")] - fn set_type(this: &UnderlyingSource, val: ReadableStreamType); + pub fn set_type(this: &UnderlyingSource, val: ReadableStreamType); } impl UnderlyingSource { #[doc = "Construct a new `UnderlyingSource`."] @@ -57,38 +72,28 @@ impl UnderlyingSource { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `autoAllocateChunkSize` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UnderlyingSource`*"] + #[deprecated = "Use `set_auto_allocate_chunk_size()` instead."] pub fn auto_allocate_chunk_size(&mut self, val: f64) -> &mut Self { self.set_auto_allocate_chunk_size(val); self } - #[doc = "Change the `cancel` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UnderlyingSource`*"] + #[deprecated = "Use `set_cancel()` instead."] pub fn cancel(&mut self, val: &::js_sys::Function) -> &mut Self { self.set_cancel(val); self } - #[doc = "Change the `pull` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UnderlyingSource`*"] + #[deprecated = "Use `set_pull()` instead."] pub fn pull(&mut self, val: &::js_sys::Function) -> &mut Self { self.set_pull(val); self } - #[doc = "Change the `start` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UnderlyingSource`*"] + #[deprecated = "Use `set_start()` instead."] pub fn start(&mut self, val: &::js_sys::Function) -> &mut Self { self.set_start(val); self } #[cfg(feature = "ReadableStreamType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ReadableStreamType`, `UnderlyingSource`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: ReadableStreamType) -> &mut Self { self.set_type(val); self diff --git a/crates/web-sys/src/features/gen_UsbConnectionEventInit.rs b/crates/web-sys/src/features/gen_UsbConnectionEventInit.rs index 9d89ec900d48..0e7b327a5a17 100644 --- a/crates/web-sys/src/features/gen_UsbConnectionEventInit.rs +++ b/crates/web-sys/src/features/gen_UsbConnectionEventInit.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &UsbConnectionEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbConnectionEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &UsbConnectionEventInit, val: bool); + pub fn set_bubbles(this: &UsbConnectionEventInit, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `cancelable` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &UsbConnectionEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbConnectionEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &UsbConnectionEventInit, val: bool); + pub fn set_cancelable(this: &UsbConnectionEventInit, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `composed` field of this object."] #[doc = ""] @@ -45,8 +59,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &UsbConnectionEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbConnectionEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &UsbConnectionEventInit, val: bool); + pub fn set_composed(this: &UsbConnectionEventInit, val: bool); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "UsbDevice")] #[doc = "Get the `device` field of this object."] @@ -57,9 +78,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "device")] pub fn get_device(this: &UsbConnectionEventInit) -> UsbDevice; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "UsbDevice")] + #[doc = "Change the `device` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbConnectionEventInit`, `UsbDevice`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "device")] - fn set_device(this: &UsbConnectionEventInit, val: &UsbDevice); + pub fn set_device(this: &UsbConnectionEventInit, val: &UsbDevice); } #[cfg(web_sys_unstable_apis)] impl UsbConnectionEventInit { @@ -77,46 +105,26 @@ impl UsbConnectionEventInit { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UsbConnectionEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UsbConnectionEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UsbConnectionEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "UsbDevice")] - #[doc = "Change the `device` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UsbConnectionEventInit`, `UsbDevice`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_device()` instead."] pub fn device(&mut self, val: &UsbDevice) -> &mut Self { self.set_device(val); self diff --git a/crates/web-sys/src/features/gen_UsbControlTransferParameters.rs b/crates/web-sys/src/features/gen_UsbControlTransferParameters.rs index 7fd87f44f09a..0c8c87d3cb81 100644 --- a/crates/web-sys/src/features/gen_UsbControlTransferParameters.rs +++ b/crates/web-sys/src/features/gen_UsbControlTransferParameters.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "index")] pub fn get_index(this: &UsbControlTransferParameters) -> u16; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `index` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbControlTransferParameters`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "index")] - fn set_index(this: &UsbControlTransferParameters, val: u16); + pub fn set_index(this: &UsbControlTransferParameters, val: u16); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "UsbRecipient")] #[doc = "Get the `recipient` field of this object."] @@ -35,9 +42,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "recipient")] pub fn get_recipient(this: &UsbControlTransferParameters) -> UsbRecipient; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "UsbRecipient")] + #[doc = "Change the `recipient` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbControlTransferParameters`, `UsbRecipient`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "recipient")] - fn set_recipient(this: &UsbControlTransferParameters, val: UsbRecipient); + pub fn set_recipient(this: &UsbControlTransferParameters, val: UsbRecipient); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `request` field of this object."] #[doc = ""] @@ -47,8 +61,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "request")] pub fn get_request(this: &UsbControlTransferParameters) -> u8; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `request` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbControlTransferParameters`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "request")] - fn set_request(this: &UsbControlTransferParameters, val: u8); + pub fn set_request(this: &UsbControlTransferParameters, val: u8); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "UsbRequestType")] #[doc = "Get the `requestType` field of this object."] @@ -59,9 +80,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "requestType")] pub fn get_request_type(this: &UsbControlTransferParameters) -> UsbRequestType; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "UsbRequestType")] + #[doc = "Change the `requestType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbControlTransferParameters`, `UsbRequestType`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "requestType")] - fn set_request_type(this: &UsbControlTransferParameters, val: UsbRequestType); + pub fn set_request_type(this: &UsbControlTransferParameters, val: UsbRequestType); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `value` field of this object."] #[doc = ""] @@ -71,8 +99,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "value")] pub fn get_value(this: &UsbControlTransferParameters) -> u16; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `value` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbControlTransferParameters`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "value")] - fn set_value(this: &UsbControlTransferParameters, val: u16); + pub fn set_value(this: &UsbControlTransferParameters, val: u16); } #[cfg(web_sys_unstable_apis)] impl UsbControlTransferParameters { @@ -100,58 +135,33 @@ impl UsbControlTransferParameters { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `index` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UsbControlTransferParameters`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_index()` instead."] pub fn index(&mut self, val: u16) -> &mut Self { self.set_index(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "UsbRecipient")] - #[doc = "Change the `recipient` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UsbControlTransferParameters`, `UsbRecipient`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_recipient()` instead."] pub fn recipient(&mut self, val: UsbRecipient) -> &mut Self { self.set_recipient(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `request` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UsbControlTransferParameters`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_request()` instead."] pub fn request(&mut self, val: u8) -> &mut Self { self.set_request(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "UsbRequestType")] - #[doc = "Change the `requestType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UsbControlTransferParameters`, `UsbRequestType`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_request_type()` instead."] pub fn request_type(&mut self, val: UsbRequestType) -> &mut Self { self.set_request_type(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `value` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UsbControlTransferParameters`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_value()` instead."] pub fn value(&mut self, val: u16) -> &mut Self { self.set_value(val); self diff --git a/crates/web-sys/src/features/gen_UsbDeviceFilter.rs b/crates/web-sys/src/features/gen_UsbDeviceFilter.rs index c2519f7d5b93..411a66a560b0 100644 --- a/crates/web-sys/src/features/gen_UsbDeviceFilter.rs +++ b/crates/web-sys/src/features/gen_UsbDeviceFilter.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "classCode")] pub fn get_class_code(this: &UsbDeviceFilter) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `classCode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbDeviceFilter`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "classCode")] - fn set_class_code(this: &UsbDeviceFilter, val: u8); + pub fn set_class_code(this: &UsbDeviceFilter, val: u8); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `productId` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "productId")] pub fn get_product_id(this: &UsbDeviceFilter) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `productId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbDeviceFilter`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "productId")] - fn set_product_id(this: &UsbDeviceFilter, val: u16); + pub fn set_product_id(this: &UsbDeviceFilter, val: u16); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `protocolCode` field of this object."] #[doc = ""] @@ -45,8 +59,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "protocolCode")] pub fn get_protocol_code(this: &UsbDeviceFilter) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `protocolCode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbDeviceFilter`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "protocolCode")] - fn set_protocol_code(this: &UsbDeviceFilter, val: u8); + pub fn set_protocol_code(this: &UsbDeviceFilter, val: u8); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `serialNumber` field of this object."] #[doc = ""] @@ -56,8 +77,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "serialNumber")] pub fn get_serial_number(this: &UsbDeviceFilter) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `serialNumber` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbDeviceFilter`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "serialNumber")] - fn set_serial_number(this: &UsbDeviceFilter, val: &str); + pub fn set_serial_number(this: &UsbDeviceFilter, val: &str); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `subclassCode` field of this object."] #[doc = ""] @@ -67,8 +95,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "subclassCode")] pub fn get_subclass_code(this: &UsbDeviceFilter) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `subclassCode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbDeviceFilter`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "subclassCode")] - fn set_subclass_code(this: &UsbDeviceFilter, val: u8); + pub fn set_subclass_code(this: &UsbDeviceFilter, val: u8); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `vendorId` field of this object."] #[doc = ""] @@ -78,8 +113,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "vendorId")] pub fn get_vendor_id(this: &UsbDeviceFilter) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `vendorId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbDeviceFilter`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "vendorId")] - fn set_vendor_id(this: &UsbDeviceFilter, val: u16); + pub fn set_vendor_id(this: &UsbDeviceFilter, val: u16); } #[cfg(web_sys_unstable_apis)] impl UsbDeviceFilter { @@ -95,67 +137,37 @@ impl UsbDeviceFilter { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `classCode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UsbDeviceFilter`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_class_code()` instead."] pub fn class_code(&mut self, val: u8) -> &mut Self { self.set_class_code(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `productId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UsbDeviceFilter`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_product_id()` instead."] pub fn product_id(&mut self, val: u16) -> &mut Self { self.set_product_id(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `protocolCode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UsbDeviceFilter`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_protocol_code()` instead."] pub fn protocol_code(&mut self, val: u8) -> &mut Self { self.set_protocol_code(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `serialNumber` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UsbDeviceFilter`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_serial_number()` instead."] pub fn serial_number(&mut self, val: &str) -> &mut Self { self.set_serial_number(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `subclassCode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UsbDeviceFilter`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_subclass_code()` instead."] pub fn subclass_code(&mut self, val: u8) -> &mut Self { self.set_subclass_code(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `vendorId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UsbDeviceFilter`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_vendor_id()` instead."] pub fn vendor_id(&mut self, val: u16) -> &mut Self { self.set_vendor_id(val); self diff --git a/crates/web-sys/src/features/gen_UsbDeviceRequestOptions.rs b/crates/web-sys/src/features/gen_UsbDeviceRequestOptions.rs index a00d310fc84b..b35430fc377b 100644 --- a/crates/web-sys/src/features/gen_UsbDeviceRequestOptions.rs +++ b/crates/web-sys/src/features/gen_UsbDeviceRequestOptions.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "filters")] pub fn get_filters(this: &UsbDeviceRequestOptions) -> ::js_sys::Array; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `filters` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbDeviceRequestOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "filters")] - fn set_filters(this: &UsbDeviceRequestOptions, val: &::wasm_bindgen::JsValue); + pub fn set_filters(this: &UsbDeviceRequestOptions, val: &::wasm_bindgen::JsValue); } #[cfg(web_sys_unstable_apis)] impl UsbDeviceRequestOptions { @@ -41,12 +48,7 @@ impl UsbDeviceRequestOptions { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `filters` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UsbDeviceRequestOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_filters()` instead."] pub fn filters(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_filters(val); self diff --git a/crates/web-sys/src/features/gen_UsbPermissionDescriptor.rs b/crates/web-sys/src/features/gen_UsbPermissionDescriptor.rs index d5e0d8a9ce21..7240f61781f5 100644 --- a/crates/web-sys/src/features/gen_UsbPermissionDescriptor.rs +++ b/crates/web-sys/src/features/gen_UsbPermissionDescriptor.rs @@ -24,9 +24,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "name")] pub fn get_name(this: &UsbPermissionDescriptor) -> PermissionName; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "PermissionName")] + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PermissionName`, `UsbPermissionDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "name")] - fn set_name(this: &UsbPermissionDescriptor, val: PermissionName); + pub fn set_name(this: &UsbPermissionDescriptor, val: PermissionName); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `filters` field of this object."] #[doc = ""] @@ -36,8 +43,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "filters")] pub fn get_filters(this: &UsbPermissionDescriptor) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `filters` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbPermissionDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "filters")] - fn set_filters(this: &UsbPermissionDescriptor, val: &::wasm_bindgen::JsValue); + pub fn set_filters(this: &UsbPermissionDescriptor, val: &::wasm_bindgen::JsValue); } #[cfg(web_sys_unstable_apis)] impl UsbPermissionDescriptor { @@ -56,23 +70,13 @@ impl UsbPermissionDescriptor { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "PermissionName")] - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PermissionName`, `UsbPermissionDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: PermissionName) -> &mut Self { self.set_name(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `filters` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UsbPermissionDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_filters()` instead."] pub fn filters(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_filters(val); self diff --git a/crates/web-sys/src/features/gen_UsbPermissionStorage.rs b/crates/web-sys/src/features/gen_UsbPermissionStorage.rs index c2c8babece26..7c99dd156664 100644 --- a/crates/web-sys/src/features/gen_UsbPermissionStorage.rs +++ b/crates/web-sys/src/features/gen_UsbPermissionStorage.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "allowedDevices")] pub fn get_allowed_devices(this: &UsbPermissionStorage) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `allowedDevices` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbPermissionStorage`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "allowedDevices")] - fn set_allowed_devices(this: &UsbPermissionStorage, val: &::wasm_bindgen::JsValue); + pub fn set_allowed_devices(this: &UsbPermissionStorage, val: &::wasm_bindgen::JsValue); } #[cfg(web_sys_unstable_apis)] impl UsbPermissionStorage { @@ -40,12 +47,7 @@ impl UsbPermissionStorage { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `allowedDevices` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UsbPermissionStorage`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_allowed_devices()` instead."] pub fn allowed_devices(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_allowed_devices(val); self diff --git a/crates/web-sys/src/features/gen_UserProximityEventInit.rs b/crates/web-sys/src/features/gen_UserProximityEventInit.rs index edbb16e32f8b..717e8354c822 100644 --- a/crates/web-sys/src/features/gen_UserProximityEventInit.rs +++ b/crates/web-sys/src/features/gen_UserProximityEventInit.rs @@ -15,29 +15,41 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `UserProximityEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &UserProximityEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UserProximityEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &UserProximityEventInit, val: bool); + pub fn set_bubbles(this: &UserProximityEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UserProximityEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &UserProximityEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UserProximityEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &UserProximityEventInit, val: bool); + pub fn set_cancelable(this: &UserProximityEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UserProximityEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &UserProximityEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UserProximityEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &UserProximityEventInit, val: bool); + pub fn set_composed(this: &UserProximityEventInit, val: bool); #[doc = "Get the `near` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UserProximityEventInit`*"] #[wasm_bindgen(method, getter = "near")] pub fn get_near(this: &UserProximityEventInit) -> Option; + #[doc = "Change the `near` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UserProximityEventInit`*"] #[wasm_bindgen(method, setter = "near")] - fn set_near(this: &UserProximityEventInit, val: bool); + pub fn set_near(this: &UserProximityEventInit, val: bool); } impl UserProximityEventInit { #[doc = "Construct a new `UserProximityEventInit`."] @@ -48,30 +60,22 @@ impl UserProximityEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UserProximityEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UserProximityEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UserProximityEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } - #[doc = "Change the `near` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UserProximityEventInit`*"] + #[deprecated = "Use `set_near()` instead."] pub fn near(&mut self, val: bool) -> &mut Self { self.set_near(val); self diff --git a/crates/web-sys/src/features/gen_ValueEventInit.rs b/crates/web-sys/src/features/gen_ValueEventInit.rs index 2dd264272d40..493a9f39cb0c 100644 --- a/crates/web-sys/src/features/gen_ValueEventInit.rs +++ b/crates/web-sys/src/features/gen_ValueEventInit.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &ValueEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ValueEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &ValueEventInit, val: bool); + pub fn set_bubbles(this: &ValueEventInit, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `cancelable` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &ValueEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ValueEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &ValueEventInit, val: bool); + pub fn set_cancelable(this: &ValueEventInit, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `composed` field of this object."] #[doc = ""] @@ -45,8 +59,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &ValueEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ValueEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &ValueEventInit, val: bool); + pub fn set_composed(this: &ValueEventInit, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `value` field of this object."] #[doc = ""] @@ -56,8 +77,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "value")] pub fn get_value(this: &ValueEventInit) -> ::wasm_bindgen::JsValue; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `value` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ValueEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "value")] - fn set_value(this: &ValueEventInit, val: &::wasm_bindgen::JsValue); + pub fn set_value(this: &ValueEventInit, val: &::wasm_bindgen::JsValue); } #[cfg(web_sys_unstable_apis)] impl ValueEventInit { @@ -73,45 +101,25 @@ impl ValueEventInit { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ValueEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ValueEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ValueEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `value` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ValueEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_value()` instead."] pub fn value(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_value(val); self diff --git a/crates/web-sys/src/features/gen_VideoColorSpaceInit.rs b/crates/web-sys/src/features/gen_VideoColorSpaceInit.rs index d9be65e94055..fbf7cd1bc197 100644 --- a/crates/web-sys/src/features/gen_VideoColorSpaceInit.rs +++ b/crates/web-sys/src/features/gen_VideoColorSpaceInit.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "fullRange")] pub fn get_full_range(this: &VideoColorSpaceInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `fullRange` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoColorSpaceInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "fullRange")] - fn set_full_range(this: &VideoColorSpaceInit, val: bool); + pub fn set_full_range(this: &VideoColorSpaceInit, val: bool); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "VideoMatrixCoefficients")] #[doc = "Get the `matrix` field of this object."] @@ -35,9 +42,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "matrix")] pub fn get_matrix(this: &VideoColorSpaceInit) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "VideoMatrixCoefficients")] + #[doc = "Change the `matrix` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoColorSpaceInit`, `VideoMatrixCoefficients`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "matrix")] - fn set_matrix(this: &VideoColorSpaceInit, val: VideoMatrixCoefficients); + pub fn set_matrix(this: &VideoColorSpaceInit, val: VideoMatrixCoefficients); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "VideoColorPrimaries")] #[doc = "Get the `primaries` field of this object."] @@ -48,9 +62,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "primaries")] pub fn get_primaries(this: &VideoColorSpaceInit) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "VideoColorPrimaries")] + #[doc = "Change the `primaries` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoColorPrimaries`, `VideoColorSpaceInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "primaries")] - fn set_primaries(this: &VideoColorSpaceInit, val: VideoColorPrimaries); + pub fn set_primaries(this: &VideoColorSpaceInit, val: VideoColorPrimaries); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "VideoTransferCharacteristics")] #[doc = "Get the `transfer` field of this object."] @@ -61,9 +82,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "transfer")] pub fn get_transfer(this: &VideoColorSpaceInit) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "VideoTransferCharacteristics")] + #[doc = "Change the `transfer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoColorSpaceInit`, `VideoTransferCharacteristics`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "transfer")] - fn set_transfer(this: &VideoColorSpaceInit, val: VideoTransferCharacteristics); + pub fn set_transfer(this: &VideoColorSpaceInit, val: VideoTransferCharacteristics); } #[cfg(web_sys_unstable_apis)] impl VideoColorSpaceInit { @@ -79,48 +107,28 @@ impl VideoColorSpaceInit { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `fullRange` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoColorSpaceInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_full_range()` instead."] pub fn full_range(&mut self, val: bool) -> &mut Self { self.set_full_range(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "VideoMatrixCoefficients")] - #[doc = "Change the `matrix` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoColorSpaceInit`, `VideoMatrixCoefficients`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_matrix()` instead."] pub fn matrix(&mut self, val: VideoMatrixCoefficients) -> &mut Self { self.set_matrix(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "VideoColorPrimaries")] - #[doc = "Change the `primaries` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoColorPrimaries`, `VideoColorSpaceInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_primaries()` instead."] pub fn primaries(&mut self, val: VideoColorPrimaries) -> &mut Self { self.set_primaries(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "VideoTransferCharacteristics")] - #[doc = "Change the `transfer` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoColorSpaceInit`, `VideoTransferCharacteristics`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_transfer()` instead."] pub fn transfer(&mut self, val: VideoTransferCharacteristics) -> &mut Self { self.set_transfer(val); self diff --git a/crates/web-sys/src/features/gen_VideoConfiguration.rs b/crates/web-sys/src/features/gen_VideoConfiguration.rs index 59335b93d227..d6467cf6b203 100644 --- a/crates/web-sys/src/features/gen_VideoConfiguration.rs +++ b/crates/web-sys/src/features/gen_VideoConfiguration.rs @@ -15,36 +15,51 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"] #[wasm_bindgen(method, getter = "bitrate")] pub fn get_bitrate(this: &VideoConfiguration) -> Option; + #[doc = "Change the `bitrate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"] #[wasm_bindgen(method, setter = "bitrate")] - fn set_bitrate(this: &VideoConfiguration, val: f64); + pub fn set_bitrate(this: &VideoConfiguration, val: f64); #[doc = "Get the `contentType` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"] #[wasm_bindgen(method, getter = "contentType")] pub fn get_content_type(this: &VideoConfiguration) -> Option; + #[doc = "Change the `contentType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"] #[wasm_bindgen(method, setter = "contentType")] - fn set_content_type(this: &VideoConfiguration, val: &str); + pub fn set_content_type(this: &VideoConfiguration, val: &str); #[doc = "Get the `framerate` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"] #[wasm_bindgen(method, getter = "framerate")] pub fn get_framerate(this: &VideoConfiguration) -> Option; + #[doc = "Change the `framerate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"] #[wasm_bindgen(method, setter = "framerate")] - fn set_framerate(this: &VideoConfiguration, val: &str); + pub fn set_framerate(this: &VideoConfiguration, val: &str); #[doc = "Get the `height` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"] #[wasm_bindgen(method, getter = "height")] pub fn get_height(this: &VideoConfiguration) -> Option; + #[doc = "Change the `height` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"] #[wasm_bindgen(method, setter = "height")] - fn set_height(this: &VideoConfiguration, val: u32); + pub fn set_height(this: &VideoConfiguration, val: u32); #[doc = "Get the `width` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"] #[wasm_bindgen(method, getter = "width")] pub fn get_width(this: &VideoConfiguration) -> Option; + #[doc = "Change the `width` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"] #[wasm_bindgen(method, setter = "width")] - fn set_width(this: &VideoConfiguration, val: u32); + pub fn set_width(this: &VideoConfiguration, val: u32); } impl VideoConfiguration { #[doc = "Construct a new `VideoConfiguration`."] @@ -55,37 +70,27 @@ impl VideoConfiguration { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bitrate` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"] + #[deprecated = "Use `set_bitrate()` instead."] pub fn bitrate(&mut self, val: f64) -> &mut Self { self.set_bitrate(val); self } - #[doc = "Change the `contentType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"] + #[deprecated = "Use `set_content_type()` instead."] pub fn content_type(&mut self, val: &str) -> &mut Self { self.set_content_type(val); self } - #[doc = "Change the `framerate` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"] + #[deprecated = "Use `set_framerate()` instead."] pub fn framerate(&mut self, val: &str) -> &mut Self { self.set_framerate(val); self } - #[doc = "Change the `height` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"] + #[deprecated = "Use `set_height()` instead."] pub fn height(&mut self, val: u32) -> &mut Self { self.set_height(val); self } - #[doc = "Change the `width` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"] + #[deprecated = "Use `set_width()` instead."] pub fn width(&mut self, val: u32) -> &mut Self { self.set_width(val); self diff --git a/crates/web-sys/src/features/gen_VideoDecoderConfig.rs b/crates/web-sys/src/features/gen_VideoDecoderConfig.rs index 500809eef45e..44c205a09848 100644 --- a/crates/web-sys/src/features/gen_VideoDecoderConfig.rs +++ b/crates/web-sys/src/features/gen_VideoDecoderConfig.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "codec")] pub fn get_codec(this: &VideoDecoderConfig) -> String; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `codec` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "codec")] - fn set_codec(this: &VideoDecoderConfig, val: &str); + pub fn set_codec(this: &VideoDecoderConfig, val: &str); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `codedHeight` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "codedHeight")] pub fn get_coded_height(this: &VideoDecoderConfig) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `codedHeight` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "codedHeight")] - fn set_coded_height(this: &VideoDecoderConfig, val: u32); + pub fn set_coded_height(this: &VideoDecoderConfig, val: u32); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `codedWidth` field of this object."] #[doc = ""] @@ -45,8 +59,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "codedWidth")] pub fn get_coded_width(this: &VideoDecoderConfig) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `codedWidth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "codedWidth")] - fn set_coded_width(this: &VideoDecoderConfig, val: u32); + pub fn set_coded_width(this: &VideoDecoderConfig, val: u32); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "VideoColorSpaceInit")] #[doc = "Get the `colorSpace` field of this object."] @@ -57,9 +78,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "colorSpace")] pub fn get_color_space(this: &VideoDecoderConfig) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "VideoColorSpaceInit")] + #[doc = "Change the `colorSpace` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoColorSpaceInit`, `VideoDecoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "colorSpace")] - fn set_color_space(this: &VideoDecoderConfig, val: &VideoColorSpaceInit); + pub fn set_color_space(this: &VideoDecoderConfig, val: &VideoColorSpaceInit); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `description` field of this object."] #[doc = ""] @@ -69,8 +97,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "description")] pub fn get_description(this: &VideoDecoderConfig) -> Option<::js_sys::Object>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `description` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "description")] - fn set_description(this: &VideoDecoderConfig, val: &::js_sys::Object); + pub fn set_description(this: &VideoDecoderConfig, val: &::js_sys::Object); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `displayAspectHeight` field of this object."] #[doc = ""] @@ -80,8 +115,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "displayAspectHeight")] pub fn get_display_aspect_height(this: &VideoDecoderConfig) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `displayAspectHeight` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "displayAspectHeight")] - fn set_display_aspect_height(this: &VideoDecoderConfig, val: u32); + pub fn set_display_aspect_height(this: &VideoDecoderConfig, val: u32); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `displayAspectWidth` field of this object."] #[doc = ""] @@ -91,8 +133,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "displayAspectWidth")] pub fn get_display_aspect_width(this: &VideoDecoderConfig) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `displayAspectWidth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "displayAspectWidth")] - fn set_display_aspect_width(this: &VideoDecoderConfig, val: u32); + pub fn set_display_aspect_width(this: &VideoDecoderConfig, val: u32); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "HardwareAcceleration")] #[doc = "Get the `hardwareAcceleration` field of this object."] @@ -103,9 +152,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "hardwareAcceleration")] pub fn get_hardware_acceleration(this: &VideoDecoderConfig) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "HardwareAcceleration")] + #[doc = "Change the `hardwareAcceleration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HardwareAcceleration`, `VideoDecoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "hardwareAcceleration")] - fn set_hardware_acceleration(this: &VideoDecoderConfig, val: HardwareAcceleration); + pub fn set_hardware_acceleration(this: &VideoDecoderConfig, val: HardwareAcceleration); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `optimizeForLatency` field of this object."] #[doc = ""] @@ -115,8 +171,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "optimizeForLatency")] pub fn get_optimize_for_latency(this: &VideoDecoderConfig) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `optimizeForLatency` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "optimizeForLatency")] - fn set_optimize_for_latency(this: &VideoDecoderConfig, val: bool); + pub fn set_optimize_for_latency(this: &VideoDecoderConfig, val: bool); } #[cfg(web_sys_unstable_apis)] impl VideoDecoderConfig { @@ -133,102 +196,57 @@ impl VideoDecoderConfig { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `codec` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_codec()` instead."] pub fn codec(&mut self, val: &str) -> &mut Self { self.set_codec(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `codedHeight` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_coded_height()` instead."] pub fn coded_height(&mut self, val: u32) -> &mut Self { self.set_coded_height(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `codedWidth` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_coded_width()` instead."] pub fn coded_width(&mut self, val: u32) -> &mut Self { self.set_coded_width(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "VideoColorSpaceInit")] - #[doc = "Change the `colorSpace` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoColorSpaceInit`, `VideoDecoderConfig`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_color_space()` instead."] pub fn color_space(&mut self, val: &VideoColorSpaceInit) -> &mut Self { self.set_color_space(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `description` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_description()` instead."] pub fn description(&mut self, val: &::js_sys::Object) -> &mut Self { self.set_description(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `displayAspectHeight` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_display_aspect_height()` instead."] pub fn display_aspect_height(&mut self, val: u32) -> &mut Self { self.set_display_aspect_height(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `displayAspectWidth` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_display_aspect_width()` instead."] pub fn display_aspect_width(&mut self, val: u32) -> &mut Self { self.set_display_aspect_width(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "HardwareAcceleration")] - #[doc = "Change the `hardwareAcceleration` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HardwareAcceleration`, `VideoDecoderConfig`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_hardware_acceleration()` instead."] pub fn hardware_acceleration(&mut self, val: HardwareAcceleration) -> &mut Self { self.set_hardware_acceleration(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `optimizeForLatency` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_optimize_for_latency()` instead."] pub fn optimize_for_latency(&mut self, val: bool) -> &mut Self { self.set_optimize_for_latency(val); self diff --git a/crates/web-sys/src/features/gen_VideoDecoderInit.rs b/crates/web-sys/src/features/gen_VideoDecoderInit.rs index 4b45bb46c628..19413cd55ab8 100644 --- a/crates/web-sys/src/features/gen_VideoDecoderInit.rs +++ b/crates/web-sys/src/features/gen_VideoDecoderInit.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "error")] pub fn get_error(this: &VideoDecoderInit) -> ::js_sys::Function; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `error` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoDecoderInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "error")] - fn set_error(this: &VideoDecoderInit, val: &::js_sys::Function); + pub fn set_error(this: &VideoDecoderInit, val: &::js_sys::Function); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `output` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "output")] pub fn get_output(this: &VideoDecoderInit) -> ::js_sys::Function; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `output` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoDecoderInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "output")] - fn set_output(this: &VideoDecoderInit, val: &::js_sys::Function); + pub fn set_output(this: &VideoDecoderInit, val: &::js_sys::Function); } #[cfg(web_sys_unstable_apis)] impl VideoDecoderInit { @@ -53,23 +67,13 @@ impl VideoDecoderInit { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `error` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoDecoderInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_error()` instead."] pub fn error(&mut self, val: &::js_sys::Function) -> &mut Self { self.set_error(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `output` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoDecoderInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_output()` instead."] pub fn output(&mut self, val: &::js_sys::Function) -> &mut Self { self.set_output(val); self diff --git a/crates/web-sys/src/features/gen_VideoDecoderSupport.rs b/crates/web-sys/src/features/gen_VideoDecoderSupport.rs index 5a1765b597d9..74356620b907 100644 --- a/crates/web-sys/src/features/gen_VideoDecoderSupport.rs +++ b/crates/web-sys/src/features/gen_VideoDecoderSupport.rs @@ -24,9 +24,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "config")] pub fn get_config(this: &VideoDecoderSupport) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "VideoDecoderConfig")] + #[doc = "Change the `config` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`, `VideoDecoderSupport`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "config")] - fn set_config(this: &VideoDecoderSupport, val: &VideoDecoderConfig); + pub fn set_config(this: &VideoDecoderSupport, val: &VideoDecoderConfig); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `supported` field of this object."] #[doc = ""] @@ -36,8 +43,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "supported")] pub fn get_supported(this: &VideoDecoderSupport) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `supported` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoDecoderSupport`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "supported")] - fn set_supported(this: &VideoDecoderSupport, val: bool); + pub fn set_supported(this: &VideoDecoderSupport, val: bool); } #[cfg(web_sys_unstable_apis)] impl VideoDecoderSupport { @@ -54,23 +68,13 @@ impl VideoDecoderSupport { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "VideoDecoderConfig")] - #[doc = "Change the `config` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`, `VideoDecoderSupport`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_config()` instead."] pub fn config(&mut self, val: &VideoDecoderConfig) -> &mut Self { self.set_config(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `supported` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoDecoderSupport`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_supported()` instead."] pub fn supported(&mut self, val: bool) -> &mut Self { self.set_supported(val); self diff --git a/crates/web-sys/src/features/gen_VideoEncoderConfig.rs b/crates/web-sys/src/features/gen_VideoEncoderConfig.rs index 0a5ce41d8e8c..b497f718d8be 100644 --- a/crates/web-sys/src/features/gen_VideoEncoderConfig.rs +++ b/crates/web-sys/src/features/gen_VideoEncoderConfig.rs @@ -24,9 +24,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "alpha")] pub fn get_alpha(this: &VideoEncoderConfig) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "AlphaOption")] + #[doc = "Change the `alpha` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AlphaOption`, `VideoEncoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "alpha")] - fn set_alpha(this: &VideoEncoderConfig, val: AlphaOption); + pub fn set_alpha(this: &VideoEncoderConfig, val: AlphaOption); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `bitrate` field of this object."] #[doc = ""] @@ -36,8 +43,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "bitrate")] pub fn get_bitrate(this: &VideoEncoderConfig) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `bitrate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "bitrate")] - fn set_bitrate(this: &VideoEncoderConfig, val: f64); + pub fn set_bitrate(this: &VideoEncoderConfig, val: f64); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `codec` field of this object."] #[doc = ""] @@ -47,8 +61,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "codec")] pub fn get_codec(this: &VideoEncoderConfig) -> String; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `codec` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "codec")] - fn set_codec(this: &VideoEncoderConfig, val: &str); + pub fn set_codec(this: &VideoEncoderConfig, val: &str); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `displayHeight` field of this object."] #[doc = ""] @@ -58,8 +79,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "displayHeight")] pub fn get_display_height(this: &VideoEncoderConfig) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `displayHeight` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "displayHeight")] - fn set_display_height(this: &VideoEncoderConfig, val: u32); + pub fn set_display_height(this: &VideoEncoderConfig, val: u32); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `displayWidth` field of this object."] #[doc = ""] @@ -69,8 +97,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "displayWidth")] pub fn get_display_width(this: &VideoEncoderConfig) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `displayWidth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "displayWidth")] - fn set_display_width(this: &VideoEncoderConfig, val: u32); + pub fn set_display_width(this: &VideoEncoderConfig, val: u32); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `framerate` field of this object."] #[doc = ""] @@ -80,8 +115,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "framerate")] pub fn get_framerate(this: &VideoEncoderConfig) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `framerate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "framerate")] - fn set_framerate(this: &VideoEncoderConfig, val: f64); + pub fn set_framerate(this: &VideoEncoderConfig, val: f64); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "HardwareAcceleration")] #[doc = "Get the `hardwareAcceleration` field of this object."] @@ -92,9 +134,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "hardwareAcceleration")] pub fn get_hardware_acceleration(this: &VideoEncoderConfig) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "HardwareAcceleration")] + #[doc = "Change the `hardwareAcceleration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HardwareAcceleration`, `VideoEncoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "hardwareAcceleration")] - fn set_hardware_acceleration(this: &VideoEncoderConfig, val: HardwareAcceleration); + pub fn set_hardware_acceleration(this: &VideoEncoderConfig, val: HardwareAcceleration); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `height` field of this object."] #[doc = ""] @@ -104,8 +153,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "height")] pub fn get_height(this: &VideoEncoderConfig) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `height` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "height")] - fn set_height(this: &VideoEncoderConfig, val: u32); + pub fn set_height(this: &VideoEncoderConfig, val: u32); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "LatencyMode")] #[doc = "Get the `latencyMode` field of this object."] @@ -116,9 +172,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "latencyMode")] pub fn get_latency_mode(this: &VideoEncoderConfig) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "LatencyMode")] + #[doc = "Change the `latencyMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `LatencyMode`, `VideoEncoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "latencyMode")] - fn set_latency_mode(this: &VideoEncoderConfig, val: LatencyMode); + pub fn set_latency_mode(this: &VideoEncoderConfig, val: LatencyMode); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `scalabilityMode` field of this object."] #[doc = ""] @@ -128,8 +191,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "scalabilityMode")] pub fn get_scalability_mode(this: &VideoEncoderConfig) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `scalabilityMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "scalabilityMode")] - fn set_scalability_mode(this: &VideoEncoderConfig, val: &str); + pub fn set_scalability_mode(this: &VideoEncoderConfig, val: &str); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `width` field of this object."] #[doc = ""] @@ -139,8 +209,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "width")] pub fn get_width(this: &VideoEncoderConfig) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `width` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "width")] - fn set_width(this: &VideoEncoderConfig, val: u32); + pub fn set_width(this: &VideoEncoderConfig, val: u32); } #[cfg(web_sys_unstable_apis)] impl VideoEncoderConfig { @@ -160,124 +237,69 @@ impl VideoEncoderConfig { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "AlphaOption")] - #[doc = "Change the `alpha` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AlphaOption`, `VideoEncoderConfig`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_alpha()` instead."] pub fn alpha(&mut self, val: AlphaOption) -> &mut Self { self.set_alpha(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `bitrate` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_bitrate()` instead."] pub fn bitrate(&mut self, val: f64) -> &mut Self { self.set_bitrate(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `codec` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_codec()` instead."] pub fn codec(&mut self, val: &str) -> &mut Self { self.set_codec(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `displayHeight` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_display_height()` instead."] pub fn display_height(&mut self, val: u32) -> &mut Self { self.set_display_height(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `displayWidth` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_display_width()` instead."] pub fn display_width(&mut self, val: u32) -> &mut Self { self.set_display_width(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `framerate` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_framerate()` instead."] pub fn framerate(&mut self, val: f64) -> &mut Self { self.set_framerate(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "HardwareAcceleration")] - #[doc = "Change the `hardwareAcceleration` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HardwareAcceleration`, `VideoEncoderConfig`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_hardware_acceleration()` instead."] pub fn hardware_acceleration(&mut self, val: HardwareAcceleration) -> &mut Self { self.set_hardware_acceleration(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `height` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_height()` instead."] pub fn height(&mut self, val: u32) -> &mut Self { self.set_height(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "LatencyMode")] - #[doc = "Change the `latencyMode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `LatencyMode`, `VideoEncoderConfig`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_latency_mode()` instead."] pub fn latency_mode(&mut self, val: LatencyMode) -> &mut Self { self.set_latency_mode(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `scalabilityMode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_scalability_mode()` instead."] pub fn scalability_mode(&mut self, val: &str) -> &mut Self { self.set_scalability_mode(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `width` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_width()` instead."] pub fn width(&mut self, val: u32) -> &mut Self { self.set_width(val); self diff --git a/crates/web-sys/src/features/gen_VideoEncoderEncodeOptions.rs b/crates/web-sys/src/features/gen_VideoEncoderEncodeOptions.rs index d318e7ac43c4..18c58aac8473 100644 --- a/crates/web-sys/src/features/gen_VideoEncoderEncodeOptions.rs +++ b/crates/web-sys/src/features/gen_VideoEncoderEncodeOptions.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "keyFrame")] pub fn get_key_frame(this: &VideoEncoderEncodeOptions) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `keyFrame` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoEncoderEncodeOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "keyFrame")] - fn set_key_frame(this: &VideoEncoderEncodeOptions, val: bool); + pub fn set_key_frame(this: &VideoEncoderEncodeOptions, val: bool); } #[cfg(web_sys_unstable_apis)] impl VideoEncoderEncodeOptions { @@ -40,12 +47,7 @@ impl VideoEncoderEncodeOptions { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `keyFrame` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoEncoderEncodeOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_key_frame()` instead."] pub fn key_frame(&mut self, val: bool) -> &mut Self { self.set_key_frame(val); self diff --git a/crates/web-sys/src/features/gen_VideoEncoderInit.rs b/crates/web-sys/src/features/gen_VideoEncoderInit.rs index 30f5b354c785..47bd0e591d84 100644 --- a/crates/web-sys/src/features/gen_VideoEncoderInit.rs +++ b/crates/web-sys/src/features/gen_VideoEncoderInit.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "error")] pub fn get_error(this: &VideoEncoderInit) -> ::js_sys::Function; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `error` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoEncoderInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "error")] - fn set_error(this: &VideoEncoderInit, val: &::js_sys::Function); + pub fn set_error(this: &VideoEncoderInit, val: &::js_sys::Function); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `output` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "output")] pub fn get_output(this: &VideoEncoderInit) -> ::js_sys::Function; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `output` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoEncoderInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "output")] - fn set_output(this: &VideoEncoderInit, val: &::js_sys::Function); + pub fn set_output(this: &VideoEncoderInit, val: &::js_sys::Function); } #[cfg(web_sys_unstable_apis)] impl VideoEncoderInit { @@ -53,23 +67,13 @@ impl VideoEncoderInit { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `error` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoEncoderInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_error()` instead."] pub fn error(&mut self, val: &::js_sys::Function) -> &mut Self { self.set_error(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `output` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoEncoderInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_output()` instead."] pub fn output(&mut self, val: &::js_sys::Function) -> &mut Self { self.set_output(val); self diff --git a/crates/web-sys/src/features/gen_VideoEncoderSupport.rs b/crates/web-sys/src/features/gen_VideoEncoderSupport.rs index e807826c4c0c..8fa25810ba66 100644 --- a/crates/web-sys/src/features/gen_VideoEncoderSupport.rs +++ b/crates/web-sys/src/features/gen_VideoEncoderSupport.rs @@ -24,9 +24,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "config")] pub fn get_config(this: &VideoEncoderSupport) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "VideoEncoderConfig")] + #[doc = "Change the `config` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`, `VideoEncoderSupport`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "config")] - fn set_config(this: &VideoEncoderSupport, val: &VideoEncoderConfig); + pub fn set_config(this: &VideoEncoderSupport, val: &VideoEncoderConfig); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `supported` field of this object."] #[doc = ""] @@ -36,8 +43,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "supported")] pub fn get_supported(this: &VideoEncoderSupport) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `supported` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoEncoderSupport`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "supported")] - fn set_supported(this: &VideoEncoderSupport, val: bool); + pub fn set_supported(this: &VideoEncoderSupport, val: bool); } #[cfg(web_sys_unstable_apis)] impl VideoEncoderSupport { @@ -54,23 +68,13 @@ impl VideoEncoderSupport { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "VideoEncoderConfig")] - #[doc = "Change the `config` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`, `VideoEncoderSupport`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_config()` instead."] pub fn config(&mut self, val: &VideoEncoderConfig) -> &mut Self { self.set_config(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `supported` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoEncoderSupport`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_supported()` instead."] pub fn supported(&mut self, val: bool) -> &mut Self { self.set_supported(val); self diff --git a/crates/web-sys/src/features/gen_VideoFrameBufferInit.rs b/crates/web-sys/src/features/gen_VideoFrameBufferInit.rs index d41651991db1..6b595155c237 100644 --- a/crates/web-sys/src/features/gen_VideoFrameBufferInit.rs +++ b/crates/web-sys/src/features/gen_VideoFrameBufferInit.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "codedHeight")] pub fn get_coded_height(this: &VideoFrameBufferInit) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `codedHeight` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "codedHeight")] - fn set_coded_height(this: &VideoFrameBufferInit, val: u32); + pub fn set_coded_height(this: &VideoFrameBufferInit, val: u32); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `codedWidth` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "codedWidth")] pub fn get_coded_width(this: &VideoFrameBufferInit) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `codedWidth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "codedWidth")] - fn set_coded_width(this: &VideoFrameBufferInit, val: u32); + pub fn set_coded_width(this: &VideoFrameBufferInit, val: u32); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "VideoColorSpaceInit")] #[doc = "Get the `colorSpace` field of this object."] @@ -46,9 +60,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "colorSpace")] pub fn get_color_space(this: &VideoFrameBufferInit) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "VideoColorSpaceInit")] + #[doc = "Change the `colorSpace` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoColorSpaceInit`, `VideoFrameBufferInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "colorSpace")] - fn set_color_space(this: &VideoFrameBufferInit, val: &VideoColorSpaceInit); + pub fn set_color_space(this: &VideoFrameBufferInit, val: &VideoColorSpaceInit); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `displayHeight` field of this object."] #[doc = ""] @@ -58,8 +79,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "displayHeight")] pub fn get_display_height(this: &VideoFrameBufferInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `displayHeight` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "displayHeight")] - fn set_display_height(this: &VideoFrameBufferInit, val: u32); + pub fn set_display_height(this: &VideoFrameBufferInit, val: u32); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `displayWidth` field of this object."] #[doc = ""] @@ -69,8 +97,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "displayWidth")] pub fn get_display_width(this: &VideoFrameBufferInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `displayWidth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "displayWidth")] - fn set_display_width(this: &VideoFrameBufferInit, val: u32); + pub fn set_display_width(this: &VideoFrameBufferInit, val: u32); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `duration` field of this object."] #[doc = ""] @@ -80,8 +115,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "duration")] pub fn get_duration(this: &VideoFrameBufferInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `duration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "duration")] - fn set_duration(this: &VideoFrameBufferInit, val: f64); + pub fn set_duration(this: &VideoFrameBufferInit, val: f64); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "VideoPixelFormat")] #[doc = "Get the `format` field of this object."] @@ -92,9 +134,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "format")] pub fn get_format(this: &VideoFrameBufferInit) -> VideoPixelFormat; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "VideoPixelFormat")] + #[doc = "Change the `format` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`, `VideoPixelFormat`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "format")] - fn set_format(this: &VideoFrameBufferInit, val: VideoPixelFormat); + pub fn set_format(this: &VideoFrameBufferInit, val: VideoPixelFormat); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `layout` field of this object."] #[doc = ""] @@ -104,8 +153,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "layout")] pub fn get_layout(this: &VideoFrameBufferInit) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `layout` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "layout")] - fn set_layout(this: &VideoFrameBufferInit, val: &::wasm_bindgen::JsValue); + pub fn set_layout(this: &VideoFrameBufferInit, val: &::wasm_bindgen::JsValue); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `timestamp` field of this object."] #[doc = ""] @@ -115,8 +171,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "timestamp")] pub fn get_timestamp(this: &VideoFrameBufferInit) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "timestamp")] - fn set_timestamp(this: &VideoFrameBufferInit, val: f64); + pub fn set_timestamp(this: &VideoFrameBufferInit, val: f64); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "DomRectInit")] #[doc = "Get the `visibleRect` field of this object."] @@ -127,9 +190,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "visibleRect")] pub fn get_visible_rect(this: &VideoFrameBufferInit) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "DomRectInit")] + #[doc = "Change the `visibleRect` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomRectInit`, `VideoFrameBufferInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "visibleRect")] - fn set_visible_rect(this: &VideoFrameBufferInit, val: &DomRectInit); + pub fn set_visible_rect(this: &VideoFrameBufferInit, val: &DomRectInit); } #[cfg(web_sys_unstable_apis)] impl VideoFrameBufferInit { @@ -155,114 +225,64 @@ impl VideoFrameBufferInit { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `codedHeight` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_coded_height()` instead."] pub fn coded_height(&mut self, val: u32) -> &mut Self { self.set_coded_height(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `codedWidth` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_coded_width()` instead."] pub fn coded_width(&mut self, val: u32) -> &mut Self { self.set_coded_width(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "VideoColorSpaceInit")] - #[doc = "Change the `colorSpace` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoColorSpaceInit`, `VideoFrameBufferInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_color_space()` instead."] pub fn color_space(&mut self, val: &VideoColorSpaceInit) -> &mut Self { self.set_color_space(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `displayHeight` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_display_height()` instead."] pub fn display_height(&mut self, val: u32) -> &mut Self { self.set_display_height(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `displayWidth` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_display_width()` instead."] pub fn display_width(&mut self, val: u32) -> &mut Self { self.set_display_width(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `duration` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_duration()` instead."] pub fn duration(&mut self, val: f64) -> &mut Self { self.set_duration(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "VideoPixelFormat")] - #[doc = "Change the `format` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`, `VideoPixelFormat`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_format()` instead."] pub fn format(&mut self, val: VideoPixelFormat) -> &mut Self { self.set_format(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `layout` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_layout()` instead."] pub fn layout(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_layout(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `timestamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_timestamp()` instead."] pub fn timestamp(&mut self, val: f64) -> &mut Self { self.set_timestamp(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "DomRectInit")] - #[doc = "Change the `visibleRect` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomRectInit`, `VideoFrameBufferInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_visible_rect()` instead."] pub fn visible_rect(&mut self, val: &DomRectInit) -> &mut Self { self.set_visible_rect(val); self diff --git a/crates/web-sys/src/features/gen_VideoFrameCopyToOptions.rs b/crates/web-sys/src/features/gen_VideoFrameCopyToOptions.rs index 99ae0734a11e..686a12cbd926 100644 --- a/crates/web-sys/src/features/gen_VideoFrameCopyToOptions.rs +++ b/crates/web-sys/src/features/gen_VideoFrameCopyToOptions.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "layout")] pub fn get_layout(this: &VideoFrameCopyToOptions) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `layout` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoFrameCopyToOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "layout")] - fn set_layout(this: &VideoFrameCopyToOptions, val: &::wasm_bindgen::JsValue); + pub fn set_layout(this: &VideoFrameCopyToOptions, val: &::wasm_bindgen::JsValue); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "DomRectInit")] #[doc = "Get the `rect` field of this object."] @@ -35,9 +42,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "rect")] pub fn get_rect(this: &VideoFrameCopyToOptions) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "DomRectInit")] + #[doc = "Change the `rect` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomRectInit`, `VideoFrameCopyToOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "rect")] - fn set_rect(this: &VideoFrameCopyToOptions, val: &DomRectInit); + pub fn set_rect(this: &VideoFrameCopyToOptions, val: &DomRectInit); } #[cfg(web_sys_unstable_apis)] impl VideoFrameCopyToOptions { @@ -53,24 +67,14 @@ impl VideoFrameCopyToOptions { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `layout` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoFrameCopyToOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_layout()` instead."] pub fn layout(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_layout(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "DomRectInit")] - #[doc = "Change the `rect` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomRectInit`, `VideoFrameCopyToOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_rect()` instead."] pub fn rect(&mut self, val: &DomRectInit) -> &mut Self { self.set_rect(val); self diff --git a/crates/web-sys/src/features/gen_VideoFrameInit.rs b/crates/web-sys/src/features/gen_VideoFrameInit.rs index 132778acb374..2180804556f1 100644 --- a/crates/web-sys/src/features/gen_VideoFrameInit.rs +++ b/crates/web-sys/src/features/gen_VideoFrameInit.rs @@ -24,9 +24,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "alpha")] pub fn get_alpha(this: &VideoFrameInit) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "AlphaOption")] + #[doc = "Change the `alpha` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AlphaOption`, `VideoFrameInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "alpha")] - fn set_alpha(this: &VideoFrameInit, val: AlphaOption); + pub fn set_alpha(this: &VideoFrameInit, val: AlphaOption); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `displayHeight` field of this object."] #[doc = ""] @@ -36,8 +43,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "displayHeight")] pub fn get_display_height(this: &VideoFrameInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `displayHeight` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoFrameInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "displayHeight")] - fn set_display_height(this: &VideoFrameInit, val: u32); + pub fn set_display_height(this: &VideoFrameInit, val: u32); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `displayWidth` field of this object."] #[doc = ""] @@ -47,8 +61,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "displayWidth")] pub fn get_display_width(this: &VideoFrameInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `displayWidth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoFrameInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "displayWidth")] - fn set_display_width(this: &VideoFrameInit, val: u32); + pub fn set_display_width(this: &VideoFrameInit, val: u32); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `duration` field of this object."] #[doc = ""] @@ -58,8 +79,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "duration")] pub fn get_duration(this: &VideoFrameInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `duration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoFrameInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "duration")] - fn set_duration(this: &VideoFrameInit, val: f64); + pub fn set_duration(this: &VideoFrameInit, val: f64); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `timestamp` field of this object."] #[doc = ""] @@ -69,8 +97,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "timestamp")] pub fn get_timestamp(this: &VideoFrameInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoFrameInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "timestamp")] - fn set_timestamp(this: &VideoFrameInit, val: f64); + pub fn set_timestamp(this: &VideoFrameInit, val: f64); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "DomRectInit")] #[doc = "Get the `visibleRect` field of this object."] @@ -81,9 +116,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "visibleRect")] pub fn get_visible_rect(this: &VideoFrameInit) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "DomRectInit")] + #[doc = "Change the `visibleRect` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomRectInit`, `VideoFrameInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "visibleRect")] - fn set_visible_rect(this: &VideoFrameInit, val: &DomRectInit); + pub fn set_visible_rect(this: &VideoFrameInit, val: &DomRectInit); } #[cfg(web_sys_unstable_apis)] impl VideoFrameInit { @@ -100,68 +142,38 @@ impl VideoFrameInit { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "AlphaOption")] - #[doc = "Change the `alpha` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AlphaOption`, `VideoFrameInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_alpha()` instead."] pub fn alpha(&mut self, val: AlphaOption) -> &mut Self { self.set_alpha(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `displayHeight` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoFrameInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_display_height()` instead."] pub fn display_height(&mut self, val: u32) -> &mut Self { self.set_display_height(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `displayWidth` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoFrameInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_display_width()` instead."] pub fn display_width(&mut self, val: u32) -> &mut Self { self.set_display_width(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `duration` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoFrameInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_duration()` instead."] pub fn duration(&mut self, val: f64) -> &mut Self { self.set_duration(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `timestamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoFrameInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_timestamp()` instead."] pub fn timestamp(&mut self, val: f64) -> &mut Self { self.set_timestamp(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "DomRectInit")] - #[doc = "Change the `visibleRect` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomRectInit`, `VideoFrameInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_visible_rect()` instead."] pub fn visible_rect(&mut self, val: &DomRectInit) -> &mut Self { self.set_visible_rect(val); self diff --git a/crates/web-sys/src/features/gen_VoidCallback.rs b/crates/web-sys/src/features/gen_VoidCallback.rs index 9612cba3f14e..46b21e4a6e58 100644 --- a/crates/web-sys/src/features/gen_VoidCallback.rs +++ b/crates/web-sys/src/features/gen_VoidCallback.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `VoidCallback`*"] #[wasm_bindgen(method, getter = "handleEvent")] pub fn get_handle_event(this: &VoidCallback) -> Option<::js_sys::Function>; + #[doc = "Change the `handleEvent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VoidCallback`*"] #[wasm_bindgen(method, setter = "handleEvent")] - fn set_handle_event(this: &VoidCallback, val: &::js_sys::Function); + pub fn set_handle_event(this: &VoidCallback, val: &::js_sys::Function); } impl VoidCallback { #[doc = "Construct a new `VoidCallback`."] @@ -27,9 +30,7 @@ impl VoidCallback { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `handleEvent` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VoidCallback`*"] + #[deprecated = "Use `set_handle_event()` instead."] pub fn handle_event(&mut self, val: &::js_sys::Function) -> &mut Self { self.set_handle_event(val); self diff --git a/crates/web-sys/src/features/gen_VrLayer.rs b/crates/web-sys/src/features/gen_VrLayer.rs index a4a61b335e4b..7fd282af4623 100644 --- a/crates/web-sys/src/features/gen_VrLayer.rs +++ b/crates/web-sys/src/features/gen_VrLayer.rs @@ -15,15 +15,21 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `VrLayer`*"] #[wasm_bindgen(method, getter = "leftBounds")] pub fn get_left_bounds(this: &VrLayer) -> Option<::js_sys::Array>; + #[doc = "Change the `leftBounds` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VrLayer`*"] #[wasm_bindgen(method, setter = "leftBounds")] - fn set_left_bounds(this: &VrLayer, val: &::wasm_bindgen::JsValue); + pub fn set_left_bounds(this: &VrLayer, val: &::wasm_bindgen::JsValue); #[doc = "Get the `rightBounds` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `VrLayer`*"] #[wasm_bindgen(method, getter = "rightBounds")] pub fn get_right_bounds(this: &VrLayer) -> Option<::js_sys::Array>; + #[doc = "Change the `rightBounds` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VrLayer`*"] #[wasm_bindgen(method, setter = "rightBounds")] - fn set_right_bounds(this: &VrLayer, val: &::wasm_bindgen::JsValue); + pub fn set_right_bounds(this: &VrLayer, val: &::wasm_bindgen::JsValue); #[cfg(feature = "HtmlCanvasElement")] #[doc = "Get the `source` field of this object."] #[doc = ""] @@ -31,8 +37,11 @@ extern "C" { #[wasm_bindgen(method, getter = "source")] pub fn get_source(this: &VrLayer) -> Option; #[cfg(feature = "HtmlCanvasElement")] + #[doc = "Change the `source` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HtmlCanvasElement`, `VrLayer`*"] #[wasm_bindgen(method, setter = "source")] - fn set_source(this: &VrLayer, val: Option<&HtmlCanvasElement>); + pub fn set_source(this: &VrLayer, val: Option<&HtmlCanvasElement>); } impl VrLayer { #[doc = "Construct a new `VrLayer`."] @@ -43,24 +52,18 @@ impl VrLayer { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `leftBounds` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VrLayer`*"] + #[deprecated = "Use `set_left_bounds()` instead."] pub fn left_bounds(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_left_bounds(val); self } - #[doc = "Change the `rightBounds` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VrLayer`*"] + #[deprecated = "Use `set_right_bounds()` instead."] pub fn right_bounds(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_right_bounds(val); self } #[cfg(feature = "HtmlCanvasElement")] - #[doc = "Change the `source` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HtmlCanvasElement`, `VrLayer`*"] + #[deprecated = "Use `set_source()` instead."] pub fn source(&mut self, val: Option<&HtmlCanvasElement>) -> &mut Self { self.set_source(val); self diff --git a/crates/web-sys/src/features/gen_WatchAdvertisementsOptions.rs b/crates/web-sys/src/features/gen_WatchAdvertisementsOptions.rs index 45ebde1f3a3f..74a95c2f42ec 100644 --- a/crates/web-sys/src/features/gen_WatchAdvertisementsOptions.rs +++ b/crates/web-sys/src/features/gen_WatchAdvertisementsOptions.rs @@ -24,9 +24,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "signal")] pub fn get_signal(this: &WatchAdvertisementsOptions) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "AbortSignal")] + #[doc = "Change the `signal` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `WatchAdvertisementsOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "signal")] - fn set_signal(this: &WatchAdvertisementsOptions, val: &AbortSignal); + pub fn set_signal(this: &WatchAdvertisementsOptions, val: &AbortSignal); } #[cfg(web_sys_unstable_apis)] impl WatchAdvertisementsOptions { @@ -43,12 +50,7 @@ impl WatchAdvertisementsOptions { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "AbortSignal")] - #[doc = "Change the `signal` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `WatchAdvertisementsOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_signal()` instead."] pub fn signal(&mut self, val: &AbortSignal) -> &mut Self { self.set_signal(val); self diff --git a/crates/web-sys/src/features/gen_WaveShaperOptions.rs b/crates/web-sys/src/features/gen_WaveShaperOptions.rs index ea4349c153d4..181269e5fa79 100644 --- a/crates/web-sys/src/features/gen_WaveShaperOptions.rs +++ b/crates/web-sys/src/features/gen_WaveShaperOptions.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `WaveShaperOptions`*"] #[wasm_bindgen(method, getter = "channelCount")] pub fn get_channel_count(this: &WaveShaperOptions) -> Option; + #[doc = "Change the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WaveShaperOptions`*"] #[wasm_bindgen(method, setter = "channelCount")] - fn set_channel_count(this: &WaveShaperOptions, val: u32); + pub fn set_channel_count(this: &WaveShaperOptions, val: u32); #[cfg(feature = "ChannelCountMode")] #[doc = "Get the `channelCountMode` field of this object."] #[doc = ""] @@ -24,8 +27,11 @@ extern "C" { #[wasm_bindgen(method, getter = "channelCountMode")] pub fn get_channel_count_mode(this: &WaveShaperOptions) -> Option; #[cfg(feature = "ChannelCountMode")] + #[doc = "Change the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `WaveShaperOptions`*"] #[wasm_bindgen(method, setter = "channelCountMode")] - fn set_channel_count_mode(this: &WaveShaperOptions, val: ChannelCountMode); + pub fn set_channel_count_mode(this: &WaveShaperOptions, val: ChannelCountMode); #[cfg(feature = "ChannelInterpretation")] #[doc = "Get the `channelInterpretation` field of this object."] #[doc = ""] @@ -33,15 +39,21 @@ extern "C" { #[wasm_bindgen(method, getter = "channelInterpretation")] pub fn get_channel_interpretation(this: &WaveShaperOptions) -> Option; #[cfg(feature = "ChannelInterpretation")] + #[doc = "Change the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `WaveShaperOptions`*"] #[wasm_bindgen(method, setter = "channelInterpretation")] - fn set_channel_interpretation(this: &WaveShaperOptions, val: ChannelInterpretation); + pub fn set_channel_interpretation(this: &WaveShaperOptions, val: ChannelInterpretation); #[doc = "Get the `curve` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WaveShaperOptions`*"] #[wasm_bindgen(method, getter = "curve")] pub fn get_curve(this: &WaveShaperOptions) -> Option<::js_sys::Array>; + #[doc = "Change the `curve` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WaveShaperOptions`*"] #[wasm_bindgen(method, setter = "curve")] - fn set_curve(this: &WaveShaperOptions, val: &::wasm_bindgen::JsValue); + pub fn set_curve(this: &WaveShaperOptions, val: &::wasm_bindgen::JsValue); #[cfg(feature = "OverSampleType")] #[doc = "Get the `oversample` field of this object."] #[doc = ""] @@ -49,8 +61,11 @@ extern "C" { #[wasm_bindgen(method, getter = "oversample")] pub fn get_oversample(this: &WaveShaperOptions) -> Option; #[cfg(feature = "OverSampleType")] + #[doc = "Change the `oversample` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OverSampleType`, `WaveShaperOptions`*"] #[wasm_bindgen(method, setter = "oversample")] - fn set_oversample(this: &WaveShaperOptions, val: OverSampleType); + pub fn set_oversample(this: &WaveShaperOptions, val: OverSampleType); } impl WaveShaperOptions { #[doc = "Construct a new `WaveShaperOptions`."] @@ -61,40 +76,30 @@ impl WaveShaperOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `channelCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WaveShaperOptions`*"] + #[deprecated = "Use `set_channel_count()` instead."] pub fn channel_count(&mut self, val: u32) -> &mut Self { self.set_channel_count(val); self } #[cfg(feature = "ChannelCountMode")] - #[doc = "Change the `channelCountMode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `WaveShaperOptions`*"] + #[deprecated = "Use `set_channel_count_mode()` instead."] pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self { self.set_channel_count_mode(val); self } #[cfg(feature = "ChannelInterpretation")] - #[doc = "Change the `channelInterpretation` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `WaveShaperOptions`*"] + #[deprecated = "Use `set_channel_interpretation()` instead."] pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self { self.set_channel_interpretation(val); self } - #[doc = "Change the `curve` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WaveShaperOptions`*"] + #[deprecated = "Use `set_curve()` instead."] pub fn curve(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_curve(val); self } #[cfg(feature = "OverSampleType")] - #[doc = "Change the `oversample` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `OverSampleType`, `WaveShaperOptions`*"] + #[deprecated = "Use `set_oversample()` instead."] pub fn oversample(&mut self, val: OverSampleType) -> &mut Self { self.set_oversample(val); self diff --git a/crates/web-sys/src/features/gen_WebGlContextAttributes.rs b/crates/web-sys/src/features/gen_WebGlContextAttributes.rs index d24aafe60409..23109aab97e9 100644 --- a/crates/web-sys/src/features/gen_WebGlContextAttributes.rs +++ b/crates/web-sys/src/features/gen_WebGlContextAttributes.rs @@ -15,29 +15,41 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] #[wasm_bindgen(method, getter = "alpha")] pub fn get_alpha(this: &WebGlContextAttributes) -> Option; + #[doc = "Change the `alpha` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] #[wasm_bindgen(method, setter = "alpha")] - fn set_alpha(this: &WebGlContextAttributes, val: bool); + pub fn set_alpha(this: &WebGlContextAttributes, val: bool); #[doc = "Get the `antialias` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] #[wasm_bindgen(method, getter = "antialias")] pub fn get_antialias(this: &WebGlContextAttributes) -> Option; + #[doc = "Change the `antialias` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] #[wasm_bindgen(method, setter = "antialias")] - fn set_antialias(this: &WebGlContextAttributes, val: bool); + pub fn set_antialias(this: &WebGlContextAttributes, val: bool); #[doc = "Get the `depth` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] #[wasm_bindgen(method, getter = "depth")] pub fn get_depth(this: &WebGlContextAttributes) -> Option; + #[doc = "Change the `depth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] #[wasm_bindgen(method, setter = "depth")] - fn set_depth(this: &WebGlContextAttributes, val: bool); + pub fn set_depth(this: &WebGlContextAttributes, val: bool); #[doc = "Get the `failIfMajorPerformanceCaveat` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] #[wasm_bindgen(method, getter = "failIfMajorPerformanceCaveat")] pub fn get_fail_if_major_performance_caveat(this: &WebGlContextAttributes) -> Option; + #[doc = "Change the `failIfMajorPerformanceCaveat` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] #[wasm_bindgen(method, setter = "failIfMajorPerformanceCaveat")] - fn set_fail_if_major_performance_caveat(this: &WebGlContextAttributes, val: bool); + pub fn set_fail_if_major_performance_caveat(this: &WebGlContextAttributes, val: bool); #[cfg(feature = "WebGlPowerPreference")] #[doc = "Get the `powerPreference` field of this object."] #[doc = ""] @@ -45,29 +57,41 @@ extern "C" { #[wasm_bindgen(method, getter = "powerPreference")] pub fn get_power_preference(this: &WebGlContextAttributes) -> Option; #[cfg(feature = "WebGlPowerPreference")] + #[doc = "Change the `powerPreference` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`, `WebGlPowerPreference`*"] #[wasm_bindgen(method, setter = "powerPreference")] - fn set_power_preference(this: &WebGlContextAttributes, val: WebGlPowerPreference); + pub fn set_power_preference(this: &WebGlContextAttributes, val: WebGlPowerPreference); #[doc = "Get the `premultipliedAlpha` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] #[wasm_bindgen(method, getter = "premultipliedAlpha")] pub fn get_premultiplied_alpha(this: &WebGlContextAttributes) -> Option; + #[doc = "Change the `premultipliedAlpha` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] #[wasm_bindgen(method, setter = "premultipliedAlpha")] - fn set_premultiplied_alpha(this: &WebGlContextAttributes, val: bool); + pub fn set_premultiplied_alpha(this: &WebGlContextAttributes, val: bool); #[doc = "Get the `preserveDrawingBuffer` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] #[wasm_bindgen(method, getter = "preserveDrawingBuffer")] pub fn get_preserve_drawing_buffer(this: &WebGlContextAttributes) -> Option; + #[doc = "Change the `preserveDrawingBuffer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] #[wasm_bindgen(method, setter = "preserveDrawingBuffer")] - fn set_preserve_drawing_buffer(this: &WebGlContextAttributes, val: bool); + pub fn set_preserve_drawing_buffer(this: &WebGlContextAttributes, val: bool); #[doc = "Get the `stencil` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] #[wasm_bindgen(method, getter = "stencil")] pub fn get_stencil(this: &WebGlContextAttributes) -> Option; + #[doc = "Change the `stencil` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] #[wasm_bindgen(method, setter = "stencil")] - fn set_stencil(this: &WebGlContextAttributes, val: bool); + pub fn set_stencil(this: &WebGlContextAttributes, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `xrCompatible` field of this object."] #[doc = ""] @@ -77,8 +101,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "xrCompatible")] pub fn get_xr_compatible(this: &WebGlContextAttributes) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `xrCompatible` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "xrCompatible")] - fn set_xr_compatible(this: &WebGlContextAttributes, val: bool); + pub fn set_xr_compatible(this: &WebGlContextAttributes, val: bool); } impl WebGlContextAttributes { #[doc = "Construct a new `WebGlContextAttributes`."] @@ -89,70 +120,49 @@ impl WebGlContextAttributes { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `alpha` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] + #[deprecated = "Use `set_alpha()` instead."] pub fn alpha(&mut self, val: bool) -> &mut Self { self.set_alpha(val); self } - #[doc = "Change the `antialias` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] + #[deprecated = "Use `set_antialias()` instead."] pub fn antialias(&mut self, val: bool) -> &mut Self { self.set_antialias(val); self } - #[doc = "Change the `depth` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] + #[deprecated = "Use `set_depth()` instead."] pub fn depth(&mut self, val: bool) -> &mut Self { self.set_depth(val); self } - #[doc = "Change the `failIfMajorPerformanceCaveat` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] + #[deprecated = "Use `set_fail_if_major_performance_caveat()` instead."] pub fn fail_if_major_performance_caveat(&mut self, val: bool) -> &mut Self { self.set_fail_if_major_performance_caveat(val); self } #[cfg(feature = "WebGlPowerPreference")] - #[doc = "Change the `powerPreference` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`, `WebGlPowerPreference`*"] + #[deprecated = "Use `set_power_preference()` instead."] pub fn power_preference(&mut self, val: WebGlPowerPreference) -> &mut Self { self.set_power_preference(val); self } - #[doc = "Change the `premultipliedAlpha` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] + #[deprecated = "Use `set_premultiplied_alpha()` instead."] pub fn premultiplied_alpha(&mut self, val: bool) -> &mut Self { self.set_premultiplied_alpha(val); self } - #[doc = "Change the `preserveDrawingBuffer` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] + #[deprecated = "Use `set_preserve_drawing_buffer()` instead."] pub fn preserve_drawing_buffer(&mut self, val: bool) -> &mut Self { self.set_preserve_drawing_buffer(val); self } - #[doc = "Change the `stencil` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] + #[deprecated = "Use `set_stencil()` instead."] pub fn stencil(&mut self, val: bool) -> &mut Self { self.set_stencil(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `xrCompatible` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_xr_compatible()` instead."] pub fn xr_compatible(&mut self, val: bool) -> &mut Self { self.set_xr_compatible(val); self diff --git a/crates/web-sys/src/features/gen_WebGlContextEventInit.rs b/crates/web-sys/src/features/gen_WebGlContextEventInit.rs index 3df972a7984c..fff5f4f4790a 100644 --- a/crates/web-sys/src/features/gen_WebGlContextEventInit.rs +++ b/crates/web-sys/src/features/gen_WebGlContextEventInit.rs @@ -15,29 +15,41 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `WebGlContextEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &WebGlContextEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebGlContextEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &WebGlContextEventInit, val: bool); + pub fn set_bubbles(this: &WebGlContextEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WebGlContextEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &WebGlContextEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebGlContextEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &WebGlContextEventInit, val: bool); + pub fn set_cancelable(this: &WebGlContextEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WebGlContextEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &WebGlContextEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebGlContextEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &WebGlContextEventInit, val: bool); + pub fn set_composed(this: &WebGlContextEventInit, val: bool); #[doc = "Get the `statusMessage` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WebGlContextEventInit`*"] #[wasm_bindgen(method, getter = "statusMessage")] pub fn get_status_message(this: &WebGlContextEventInit) -> Option; + #[doc = "Change the `statusMessage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebGlContextEventInit`*"] #[wasm_bindgen(method, setter = "statusMessage")] - fn set_status_message(this: &WebGlContextEventInit, val: &str); + pub fn set_status_message(this: &WebGlContextEventInit, val: &str); } impl WebGlContextEventInit { #[doc = "Construct a new `WebGlContextEventInit`."] @@ -48,30 +60,22 @@ impl WebGlContextEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebGlContextEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebGlContextEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebGlContextEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } - #[doc = "Change the `statusMessage` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebGlContextEventInit`*"] + #[deprecated = "Use `set_status_message()` instead."] pub fn status_message(&mut self, val: &str) -> &mut Self { self.set_status_message(val); self diff --git a/crates/web-sys/src/features/gen_WebSocketDict.rs b/crates/web-sys/src/features/gen_WebSocketDict.rs index 4bed74b702af..752934754b99 100644 --- a/crates/web-sys/src/features/gen_WebSocketDict.rs +++ b/crates/web-sys/src/features/gen_WebSocketDict.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `WebSocketDict`*"] #[wasm_bindgen(method, getter = "websockets")] pub fn get_websockets(this: &WebSocketDict) -> Option<::js_sys::Array>; + #[doc = "Change the `websockets` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebSocketDict`*"] #[wasm_bindgen(method, setter = "websockets")] - fn set_websockets(this: &WebSocketDict, val: &::wasm_bindgen::JsValue); + pub fn set_websockets(this: &WebSocketDict, val: &::wasm_bindgen::JsValue); } impl WebSocketDict { #[doc = "Construct a new `WebSocketDict`."] @@ -27,9 +30,7 @@ impl WebSocketDict { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `websockets` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebSocketDict`*"] + #[deprecated = "Use `set_websockets()` instead."] pub fn websockets(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_websockets(val); self diff --git a/crates/web-sys/src/features/gen_WebSocketElement.rs b/crates/web-sys/src/features/gen_WebSocketElement.rs index 0b32be50b2f5..7c6d3464b568 100644 --- a/crates/web-sys/src/features/gen_WebSocketElement.rs +++ b/crates/web-sys/src/features/gen_WebSocketElement.rs @@ -15,43 +15,61 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `WebSocketElement`*"] #[wasm_bindgen(method, getter = "encrypted")] pub fn get_encrypted(this: &WebSocketElement) -> Option; + #[doc = "Change the `encrypted` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebSocketElement`*"] #[wasm_bindgen(method, setter = "encrypted")] - fn set_encrypted(this: &WebSocketElement, val: bool); + pub fn set_encrypted(this: &WebSocketElement, val: bool); #[doc = "Get the `hostport` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WebSocketElement`*"] #[wasm_bindgen(method, getter = "hostport")] pub fn get_hostport(this: &WebSocketElement) -> Option; + #[doc = "Change the `hostport` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebSocketElement`*"] #[wasm_bindgen(method, setter = "hostport")] - fn set_hostport(this: &WebSocketElement, val: &str); + pub fn set_hostport(this: &WebSocketElement, val: &str); #[doc = "Get the `msgreceived` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WebSocketElement`*"] #[wasm_bindgen(method, getter = "msgreceived")] pub fn get_msgreceived(this: &WebSocketElement) -> Option; + #[doc = "Change the `msgreceived` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebSocketElement`*"] #[wasm_bindgen(method, setter = "msgreceived")] - fn set_msgreceived(this: &WebSocketElement, val: u32); + pub fn set_msgreceived(this: &WebSocketElement, val: u32); #[doc = "Get the `msgsent` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WebSocketElement`*"] #[wasm_bindgen(method, getter = "msgsent")] pub fn get_msgsent(this: &WebSocketElement) -> Option; + #[doc = "Change the `msgsent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebSocketElement`*"] #[wasm_bindgen(method, setter = "msgsent")] - fn set_msgsent(this: &WebSocketElement, val: u32); + pub fn set_msgsent(this: &WebSocketElement, val: u32); #[doc = "Get the `receivedsize` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WebSocketElement`*"] #[wasm_bindgen(method, getter = "receivedsize")] pub fn get_receivedsize(this: &WebSocketElement) -> Option; + #[doc = "Change the `receivedsize` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebSocketElement`*"] #[wasm_bindgen(method, setter = "receivedsize")] - fn set_receivedsize(this: &WebSocketElement, val: f64); + pub fn set_receivedsize(this: &WebSocketElement, val: f64); #[doc = "Get the `sentsize` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WebSocketElement`*"] #[wasm_bindgen(method, getter = "sentsize")] pub fn get_sentsize(this: &WebSocketElement) -> Option; + #[doc = "Change the `sentsize` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebSocketElement`*"] #[wasm_bindgen(method, setter = "sentsize")] - fn set_sentsize(this: &WebSocketElement, val: f64); + pub fn set_sentsize(this: &WebSocketElement, val: f64); } impl WebSocketElement { #[doc = "Construct a new `WebSocketElement`."] @@ -62,44 +80,32 @@ impl WebSocketElement { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `encrypted` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebSocketElement`*"] + #[deprecated = "Use `set_encrypted()` instead."] pub fn encrypted(&mut self, val: bool) -> &mut Self { self.set_encrypted(val); self } - #[doc = "Change the `hostport` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebSocketElement`*"] + #[deprecated = "Use `set_hostport()` instead."] pub fn hostport(&mut self, val: &str) -> &mut Self { self.set_hostport(val); self } - #[doc = "Change the `msgreceived` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebSocketElement`*"] + #[deprecated = "Use `set_msgreceived()` instead."] pub fn msgreceived(&mut self, val: u32) -> &mut Self { self.set_msgreceived(val); self } - #[doc = "Change the `msgsent` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebSocketElement`*"] + #[deprecated = "Use `set_msgsent()` instead."] pub fn msgsent(&mut self, val: u32) -> &mut Self { self.set_msgsent(val); self } - #[doc = "Change the `receivedsize` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebSocketElement`*"] + #[deprecated = "Use `set_receivedsize()` instead."] pub fn receivedsize(&mut self, val: f64) -> &mut Self { self.set_receivedsize(val); self } - #[doc = "Change the `sentsize` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebSocketElement`*"] + #[deprecated = "Use `set_sentsize()` instead."] pub fn sentsize(&mut self, val: f64) -> &mut Self { self.set_sentsize(val); self diff --git a/crates/web-sys/src/features/gen_WebTransportCloseInfo.rs b/crates/web-sys/src/features/gen_WebTransportCloseInfo.rs index 294661e63a98..d33023f88701 100644 --- a/crates/web-sys/src/features/gen_WebTransportCloseInfo.rs +++ b/crates/web-sys/src/features/gen_WebTransportCloseInfo.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "closeCode")] pub fn get_close_code(this: &WebTransportCloseInfo) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `closeCode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportCloseInfo`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "closeCode")] - fn set_close_code(this: &WebTransportCloseInfo, val: u32); + pub fn set_close_code(this: &WebTransportCloseInfo, val: u32); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `reason` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "reason")] pub fn get_reason(this: &WebTransportCloseInfo) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `reason` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportCloseInfo`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "reason")] - fn set_reason(this: &WebTransportCloseInfo, val: &str); + pub fn set_reason(this: &WebTransportCloseInfo, val: &str); } #[cfg(web_sys_unstable_apis)] impl WebTransportCloseInfo { @@ -51,23 +65,13 @@ impl WebTransportCloseInfo { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `closeCode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebTransportCloseInfo`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_close_code()` instead."] pub fn close_code(&mut self, val: u32) -> &mut Self { self.set_close_code(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `reason` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebTransportCloseInfo`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_reason()` instead."] pub fn reason(&mut self, val: &str) -> &mut Self { self.set_reason(val); self diff --git a/crates/web-sys/src/features/gen_WebTransportDatagramStats.rs b/crates/web-sys/src/features/gen_WebTransportDatagramStats.rs index 9a0d0d1e2f44..22cd239a2685 100644 --- a/crates/web-sys/src/features/gen_WebTransportDatagramStats.rs +++ b/crates/web-sys/src/features/gen_WebTransportDatagramStats.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "droppedIncoming")] pub fn get_dropped_incoming(this: &WebTransportDatagramStats) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `droppedIncoming` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportDatagramStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "droppedIncoming")] - fn set_dropped_incoming(this: &WebTransportDatagramStats, val: f64); + pub fn set_dropped_incoming(this: &WebTransportDatagramStats, val: f64); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `expiredOutgoing` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "expiredOutgoing")] pub fn get_expired_outgoing(this: &WebTransportDatagramStats) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `expiredOutgoing` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportDatagramStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "expiredOutgoing")] - fn set_expired_outgoing(this: &WebTransportDatagramStats, val: f64); + pub fn set_expired_outgoing(this: &WebTransportDatagramStats, val: f64); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `lostOutgoing` field of this object."] #[doc = ""] @@ -45,8 +59,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "lostOutgoing")] pub fn get_lost_outgoing(this: &WebTransportDatagramStats) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `lostOutgoing` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportDatagramStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "lostOutgoing")] - fn set_lost_outgoing(this: &WebTransportDatagramStats, val: f64); + pub fn set_lost_outgoing(this: &WebTransportDatagramStats, val: f64); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `timestamp` field of this object."] #[doc = ""] @@ -56,8 +77,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "timestamp")] pub fn get_timestamp(this: &WebTransportDatagramStats) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportDatagramStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "timestamp")] - fn set_timestamp(this: &WebTransportDatagramStats, val: f64); + pub fn set_timestamp(this: &WebTransportDatagramStats, val: f64); } #[cfg(web_sys_unstable_apis)] impl WebTransportDatagramStats { @@ -73,45 +101,25 @@ impl WebTransportDatagramStats { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `droppedIncoming` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebTransportDatagramStats`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_dropped_incoming()` instead."] pub fn dropped_incoming(&mut self, val: f64) -> &mut Self { self.set_dropped_incoming(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `expiredOutgoing` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebTransportDatagramStats`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_expired_outgoing()` instead."] pub fn expired_outgoing(&mut self, val: f64) -> &mut Self { self.set_expired_outgoing(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `lostOutgoing` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebTransportDatagramStats`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_lost_outgoing()` instead."] pub fn lost_outgoing(&mut self, val: f64) -> &mut Self { self.set_lost_outgoing(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `timestamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebTransportDatagramStats`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_timestamp()` instead."] pub fn timestamp(&mut self, val: f64) -> &mut Self { self.set_timestamp(val); self diff --git a/crates/web-sys/src/features/gen_WebTransportErrorOptions.rs b/crates/web-sys/src/features/gen_WebTransportErrorOptions.rs index 9270fc9b0016..06a6c9dd6328 100644 --- a/crates/web-sys/src/features/gen_WebTransportErrorOptions.rs +++ b/crates/web-sys/src/features/gen_WebTransportErrorOptions.rs @@ -24,9 +24,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "source")] pub fn get_source(this: &WebTransportErrorOptions) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "WebTransportErrorSource")] + #[doc = "Change the `source` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportErrorOptions`, `WebTransportErrorSource`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "source")] - fn set_source(this: &WebTransportErrorOptions, val: WebTransportErrorSource); + pub fn set_source(this: &WebTransportErrorOptions, val: WebTransportErrorSource); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `streamErrorCode` field of this object."] #[doc = ""] @@ -36,8 +43,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "streamErrorCode")] pub fn get_stream_error_code(this: &WebTransportErrorOptions) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `streamErrorCode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportErrorOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "streamErrorCode")] - fn set_stream_error_code(this: &WebTransportErrorOptions, val: Option); + pub fn set_stream_error_code(this: &WebTransportErrorOptions, val: Option); } #[cfg(web_sys_unstable_apis)] impl WebTransportErrorOptions { @@ -54,23 +68,13 @@ impl WebTransportErrorOptions { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "WebTransportErrorSource")] - #[doc = "Change the `source` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebTransportErrorOptions`, `WebTransportErrorSource`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_source()` instead."] pub fn source(&mut self, val: WebTransportErrorSource) -> &mut Self { self.set_source(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `streamErrorCode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebTransportErrorOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_stream_error_code()` instead."] pub fn stream_error_code(&mut self, val: Option) -> &mut Self { self.set_stream_error_code(val); self diff --git a/crates/web-sys/src/features/gen_WebTransportHash.rs b/crates/web-sys/src/features/gen_WebTransportHash.rs index 091e323e8b6b..0a897b9f611f 100644 --- a/crates/web-sys/src/features/gen_WebTransportHash.rs +++ b/crates/web-sys/src/features/gen_WebTransportHash.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "algorithm")] pub fn get_algorithm(this: &WebTransportHash) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `algorithm` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportHash`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "algorithm")] - fn set_algorithm(this: &WebTransportHash, val: &str); + pub fn set_algorithm(this: &WebTransportHash, val: &str); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `value` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "value")] pub fn get_value(this: &WebTransportHash) -> Option<::js_sys::Object>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `value` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportHash`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "value")] - fn set_value(this: &WebTransportHash, val: &::js_sys::Object); + pub fn set_value(this: &WebTransportHash, val: &::js_sys::Object); } #[cfg(web_sys_unstable_apis)] impl WebTransportHash { @@ -51,23 +65,13 @@ impl WebTransportHash { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `algorithm` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebTransportHash`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_algorithm()` instead."] pub fn algorithm(&mut self, val: &str) -> &mut Self { self.set_algorithm(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `value` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebTransportHash`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_value()` instead."] pub fn value(&mut self, val: &::js_sys::Object) -> &mut Self { self.set_value(val); self diff --git a/crates/web-sys/src/features/gen_WebTransportOptions.rs b/crates/web-sys/src/features/gen_WebTransportOptions.rs index db9e07289d4d..bc2931951826 100644 --- a/crates/web-sys/src/features/gen_WebTransportOptions.rs +++ b/crates/web-sys/src/features/gen_WebTransportOptions.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "allowPooling")] pub fn get_allow_pooling(this: &WebTransportOptions) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `allowPooling` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "allowPooling")] - fn set_allow_pooling(this: &WebTransportOptions, val: bool); + pub fn set_allow_pooling(this: &WebTransportOptions, val: bool); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "WebTransportCongestionControl")] #[doc = "Get the `congestionControl` field of this object."] @@ -37,9 +44,16 @@ extern "C" { pub fn get_congestion_control( this: &WebTransportOptions, ) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "WebTransportCongestionControl")] + #[doc = "Change the `congestionControl` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportCongestionControl`, `WebTransportOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "congestionControl")] - fn set_congestion_control(this: &WebTransportOptions, val: WebTransportCongestionControl); + pub fn set_congestion_control(this: &WebTransportOptions, val: WebTransportCongestionControl); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `requireUnreliable` field of this object."] #[doc = ""] @@ -49,8 +63,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "requireUnreliable")] pub fn get_require_unreliable(this: &WebTransportOptions) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `requireUnreliable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "requireUnreliable")] - fn set_require_unreliable(this: &WebTransportOptions, val: bool); + pub fn set_require_unreliable(this: &WebTransportOptions, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `serverCertificateHashes` field of this object."] #[doc = ""] @@ -60,8 +81,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "serverCertificateHashes")] pub fn get_server_certificate_hashes(this: &WebTransportOptions) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `serverCertificateHashes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "serverCertificateHashes")] - fn set_server_certificate_hashes(this: &WebTransportOptions, val: &::wasm_bindgen::JsValue); + pub fn set_server_certificate_hashes(this: &WebTransportOptions, val: &::wasm_bindgen::JsValue); } #[cfg(web_sys_unstable_apis)] impl WebTransportOptions { @@ -77,46 +105,26 @@ impl WebTransportOptions { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `allowPooling` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebTransportOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_allow_pooling()` instead."] pub fn allow_pooling(&mut self, val: bool) -> &mut Self { self.set_allow_pooling(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "WebTransportCongestionControl")] - #[doc = "Change the `congestionControl` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebTransportCongestionControl`, `WebTransportOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_congestion_control()` instead."] pub fn congestion_control(&mut self, val: WebTransportCongestionControl) -> &mut Self { self.set_congestion_control(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `requireUnreliable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebTransportOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_require_unreliable()` instead."] pub fn require_unreliable(&mut self, val: bool) -> &mut Self { self.set_require_unreliable(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `serverCertificateHashes` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebTransportOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_server_certificate_hashes()` instead."] pub fn server_certificate_hashes(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_server_certificate_hashes(val); self diff --git a/crates/web-sys/src/features/gen_WebTransportReceiveStreamStats.rs b/crates/web-sys/src/features/gen_WebTransportReceiveStreamStats.rs index f28ba5424c77..51efe4f837bc 100644 --- a/crates/web-sys/src/features/gen_WebTransportReceiveStreamStats.rs +++ b/crates/web-sys/src/features/gen_WebTransportReceiveStreamStats.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "bytesRead")] pub fn get_bytes_read(this: &WebTransportReceiveStreamStats) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `bytesRead` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportReceiveStreamStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "bytesRead")] - fn set_bytes_read(this: &WebTransportReceiveStreamStats, val: f64); + pub fn set_bytes_read(this: &WebTransportReceiveStreamStats, val: f64); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `bytesReceived` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "bytesReceived")] pub fn get_bytes_received(this: &WebTransportReceiveStreamStats) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `bytesReceived` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportReceiveStreamStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "bytesReceived")] - fn set_bytes_received(this: &WebTransportReceiveStreamStats, val: f64); + pub fn set_bytes_received(this: &WebTransportReceiveStreamStats, val: f64); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `timestamp` field of this object."] #[doc = ""] @@ -45,8 +59,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "timestamp")] pub fn get_timestamp(this: &WebTransportReceiveStreamStats) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportReceiveStreamStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "timestamp")] - fn set_timestamp(this: &WebTransportReceiveStreamStats, val: f64); + pub fn set_timestamp(this: &WebTransportReceiveStreamStats, val: f64); } #[cfg(web_sys_unstable_apis)] impl WebTransportReceiveStreamStats { @@ -62,34 +83,19 @@ impl WebTransportReceiveStreamStats { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `bytesRead` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebTransportReceiveStreamStats`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_bytes_read()` instead."] pub fn bytes_read(&mut self, val: f64) -> &mut Self { self.set_bytes_read(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `bytesReceived` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebTransportReceiveStreamStats`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_bytes_received()` instead."] pub fn bytes_received(&mut self, val: f64) -> &mut Self { self.set_bytes_received(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `timestamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebTransportReceiveStreamStats`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_timestamp()` instead."] pub fn timestamp(&mut self, val: f64) -> &mut Self { self.set_timestamp(val); self diff --git a/crates/web-sys/src/features/gen_WebTransportSendStreamOptions.rs b/crates/web-sys/src/features/gen_WebTransportSendStreamOptions.rs index 3201533de986..8b7b073e0aa8 100644 --- a/crates/web-sys/src/features/gen_WebTransportSendStreamOptions.rs +++ b/crates/web-sys/src/features/gen_WebTransportSendStreamOptions.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "sendOrder")] pub fn get_send_order(this: &WebTransportSendStreamOptions) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `sendOrder` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportSendStreamOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "sendOrder")] - fn set_send_order(this: &WebTransportSendStreamOptions, val: Option); + pub fn set_send_order(this: &WebTransportSendStreamOptions, val: Option); } #[cfg(web_sys_unstable_apis)] impl WebTransportSendStreamOptions { @@ -40,12 +47,7 @@ impl WebTransportSendStreamOptions { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `sendOrder` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebTransportSendStreamOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_send_order()` instead."] pub fn send_order(&mut self, val: Option) -> &mut Self { self.set_send_order(val); self diff --git a/crates/web-sys/src/features/gen_WebTransportSendStreamStats.rs b/crates/web-sys/src/features/gen_WebTransportSendStreamStats.rs index 5430dc5d5150..e7f14805c320 100644 --- a/crates/web-sys/src/features/gen_WebTransportSendStreamStats.rs +++ b/crates/web-sys/src/features/gen_WebTransportSendStreamStats.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "bytesAcknowledged")] pub fn get_bytes_acknowledged(this: &WebTransportSendStreamStats) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `bytesAcknowledged` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportSendStreamStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "bytesAcknowledged")] - fn set_bytes_acknowledged(this: &WebTransportSendStreamStats, val: f64); + pub fn set_bytes_acknowledged(this: &WebTransportSendStreamStats, val: f64); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `bytesSent` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "bytesSent")] pub fn get_bytes_sent(this: &WebTransportSendStreamStats) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `bytesSent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportSendStreamStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "bytesSent")] - fn set_bytes_sent(this: &WebTransportSendStreamStats, val: f64); + pub fn set_bytes_sent(this: &WebTransportSendStreamStats, val: f64); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `bytesWritten` field of this object."] #[doc = ""] @@ -45,8 +59,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "bytesWritten")] pub fn get_bytes_written(this: &WebTransportSendStreamStats) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `bytesWritten` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportSendStreamStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "bytesWritten")] - fn set_bytes_written(this: &WebTransportSendStreamStats, val: f64); + pub fn set_bytes_written(this: &WebTransportSendStreamStats, val: f64); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `timestamp` field of this object."] #[doc = ""] @@ -56,8 +77,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "timestamp")] pub fn get_timestamp(this: &WebTransportSendStreamStats) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportSendStreamStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "timestamp")] - fn set_timestamp(this: &WebTransportSendStreamStats, val: f64); + pub fn set_timestamp(this: &WebTransportSendStreamStats, val: f64); } #[cfg(web_sys_unstable_apis)] impl WebTransportSendStreamStats { @@ -73,45 +101,25 @@ impl WebTransportSendStreamStats { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `bytesAcknowledged` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebTransportSendStreamStats`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_bytes_acknowledged()` instead."] pub fn bytes_acknowledged(&mut self, val: f64) -> &mut Self { self.set_bytes_acknowledged(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `bytesSent` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebTransportSendStreamStats`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_bytes_sent()` instead."] pub fn bytes_sent(&mut self, val: f64) -> &mut Self { self.set_bytes_sent(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `bytesWritten` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebTransportSendStreamStats`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_bytes_written()` instead."] pub fn bytes_written(&mut self, val: f64) -> &mut Self { self.set_bytes_written(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `timestamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebTransportSendStreamStats`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_timestamp()` instead."] pub fn timestamp(&mut self, val: f64) -> &mut Self { self.set_timestamp(val); self diff --git a/crates/web-sys/src/features/gen_WebTransportStats.rs b/crates/web-sys/src/features/gen_WebTransportStats.rs index 9cb9ee616bd7..175fc01ee29b 100644 --- a/crates/web-sys/src/features/gen_WebTransportStats.rs +++ b/crates/web-sys/src/features/gen_WebTransportStats.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "bytesReceived")] pub fn get_bytes_received(this: &WebTransportStats) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `bytesReceived` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "bytesReceived")] - fn set_bytes_received(this: &WebTransportStats, val: f64); + pub fn set_bytes_received(this: &WebTransportStats, val: f64); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `bytesSent` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "bytesSent")] pub fn get_bytes_sent(this: &WebTransportStats) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `bytesSent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "bytesSent")] - fn set_bytes_sent(this: &WebTransportStats, val: f64); + pub fn set_bytes_sent(this: &WebTransportStats, val: f64); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "WebTransportDatagramStats")] #[doc = "Get the `datagrams` field of this object."] @@ -46,9 +60,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "datagrams")] pub fn get_datagrams(this: &WebTransportStats) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "WebTransportDatagramStats")] + #[doc = "Change the `datagrams` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportDatagramStats`, `WebTransportStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "datagrams")] - fn set_datagrams(this: &WebTransportStats, val: &WebTransportDatagramStats); + pub fn set_datagrams(this: &WebTransportStats, val: &WebTransportDatagramStats); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `minRtt` field of this object."] #[doc = ""] @@ -58,8 +79,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "minRtt")] pub fn get_min_rtt(this: &WebTransportStats) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `minRtt` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "minRtt")] - fn set_min_rtt(this: &WebTransportStats, val: f64); + pub fn set_min_rtt(this: &WebTransportStats, val: f64); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `numIncomingStreamsCreated` field of this object."] #[doc = ""] @@ -69,8 +97,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "numIncomingStreamsCreated")] pub fn get_num_incoming_streams_created(this: &WebTransportStats) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `numIncomingStreamsCreated` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "numIncomingStreamsCreated")] - fn set_num_incoming_streams_created(this: &WebTransportStats, val: u32); + pub fn set_num_incoming_streams_created(this: &WebTransportStats, val: u32); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `numOutgoingStreamsCreated` field of this object."] #[doc = ""] @@ -80,8 +115,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "numOutgoingStreamsCreated")] pub fn get_num_outgoing_streams_created(this: &WebTransportStats) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `numOutgoingStreamsCreated` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "numOutgoingStreamsCreated")] - fn set_num_outgoing_streams_created(this: &WebTransportStats, val: u32); + pub fn set_num_outgoing_streams_created(this: &WebTransportStats, val: u32); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `packetsLost` field of this object."] #[doc = ""] @@ -91,8 +133,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "packetsLost")] pub fn get_packets_lost(this: &WebTransportStats) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `packetsLost` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "packetsLost")] - fn set_packets_lost(this: &WebTransportStats, val: f64); + pub fn set_packets_lost(this: &WebTransportStats, val: f64); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `packetsReceived` field of this object."] #[doc = ""] @@ -102,8 +151,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "packetsReceived")] pub fn get_packets_received(this: &WebTransportStats) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `packetsReceived` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "packetsReceived")] - fn set_packets_received(this: &WebTransportStats, val: f64); + pub fn set_packets_received(this: &WebTransportStats, val: f64); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `packetsSent` field of this object."] #[doc = ""] @@ -113,8 +169,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "packetsSent")] pub fn get_packets_sent(this: &WebTransportStats) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `packetsSent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "packetsSent")] - fn set_packets_sent(this: &WebTransportStats, val: f64); + pub fn set_packets_sent(this: &WebTransportStats, val: f64); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `rttVariation` field of this object."] #[doc = ""] @@ -124,8 +187,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "rttVariation")] pub fn get_rtt_variation(this: &WebTransportStats) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `rttVariation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "rttVariation")] - fn set_rtt_variation(this: &WebTransportStats, val: f64); + pub fn set_rtt_variation(this: &WebTransportStats, val: f64); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `smoothedRtt` field of this object."] #[doc = ""] @@ -135,8 +205,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "smoothedRtt")] pub fn get_smoothed_rtt(this: &WebTransportStats) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `smoothedRtt` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "smoothedRtt")] - fn set_smoothed_rtt(this: &WebTransportStats, val: f64); + pub fn set_smoothed_rtt(this: &WebTransportStats, val: f64); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `timestamp` field of this object."] #[doc = ""] @@ -146,8 +223,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "timestamp")] pub fn get_timestamp(this: &WebTransportStats) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "timestamp")] - fn set_timestamp(this: &WebTransportStats, val: f64); + pub fn set_timestamp(this: &WebTransportStats, val: f64); } #[cfg(web_sys_unstable_apis)] impl WebTransportStats { @@ -163,134 +247,74 @@ impl WebTransportStats { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `bytesReceived` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebTransportStats`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_bytes_received()` instead."] pub fn bytes_received(&mut self, val: f64) -> &mut Self { self.set_bytes_received(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `bytesSent` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebTransportStats`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_bytes_sent()` instead."] pub fn bytes_sent(&mut self, val: f64) -> &mut Self { self.set_bytes_sent(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "WebTransportDatagramStats")] - #[doc = "Change the `datagrams` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebTransportDatagramStats`, `WebTransportStats`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_datagrams()` instead."] pub fn datagrams(&mut self, val: &WebTransportDatagramStats) -> &mut Self { self.set_datagrams(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `minRtt` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebTransportStats`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_min_rtt()` instead."] pub fn min_rtt(&mut self, val: f64) -> &mut Self { self.set_min_rtt(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `numIncomingStreamsCreated` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebTransportStats`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_num_incoming_streams_created()` instead."] pub fn num_incoming_streams_created(&mut self, val: u32) -> &mut Self { self.set_num_incoming_streams_created(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `numOutgoingStreamsCreated` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebTransportStats`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_num_outgoing_streams_created()` instead."] pub fn num_outgoing_streams_created(&mut self, val: u32) -> &mut Self { self.set_num_outgoing_streams_created(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `packetsLost` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebTransportStats`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_packets_lost()` instead."] pub fn packets_lost(&mut self, val: f64) -> &mut Self { self.set_packets_lost(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `packetsReceived` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebTransportStats`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_packets_received()` instead."] pub fn packets_received(&mut self, val: f64) -> &mut Self { self.set_packets_received(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `packetsSent` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebTransportStats`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_packets_sent()` instead."] pub fn packets_sent(&mut self, val: f64) -> &mut Self { self.set_packets_sent(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `rttVariation` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebTransportStats`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_rtt_variation()` instead."] pub fn rtt_variation(&mut self, val: f64) -> &mut Self { self.set_rtt_variation(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `smoothedRtt` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebTransportStats`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_smoothed_rtt()` instead."] pub fn smoothed_rtt(&mut self, val: f64) -> &mut Self { self.set_smoothed_rtt(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `timestamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebTransportStats`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_timestamp()` instead."] pub fn timestamp(&mut self, val: f64) -> &mut Self { self.set_timestamp(val); self diff --git a/crates/web-sys/src/features/gen_WheelEventInit.rs b/crates/web-sys/src/features/gen_WheelEventInit.rs index a3acdcbb3ff6..f8e734ab8328 100644 --- a/crates/web-sys/src/features/gen_WheelEventInit.rs +++ b/crates/web-sys/src/features/gen_WheelEventInit.rs @@ -15,29 +15,41 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &WheelEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &WheelEventInit, val: bool); + pub fn set_bubbles(this: &WheelEventInit, val: bool); #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &WheelEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &WheelEventInit, val: bool); + pub fn set_cancelable(this: &WheelEventInit, val: bool); #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &WheelEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &WheelEventInit, val: bool); + pub fn set_composed(this: &WheelEventInit, val: bool); #[doc = "Get the `detail` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, getter = "detail")] pub fn get_detail(this: &WheelEventInit) -> Option; + #[doc = "Change the `detail` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "detail")] - fn set_detail(this: &WheelEventInit, val: i32); + pub fn set_detail(this: &WheelEventInit, val: i32); #[cfg(feature = "Window")] #[doc = "Get the `view` field of this object."] #[doc = ""] @@ -45,141 +57,201 @@ extern "C" { #[wasm_bindgen(method, getter = "view")] pub fn get_view(this: &WheelEventInit) -> Option; #[cfg(feature = "Window")] + #[doc = "Change the `view` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`, `Window`*"] #[wasm_bindgen(method, setter = "view")] - fn set_view(this: &WheelEventInit, val: Option<&Window>); + pub fn set_view(this: &WheelEventInit, val: Option<&Window>); #[doc = "Get the `altKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, getter = "altKey")] pub fn get_alt_key(this: &WheelEventInit) -> Option; + #[doc = "Change the `altKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "altKey")] - fn set_alt_key(this: &WheelEventInit, val: bool); + pub fn set_alt_key(this: &WheelEventInit, val: bool); #[doc = "Get the `ctrlKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, getter = "ctrlKey")] pub fn get_ctrl_key(this: &WheelEventInit) -> Option; + #[doc = "Change the `ctrlKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "ctrlKey")] - fn set_ctrl_key(this: &WheelEventInit, val: bool); + pub fn set_ctrl_key(this: &WheelEventInit, val: bool); #[doc = "Get the `metaKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, getter = "metaKey")] pub fn get_meta_key(this: &WheelEventInit) -> Option; + #[doc = "Change the `metaKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "metaKey")] - fn set_meta_key(this: &WheelEventInit, val: bool); + pub fn set_meta_key(this: &WheelEventInit, val: bool); #[doc = "Get the `modifierAltGraph` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, getter = "modifierAltGraph")] pub fn get_modifier_alt_graph(this: &WheelEventInit) -> Option; + #[doc = "Change the `modifierAltGraph` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "modifierAltGraph")] - fn set_modifier_alt_graph(this: &WheelEventInit, val: bool); + pub fn set_modifier_alt_graph(this: &WheelEventInit, val: bool); #[doc = "Get the `modifierCapsLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, getter = "modifierCapsLock")] pub fn get_modifier_caps_lock(this: &WheelEventInit) -> Option; + #[doc = "Change the `modifierCapsLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "modifierCapsLock")] - fn set_modifier_caps_lock(this: &WheelEventInit, val: bool); + pub fn set_modifier_caps_lock(this: &WheelEventInit, val: bool); #[doc = "Get the `modifierFn` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, getter = "modifierFn")] pub fn get_modifier_fn(this: &WheelEventInit) -> Option; + #[doc = "Change the `modifierFn` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "modifierFn")] - fn set_modifier_fn(this: &WheelEventInit, val: bool); + pub fn set_modifier_fn(this: &WheelEventInit, val: bool); #[doc = "Get the `modifierFnLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, getter = "modifierFnLock")] pub fn get_modifier_fn_lock(this: &WheelEventInit) -> Option; + #[doc = "Change the `modifierFnLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "modifierFnLock")] - fn set_modifier_fn_lock(this: &WheelEventInit, val: bool); + pub fn set_modifier_fn_lock(this: &WheelEventInit, val: bool); #[doc = "Get the `modifierNumLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, getter = "modifierNumLock")] pub fn get_modifier_num_lock(this: &WheelEventInit) -> Option; + #[doc = "Change the `modifierNumLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "modifierNumLock")] - fn set_modifier_num_lock(this: &WheelEventInit, val: bool); + pub fn set_modifier_num_lock(this: &WheelEventInit, val: bool); #[doc = "Get the `modifierOS` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, getter = "modifierOS")] pub fn get_modifier_os(this: &WheelEventInit) -> Option; + #[doc = "Change the `modifierOS` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "modifierOS")] - fn set_modifier_os(this: &WheelEventInit, val: bool); + pub fn set_modifier_os(this: &WheelEventInit, val: bool); #[doc = "Get the `modifierScrollLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, getter = "modifierScrollLock")] pub fn get_modifier_scroll_lock(this: &WheelEventInit) -> Option; + #[doc = "Change the `modifierScrollLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "modifierScrollLock")] - fn set_modifier_scroll_lock(this: &WheelEventInit, val: bool); + pub fn set_modifier_scroll_lock(this: &WheelEventInit, val: bool); #[doc = "Get the `modifierSymbol` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, getter = "modifierSymbol")] pub fn get_modifier_symbol(this: &WheelEventInit) -> Option; + #[doc = "Change the `modifierSymbol` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "modifierSymbol")] - fn set_modifier_symbol(this: &WheelEventInit, val: bool); + pub fn set_modifier_symbol(this: &WheelEventInit, val: bool); #[doc = "Get the `modifierSymbolLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, getter = "modifierSymbolLock")] pub fn get_modifier_symbol_lock(this: &WheelEventInit) -> Option; + #[doc = "Change the `modifierSymbolLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "modifierSymbolLock")] - fn set_modifier_symbol_lock(this: &WheelEventInit, val: bool); + pub fn set_modifier_symbol_lock(this: &WheelEventInit, val: bool); #[doc = "Get the `shiftKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, getter = "shiftKey")] pub fn get_shift_key(this: &WheelEventInit) -> Option; + #[doc = "Change the `shiftKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "shiftKey")] - fn set_shift_key(this: &WheelEventInit, val: bool); + pub fn set_shift_key(this: &WheelEventInit, val: bool); #[doc = "Get the `button` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, getter = "button")] pub fn get_button(this: &WheelEventInit) -> Option; + #[doc = "Change the `button` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "button")] - fn set_button(this: &WheelEventInit, val: i16); + pub fn set_button(this: &WheelEventInit, val: i16); #[doc = "Get the `buttons` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, getter = "buttons")] pub fn get_buttons(this: &WheelEventInit) -> Option; + #[doc = "Change the `buttons` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "buttons")] - fn set_buttons(this: &WheelEventInit, val: u16); + pub fn set_buttons(this: &WheelEventInit, val: u16); #[doc = "Get the `clientX` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, getter = "clientX")] pub fn get_client_x(this: &WheelEventInit) -> Option; + #[doc = "Change the `clientX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "clientX")] - fn set_client_x(this: &WheelEventInit, val: i32); + pub fn set_client_x(this: &WheelEventInit, val: i32); #[doc = "Get the `clientY` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, getter = "clientY")] pub fn get_client_y(this: &WheelEventInit) -> Option; + #[doc = "Change the `clientY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "clientY")] - fn set_client_y(this: &WheelEventInit, val: i32); + pub fn set_client_y(this: &WheelEventInit, val: i32); #[doc = "Get the `movementX` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, getter = "movementX")] pub fn get_movement_x(this: &WheelEventInit) -> Option; + #[doc = "Change the `movementX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "movementX")] - fn set_movement_x(this: &WheelEventInit, val: i32); + pub fn set_movement_x(this: &WheelEventInit, val: i32); #[doc = "Get the `movementY` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, getter = "movementY")] pub fn get_movement_y(this: &WheelEventInit) -> Option; + #[doc = "Change the `movementY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "movementY")] - fn set_movement_y(this: &WheelEventInit, val: i32); + pub fn set_movement_y(this: &WheelEventInit, val: i32); #[cfg(feature = "EventTarget")] #[doc = "Get the `relatedTarget` field of this object."] #[doc = ""] @@ -187,50 +259,71 @@ extern "C" { #[wasm_bindgen(method, getter = "relatedTarget")] pub fn get_related_target(this: &WheelEventInit) -> Option; #[cfg(feature = "EventTarget")] + #[doc = "Change the `relatedTarget` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventTarget`, `WheelEventInit`*"] #[wasm_bindgen(method, setter = "relatedTarget")] - fn set_related_target(this: &WheelEventInit, val: Option<&EventTarget>); + pub fn set_related_target(this: &WheelEventInit, val: Option<&EventTarget>); #[doc = "Get the `screenX` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, getter = "screenX")] pub fn get_screen_x(this: &WheelEventInit) -> Option; + #[doc = "Change the `screenX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "screenX")] - fn set_screen_x(this: &WheelEventInit, val: i32); + pub fn set_screen_x(this: &WheelEventInit, val: i32); #[doc = "Get the `screenY` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, getter = "screenY")] pub fn get_screen_y(this: &WheelEventInit) -> Option; + #[doc = "Change the `screenY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "screenY")] - fn set_screen_y(this: &WheelEventInit, val: i32); + pub fn set_screen_y(this: &WheelEventInit, val: i32); #[doc = "Get the `deltaMode` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, getter = "deltaMode")] pub fn get_delta_mode(this: &WheelEventInit) -> Option; + #[doc = "Change the `deltaMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "deltaMode")] - fn set_delta_mode(this: &WheelEventInit, val: u32); + pub fn set_delta_mode(this: &WheelEventInit, val: u32); #[doc = "Get the `deltaX` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, getter = "deltaX")] pub fn get_delta_x(this: &WheelEventInit) -> Option; + #[doc = "Change the `deltaX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "deltaX")] - fn set_delta_x(this: &WheelEventInit, val: f64); + pub fn set_delta_x(this: &WheelEventInit, val: f64); #[doc = "Get the `deltaY` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, getter = "deltaY")] pub fn get_delta_y(this: &WheelEventInit) -> Option; + #[doc = "Change the `deltaY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "deltaY")] - fn set_delta_y(this: &WheelEventInit, val: f64); + pub fn set_delta_y(this: &WheelEventInit, val: f64); #[doc = "Get the `deltaZ` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, getter = "deltaZ")] pub fn get_delta_z(this: &WheelEventInit) -> Option; + #[doc = "Change the `deltaZ` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "deltaZ")] - fn set_delta_z(this: &WheelEventInit, val: f64); + pub fn set_delta_z(this: &WheelEventInit, val: f64); } impl WheelEventInit { #[doc = "Construct a new `WheelEventInit`."] @@ -241,221 +334,159 @@ impl WheelEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } - #[doc = "Change the `detail` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_detail()` instead."] pub fn detail(&mut self, val: i32) -> &mut Self { self.set_detail(val); self } #[cfg(feature = "Window")] - #[doc = "Change the `view` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`, `Window`*"] + #[deprecated = "Use `set_view()` instead."] pub fn view(&mut self, val: Option<&Window>) -> &mut Self { self.set_view(val); self } - #[doc = "Change the `altKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_alt_key()` instead."] pub fn alt_key(&mut self, val: bool) -> &mut Self { self.set_alt_key(val); self } - #[doc = "Change the `ctrlKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_ctrl_key()` instead."] pub fn ctrl_key(&mut self, val: bool) -> &mut Self { self.set_ctrl_key(val); self } - #[doc = "Change the `metaKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_meta_key()` instead."] pub fn meta_key(&mut self, val: bool) -> &mut Self { self.set_meta_key(val); self } - #[doc = "Change the `modifierAltGraph` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_modifier_alt_graph()` instead."] pub fn modifier_alt_graph(&mut self, val: bool) -> &mut Self { self.set_modifier_alt_graph(val); self } - #[doc = "Change the `modifierCapsLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_modifier_caps_lock()` instead."] pub fn modifier_caps_lock(&mut self, val: bool) -> &mut Self { self.set_modifier_caps_lock(val); self } - #[doc = "Change the `modifierFn` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_modifier_fn()` instead."] pub fn modifier_fn(&mut self, val: bool) -> &mut Self { self.set_modifier_fn(val); self } - #[doc = "Change the `modifierFnLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_modifier_fn_lock()` instead."] pub fn modifier_fn_lock(&mut self, val: bool) -> &mut Self { self.set_modifier_fn_lock(val); self } - #[doc = "Change the `modifierNumLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_modifier_num_lock()` instead."] pub fn modifier_num_lock(&mut self, val: bool) -> &mut Self { self.set_modifier_num_lock(val); self } - #[doc = "Change the `modifierOS` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_modifier_os()` instead."] pub fn modifier_os(&mut self, val: bool) -> &mut Self { self.set_modifier_os(val); self } - #[doc = "Change the `modifierScrollLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_modifier_scroll_lock()` instead."] pub fn modifier_scroll_lock(&mut self, val: bool) -> &mut Self { self.set_modifier_scroll_lock(val); self } - #[doc = "Change the `modifierSymbol` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_modifier_symbol()` instead."] pub fn modifier_symbol(&mut self, val: bool) -> &mut Self { self.set_modifier_symbol(val); self } - #[doc = "Change the `modifierSymbolLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_modifier_symbol_lock()` instead."] pub fn modifier_symbol_lock(&mut self, val: bool) -> &mut Self { self.set_modifier_symbol_lock(val); self } - #[doc = "Change the `shiftKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_shift_key()` instead."] pub fn shift_key(&mut self, val: bool) -> &mut Self { self.set_shift_key(val); self } - #[doc = "Change the `button` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_button()` instead."] pub fn button(&mut self, val: i16) -> &mut Self { self.set_button(val); self } - #[doc = "Change the `buttons` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_buttons()` instead."] pub fn buttons(&mut self, val: u16) -> &mut Self { self.set_buttons(val); self } - #[doc = "Change the `clientX` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_client_x()` instead."] pub fn client_x(&mut self, val: i32) -> &mut Self { self.set_client_x(val); self } - #[doc = "Change the `clientY` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_client_y()` instead."] pub fn client_y(&mut self, val: i32) -> &mut Self { self.set_client_y(val); self } - #[doc = "Change the `movementX` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_movement_x()` instead."] pub fn movement_x(&mut self, val: i32) -> &mut Self { self.set_movement_x(val); self } - #[doc = "Change the `movementY` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_movement_y()` instead."] pub fn movement_y(&mut self, val: i32) -> &mut Self { self.set_movement_y(val); self } #[cfg(feature = "EventTarget")] - #[doc = "Change the `relatedTarget` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventTarget`, `WheelEventInit`*"] + #[deprecated = "Use `set_related_target()` instead."] pub fn related_target(&mut self, val: Option<&EventTarget>) -> &mut Self { self.set_related_target(val); self } - #[doc = "Change the `screenX` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_screen_x()` instead."] pub fn screen_x(&mut self, val: i32) -> &mut Self { self.set_screen_x(val); self } - #[doc = "Change the `screenY` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_screen_y()` instead."] pub fn screen_y(&mut self, val: i32) -> &mut Self { self.set_screen_y(val); self } - #[doc = "Change the `deltaMode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_delta_mode()` instead."] pub fn delta_mode(&mut self, val: u32) -> &mut Self { self.set_delta_mode(val); self } - #[doc = "Change the `deltaX` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_delta_x()` instead."] pub fn delta_x(&mut self, val: f64) -> &mut Self { self.set_delta_x(val); self } - #[doc = "Change the `deltaY` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_delta_y()` instead."] pub fn delta_y(&mut self, val: f64) -> &mut Self { self.set_delta_y(val); self } - #[doc = "Change the `deltaZ` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_delta_z()` instead."] pub fn delta_z(&mut self, val: f64) -> &mut Self { self.set_delta_z(val); self diff --git a/crates/web-sys/src/features/gen_WidevineCdmManifest.rs b/crates/web-sys/src/features/gen_WidevineCdmManifest.rs index d7511a9e37bb..a9ae7990833b 100644 --- a/crates/web-sys/src/features/gen_WidevineCdmManifest.rs +++ b/crates/web-sys/src/features/gen_WidevineCdmManifest.rs @@ -15,50 +15,71 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] #[wasm_bindgen(method, getter = "description")] pub fn get_description(this: &WidevineCdmManifest) -> String; + #[doc = "Change the `description` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] #[wasm_bindgen(method, setter = "description")] - fn set_description(this: &WidevineCdmManifest, val: &str); + pub fn set_description(this: &WidevineCdmManifest, val: &str); #[doc = "Get the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] #[wasm_bindgen(method, getter = "name")] pub fn get_name(this: &WidevineCdmManifest) -> String; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] #[wasm_bindgen(method, setter = "name")] - fn set_name(this: &WidevineCdmManifest, val: &str); + pub fn set_name(this: &WidevineCdmManifest, val: &str); #[doc = "Get the `version` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] #[wasm_bindgen(method, getter = "version")] pub fn get_version(this: &WidevineCdmManifest) -> String; + #[doc = "Change the `version` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] #[wasm_bindgen(method, setter = "version")] - fn set_version(this: &WidevineCdmManifest, val: &str); + pub fn set_version(this: &WidevineCdmManifest, val: &str); #[doc = "Get the `x-cdm-codecs` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] #[wasm_bindgen(method, getter = "x-cdm-codecs")] pub fn get_x_cdm_codecs(this: &WidevineCdmManifest) -> String; + #[doc = "Change the `x-cdm-codecs` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] #[wasm_bindgen(method, setter = "x-cdm-codecs")] - fn set_x_cdm_codecs(this: &WidevineCdmManifest, val: &str); + pub fn set_x_cdm_codecs(this: &WidevineCdmManifest, val: &str); #[doc = "Get the `x-cdm-host-versions` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] #[wasm_bindgen(method, getter = "x-cdm-host-versions")] pub fn get_x_cdm_host_versions(this: &WidevineCdmManifest) -> String; + #[doc = "Change the `x-cdm-host-versions` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] #[wasm_bindgen(method, setter = "x-cdm-host-versions")] - fn set_x_cdm_host_versions(this: &WidevineCdmManifest, val: &str); + pub fn set_x_cdm_host_versions(this: &WidevineCdmManifest, val: &str); #[doc = "Get the `x-cdm-interface-versions` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] #[wasm_bindgen(method, getter = "x-cdm-interface-versions")] pub fn get_x_cdm_interface_versions(this: &WidevineCdmManifest) -> String; + #[doc = "Change the `x-cdm-interface-versions` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] #[wasm_bindgen(method, setter = "x-cdm-interface-versions")] - fn set_x_cdm_interface_versions(this: &WidevineCdmManifest, val: &str); + pub fn set_x_cdm_interface_versions(this: &WidevineCdmManifest, val: &str); #[doc = "Get the `x-cdm-module-versions` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] #[wasm_bindgen(method, getter = "x-cdm-module-versions")] pub fn get_x_cdm_module_versions(this: &WidevineCdmManifest) -> String; + #[doc = "Change the `x-cdm-module-versions` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] #[wasm_bindgen(method, setter = "x-cdm-module-versions")] - fn set_x_cdm_module_versions(this: &WidevineCdmManifest, val: &str); + pub fn set_x_cdm_module_versions(this: &WidevineCdmManifest, val: &str); } impl WidevineCdmManifest { #[doc = "Construct a new `WidevineCdmManifest`."] @@ -84,51 +105,37 @@ impl WidevineCdmManifest { ret.x_cdm_module_versions(x_cdm_module_versions); ret } - #[doc = "Change the `description` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] + #[deprecated = "Use `set_description()` instead."] pub fn description(&mut self, val: &str) -> &mut Self { self.set_description(val); self } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { self.set_name(val); self } - #[doc = "Change the `version` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] + #[deprecated = "Use `set_version()` instead."] pub fn version(&mut self, val: &str) -> &mut Self { self.set_version(val); self } - #[doc = "Change the `x-cdm-codecs` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] + #[deprecated = "Use `set_x_cdm_codecs()` instead."] pub fn x_cdm_codecs(&mut self, val: &str) -> &mut Self { self.set_x_cdm_codecs(val); self } - #[doc = "Change the `x-cdm-host-versions` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] + #[deprecated = "Use `set_x_cdm_host_versions()` instead."] pub fn x_cdm_host_versions(&mut self, val: &str) -> &mut Self { self.set_x_cdm_host_versions(val); self } - #[doc = "Change the `x-cdm-interface-versions` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] + #[deprecated = "Use `set_x_cdm_interface_versions()` instead."] pub fn x_cdm_interface_versions(&mut self, val: &str) -> &mut Self { self.set_x_cdm_interface_versions(val); self } - #[doc = "Change the `x-cdm-module-versions` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] + #[deprecated = "Use `set_x_cdm_module_versions()` instead."] pub fn x_cdm_module_versions(&mut self, val: &str) -> &mut Self { self.set_x_cdm_module_versions(val); self diff --git a/crates/web-sys/src/features/gen_WorkerOptions.rs b/crates/web-sys/src/features/gen_WorkerOptions.rs index 614e59047b9f..e14b81609cc0 100644 --- a/crates/web-sys/src/features/gen_WorkerOptions.rs +++ b/crates/web-sys/src/features/gen_WorkerOptions.rs @@ -17,15 +17,21 @@ extern "C" { #[wasm_bindgen(method, getter = "credentials")] pub fn get_credentials(this: &WorkerOptions) -> Option; #[cfg(feature = "RequestCredentials")] + #[doc = "Change the `credentials` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestCredentials`, `WorkerOptions`*"] #[wasm_bindgen(method, setter = "credentials")] - fn set_credentials(this: &WorkerOptions, val: RequestCredentials); + pub fn set_credentials(this: &WorkerOptions, val: RequestCredentials); #[doc = "Get the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WorkerOptions`*"] #[wasm_bindgen(method, getter = "name")] pub fn get_name(this: &WorkerOptions) -> Option; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WorkerOptions`*"] #[wasm_bindgen(method, setter = "name")] - fn set_name(this: &WorkerOptions, val: &str); + pub fn set_name(this: &WorkerOptions, val: &str); #[cfg(feature = "WorkerType")] #[doc = "Get the `type` field of this object."] #[doc = ""] @@ -33,8 +39,11 @@ extern "C" { #[wasm_bindgen(method, getter = "type")] pub fn get_type(this: &WorkerOptions) -> Option; #[cfg(feature = "WorkerType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WorkerOptions`, `WorkerType`*"] #[wasm_bindgen(method, setter = "type")] - fn set_type(this: &WorkerOptions, val: WorkerType); + pub fn set_type(this: &WorkerOptions, val: WorkerType); } impl WorkerOptions { #[doc = "Construct a new `WorkerOptions`."] @@ -46,24 +55,18 @@ impl WorkerOptions { ret } #[cfg(feature = "RequestCredentials")] - #[doc = "Change the `credentials` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RequestCredentials`, `WorkerOptions`*"] + #[deprecated = "Use `set_credentials()` instead."] pub fn credentials(&mut self, val: RequestCredentials) -> &mut Self { self.set_credentials(val); self } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WorkerOptions`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { self.set_name(val); self } #[cfg(feature = "WorkerType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WorkerOptions`, `WorkerType`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: WorkerType) -> &mut Self { self.set_type(val); self diff --git a/crates/web-sys/src/features/gen_WorkletOptions.rs b/crates/web-sys/src/features/gen_WorkletOptions.rs index 78712787826c..07089ac8d499 100644 --- a/crates/web-sys/src/features/gen_WorkletOptions.rs +++ b/crates/web-sys/src/features/gen_WorkletOptions.rs @@ -17,8 +17,11 @@ extern "C" { #[wasm_bindgen(method, getter = "credentials")] pub fn get_credentials(this: &WorkletOptions) -> Option; #[cfg(feature = "RequestCredentials")] + #[doc = "Change the `credentials` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestCredentials`, `WorkletOptions`*"] #[wasm_bindgen(method, setter = "credentials")] - fn set_credentials(this: &WorkletOptions, val: RequestCredentials); + pub fn set_credentials(this: &WorkletOptions, val: RequestCredentials); } impl WorkletOptions { #[doc = "Construct a new `WorkletOptions`."] @@ -30,9 +33,7 @@ impl WorkletOptions { ret } #[cfg(feature = "RequestCredentials")] - #[doc = "Change the `credentials` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RequestCredentials`, `WorkletOptions`*"] + #[deprecated = "Use `set_credentials()` instead."] pub fn credentials(&mut self, val: RequestCredentials) -> &mut Self { self.set_credentials(val); self diff --git a/crates/web-sys/src/features/gen_WriteParams.rs b/crates/web-sys/src/features/gen_WriteParams.rs index 6247bcd5bb9e..a8c0ac9c7546 100644 --- a/crates/web-sys/src/features/gen_WriteParams.rs +++ b/crates/web-sys/src/features/gen_WriteParams.rs @@ -15,22 +15,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `WriteParams`*"] #[wasm_bindgen(method, getter = "data")] pub fn get_data(this: &WriteParams) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WriteParams`*"] #[wasm_bindgen(method, setter = "data")] - fn set_data(this: &WriteParams, val: &::wasm_bindgen::JsValue); + pub fn set_data(this: &WriteParams, val: &::wasm_bindgen::JsValue); #[doc = "Get the `position` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WriteParams`*"] #[wasm_bindgen(method, getter = "position")] pub fn get_position(this: &WriteParams) -> Option; + #[doc = "Change the `position` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WriteParams`*"] #[wasm_bindgen(method, setter = "position")] - fn set_position(this: &WriteParams, val: Option); + pub fn set_position(this: &WriteParams, val: Option); #[doc = "Get the `size` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WriteParams`*"] #[wasm_bindgen(method, getter = "size")] pub fn get_size(this: &WriteParams) -> Option; + #[doc = "Change the `size` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WriteParams`*"] #[wasm_bindgen(method, setter = "size")] - fn set_size(this: &WriteParams, val: Option); + pub fn set_size(this: &WriteParams, val: Option); #[cfg(feature = "WriteCommandType")] #[doc = "Get the `type` field of this object."] #[doc = ""] @@ -38,8 +47,11 @@ extern "C" { #[wasm_bindgen(method, getter = "type")] pub fn get_type(this: &WriteParams) -> WriteCommandType; #[cfg(feature = "WriteCommandType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WriteCommandType`, `WriteParams`*"] #[wasm_bindgen(method, setter = "type")] - fn set_type(this: &WriteParams, val: WriteCommandType); + pub fn set_type(this: &WriteParams, val: WriteCommandType); } impl WriteParams { #[cfg(feature = "WriteCommandType")] @@ -52,31 +64,23 @@ impl WriteParams { ret.type_(type_); ret } - #[doc = "Change the `data` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WriteParams`*"] + #[deprecated = "Use `set_data()` instead."] pub fn data(&mut self, val: Option<&::wasm_bindgen::JsValue>) -> &mut Self { self.set_data(val.unwrap_or(&::wasm_bindgen::JsValue::NULL)); self } - #[doc = "Change the `position` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WriteParams`*"] + #[deprecated = "Use `set_position()` instead."] pub fn position(&mut self, val: Option) -> &mut Self { self.set_position(val); self } - #[doc = "Change the `size` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WriteParams`*"] + #[deprecated = "Use `set_size()` instead."] pub fn size(&mut self, val: Option) -> &mut Self { self.set_size(val); self } #[cfg(feature = "WriteCommandType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WriteCommandType`, `WriteParams`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: WriteCommandType) -> &mut Self { self.set_type(val); self diff --git a/crates/web-sys/src/features/gen_XPathNsResolver.rs b/crates/web-sys/src/features/gen_XPathNsResolver.rs index 73b1efbb3184..d158b05ac1c3 100644 --- a/crates/web-sys/src/features/gen_XPathNsResolver.rs +++ b/crates/web-sys/src/features/gen_XPathNsResolver.rs @@ -15,8 +15,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `XPathNsResolver`*"] #[wasm_bindgen(method, getter = "lookupNamespaceURI")] pub fn get_lookup_namespace_uri(this: &XPathNsResolver) -> Option<::js_sys::Function>; + #[doc = "Change the `lookupNamespaceURI` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XPathNsResolver`*"] #[wasm_bindgen(method, setter = "lookupNamespaceURI")] - fn set_lookup_namespace_uri(this: &XPathNsResolver, val: &::js_sys::Function); + pub fn set_lookup_namespace_uri(this: &XPathNsResolver, val: &::js_sys::Function); } impl XPathNsResolver { #[doc = "Construct a new `XPathNsResolver`."] @@ -27,9 +30,7 @@ impl XPathNsResolver { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `lookupNamespaceURI` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XPathNsResolver`*"] + #[deprecated = "Use `set_lookup_namespace_uri()` instead."] pub fn lookup_namespace_uri(&mut self, val: &::js_sys::Function) -> &mut Self { self.set_lookup_namespace_uri(val); self diff --git a/crates/web-sys/src/features/gen_XrInputSourceEventInit.rs b/crates/web-sys/src/features/gen_XrInputSourceEventInit.rs index 26c987bbc878..fc4d8fa2c01b 100644 --- a/crates/web-sys/src/features/gen_XrInputSourceEventInit.rs +++ b/crates/web-sys/src/features/gen_XrInputSourceEventInit.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &XrInputSourceEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrInputSourceEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &XrInputSourceEventInit, val: bool); + pub fn set_bubbles(this: &XrInputSourceEventInit, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `cancelable` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &XrInputSourceEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrInputSourceEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &XrInputSourceEventInit, val: bool); + pub fn set_cancelable(this: &XrInputSourceEventInit, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `composed` field of this object."] #[doc = ""] @@ -45,8 +59,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &XrInputSourceEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrInputSourceEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &XrInputSourceEventInit, val: bool); + pub fn set_composed(this: &XrInputSourceEventInit, val: bool); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrFrame")] #[doc = "Get the `frame` field of this object."] @@ -57,9 +78,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "frame")] pub fn get_frame(this: &XrInputSourceEventInit) -> XrFrame; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrFrame")] + #[doc = "Change the `frame` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrFrame`, `XrInputSourceEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "frame")] - fn set_frame(this: &XrInputSourceEventInit, val: &XrFrame); + pub fn set_frame(this: &XrInputSourceEventInit, val: &XrFrame); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrInputSource")] #[doc = "Get the `inputSource` field of this object."] @@ -70,9 +98,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "inputSource")] pub fn get_input_source(this: &XrInputSourceEventInit) -> XrInputSource; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrInputSource")] + #[doc = "Change the `inputSource` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrInputSource`, `XrInputSourceEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "inputSource")] - fn set_input_source(this: &XrInputSourceEventInit, val: &XrInputSource); + pub fn set_input_source(this: &XrInputSourceEventInit, val: &XrInputSource); } #[cfg(web_sys_unstable_apis)] impl XrInputSourceEventInit { @@ -91,58 +126,33 @@ impl XrInputSourceEventInit { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrInputSourceEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrInputSourceEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrInputSourceEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrFrame")] - #[doc = "Change the `frame` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrFrame`, `XrInputSourceEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_frame()` instead."] pub fn frame(&mut self, val: &XrFrame) -> &mut Self { self.set_frame(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrInputSource")] - #[doc = "Change the `inputSource` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrInputSource`, `XrInputSourceEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_input_source()` instead."] pub fn input_source(&mut self, val: &XrInputSource) -> &mut Self { self.set_input_source(val); self diff --git a/crates/web-sys/src/features/gen_XrInputSourcesChangeEventInit.rs b/crates/web-sys/src/features/gen_XrInputSourcesChangeEventInit.rs index 9fa40837fa84..c2d2e32e4bb7 100644 --- a/crates/web-sys/src/features/gen_XrInputSourcesChangeEventInit.rs +++ b/crates/web-sys/src/features/gen_XrInputSourcesChangeEventInit.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &XrInputSourcesChangeEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &XrInputSourcesChangeEventInit, val: bool); + pub fn set_bubbles(this: &XrInputSourcesChangeEventInit, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `cancelable` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &XrInputSourcesChangeEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &XrInputSourcesChangeEventInit, val: bool); + pub fn set_cancelable(this: &XrInputSourcesChangeEventInit, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `composed` field of this object."] #[doc = ""] @@ -45,8 +59,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &XrInputSourcesChangeEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &XrInputSourcesChangeEventInit, val: bool); + pub fn set_composed(this: &XrInputSourcesChangeEventInit, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `added` field of this object."] #[doc = ""] @@ -56,8 +77,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "added")] pub fn get_added(this: &XrInputSourcesChangeEventInit) -> ::js_sys::Array; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `added` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "added")] - fn set_added(this: &XrInputSourcesChangeEventInit, val: &::wasm_bindgen::JsValue); + pub fn set_added(this: &XrInputSourcesChangeEventInit, val: &::wasm_bindgen::JsValue); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `removed` field of this object."] #[doc = ""] @@ -67,8 +95,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "removed")] pub fn get_removed(this: &XrInputSourcesChangeEventInit) -> ::js_sys::Array; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `removed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "removed")] - fn set_removed(this: &XrInputSourcesChangeEventInit, val: &::wasm_bindgen::JsValue); + pub fn set_removed(this: &XrInputSourcesChangeEventInit, val: &::wasm_bindgen::JsValue); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrSession")] #[doc = "Get the `session` field of this object."] @@ -79,9 +114,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "session")] pub fn get_session(this: &XrInputSourcesChangeEventInit) -> XrSession; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrSession")] + #[doc = "Change the `session` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEventInit`, `XrSession`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "session")] - fn set_session(this: &XrInputSourcesChangeEventInit, val: &XrSession); + pub fn set_session(this: &XrInputSourcesChangeEventInit, val: &XrSession); } #[cfg(web_sys_unstable_apis)] impl XrInputSourcesChangeEventInit { @@ -105,68 +147,38 @@ impl XrInputSourcesChangeEventInit { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `added` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_added()` instead."] pub fn added(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_added(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `removed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_removed()` instead."] pub fn removed(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_removed(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrSession")] - #[doc = "Change the `session` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEventInit`, `XrSession`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_session()` instead."] pub fn session(&mut self, val: &XrSession) -> &mut Self { self.set_session(val); self diff --git a/crates/web-sys/src/features/gen_XrPermissionDescriptor.rs b/crates/web-sys/src/features/gen_XrPermissionDescriptor.rs index 8e85f8f1750a..6884a9b83db7 100644 --- a/crates/web-sys/src/features/gen_XrPermissionDescriptor.rs +++ b/crates/web-sys/src/features/gen_XrPermissionDescriptor.rs @@ -24,9 +24,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "name")] pub fn get_name(this: &XrPermissionDescriptor) -> PermissionName; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "PermissionName")] + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PermissionName`, `XrPermissionDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "name")] - fn set_name(this: &XrPermissionDescriptor, val: PermissionName); + pub fn set_name(this: &XrPermissionDescriptor, val: PermissionName); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrSessionMode")] #[doc = "Get the `mode` field of this object."] @@ -37,9 +44,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "mode")] pub fn get_mode(this: &XrPermissionDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrSessionMode")] + #[doc = "Change the `mode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrPermissionDescriptor`, `XrSessionMode`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "mode")] - fn set_mode(this: &XrPermissionDescriptor, val: XrSessionMode); + pub fn set_mode(this: &XrPermissionDescriptor, val: XrSessionMode); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `optionalFeatures` field of this object."] #[doc = ""] @@ -49,8 +63,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "optionalFeatures")] pub fn get_optional_features(this: &XrPermissionDescriptor) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `optionalFeatures` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrPermissionDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "optionalFeatures")] - fn set_optional_features(this: &XrPermissionDescriptor, val: &::wasm_bindgen::JsValue); + pub fn set_optional_features(this: &XrPermissionDescriptor, val: &::wasm_bindgen::JsValue); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `requiredFeatures` field of this object."] #[doc = ""] @@ -60,8 +81,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "requiredFeatures")] pub fn get_required_features(this: &XrPermissionDescriptor) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `requiredFeatures` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrPermissionDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "requiredFeatures")] - fn set_required_features(this: &XrPermissionDescriptor, val: &::wasm_bindgen::JsValue); + pub fn set_required_features(this: &XrPermissionDescriptor, val: &::wasm_bindgen::JsValue); } #[cfg(web_sys_unstable_apis)] impl XrPermissionDescriptor { @@ -80,46 +108,26 @@ impl XrPermissionDescriptor { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "PermissionName")] - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PermissionName`, `XrPermissionDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: PermissionName) -> &mut Self { self.set_name(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrSessionMode")] - #[doc = "Change the `mode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrPermissionDescriptor`, `XrSessionMode`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_mode()` instead."] pub fn mode(&mut self, val: XrSessionMode) -> &mut Self { self.set_mode(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `optionalFeatures` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrPermissionDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_optional_features()` instead."] pub fn optional_features(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_optional_features(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `requiredFeatures` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrPermissionDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_required_features()` instead."] pub fn required_features(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_required_features(val); self diff --git a/crates/web-sys/src/features/gen_XrReferenceSpaceEventInit.rs b/crates/web-sys/src/features/gen_XrReferenceSpaceEventInit.rs index 0f16f17929d2..8d36176b94b7 100644 --- a/crates/web-sys/src/features/gen_XrReferenceSpaceEventInit.rs +++ b/crates/web-sys/src/features/gen_XrReferenceSpaceEventInit.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &XrReferenceSpaceEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrReferenceSpaceEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &XrReferenceSpaceEventInit, val: bool); + pub fn set_bubbles(this: &XrReferenceSpaceEventInit, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `cancelable` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &XrReferenceSpaceEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrReferenceSpaceEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &XrReferenceSpaceEventInit, val: bool); + pub fn set_cancelable(this: &XrReferenceSpaceEventInit, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `composed` field of this object."] #[doc = ""] @@ -45,8 +59,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &XrReferenceSpaceEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrReferenceSpaceEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &XrReferenceSpaceEventInit, val: bool); + pub fn set_composed(this: &XrReferenceSpaceEventInit, val: bool); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrReferenceSpace")] #[doc = "Get the `referenceSpace` field of this object."] @@ -57,9 +78,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "referenceSpace")] pub fn get_reference_space(this: &XrReferenceSpaceEventInit) -> XrReferenceSpace; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrReferenceSpace")] + #[doc = "Change the `referenceSpace` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrReferenceSpace`, `XrReferenceSpaceEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "referenceSpace")] - fn set_reference_space(this: &XrReferenceSpaceEventInit, val: &XrReferenceSpace); + pub fn set_reference_space(this: &XrReferenceSpaceEventInit, val: &XrReferenceSpace); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrRigidTransform")] #[doc = "Get the `transform` field of this object."] @@ -70,9 +98,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "transform")] pub fn get_transform(this: &XrReferenceSpaceEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrRigidTransform")] + #[doc = "Change the `transform` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrReferenceSpaceEventInit`, `XrRigidTransform`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "transform")] - fn set_transform(this: &XrReferenceSpaceEventInit, val: Option<&XrRigidTransform>); + pub fn set_transform(this: &XrReferenceSpaceEventInit, val: Option<&XrRigidTransform>); } #[cfg(web_sys_unstable_apis)] impl XrReferenceSpaceEventInit { @@ -90,58 +125,33 @@ impl XrReferenceSpaceEventInit { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrReferenceSpaceEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrReferenceSpaceEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrReferenceSpaceEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrReferenceSpace")] - #[doc = "Change the `referenceSpace` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrReferenceSpace`, `XrReferenceSpaceEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_reference_space()` instead."] pub fn reference_space(&mut self, val: &XrReferenceSpace) -> &mut Self { self.set_reference_space(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrRigidTransform")] - #[doc = "Change the `transform` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrReferenceSpaceEventInit`, `XrRigidTransform`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_transform()` instead."] pub fn transform(&mut self, val: Option<&XrRigidTransform>) -> &mut Self { self.set_transform(val); self diff --git a/crates/web-sys/src/features/gen_XrRenderStateInit.rs b/crates/web-sys/src/features/gen_XrRenderStateInit.rs index 08726d870a0b..80c948a87c05 100644 --- a/crates/web-sys/src/features/gen_XrRenderStateInit.rs +++ b/crates/web-sys/src/features/gen_XrRenderStateInit.rs @@ -24,9 +24,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "baseLayer")] pub fn get_base_layer(this: &XrRenderStateInit) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrWebGlLayer")] + #[doc = "Change the `baseLayer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrRenderStateInit`, `XrWebGlLayer`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "baseLayer")] - fn set_base_layer(this: &XrRenderStateInit, val: Option<&XrWebGlLayer>); + pub fn set_base_layer(this: &XrRenderStateInit, val: Option<&XrWebGlLayer>); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `depthFar` field of this object."] #[doc = ""] @@ -36,8 +43,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "depthFar")] pub fn get_depth_far(this: &XrRenderStateInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `depthFar` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrRenderStateInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "depthFar")] - fn set_depth_far(this: &XrRenderStateInit, val: f64); + pub fn set_depth_far(this: &XrRenderStateInit, val: f64); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `depthNear` field of this object."] #[doc = ""] @@ -47,8 +61,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "depthNear")] pub fn get_depth_near(this: &XrRenderStateInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `depthNear` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrRenderStateInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "depthNear")] - fn set_depth_near(this: &XrRenderStateInit, val: f64); + pub fn set_depth_near(this: &XrRenderStateInit, val: f64); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `inlineVerticalFieldOfView` field of this object."] #[doc = ""] @@ -58,8 +79,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "inlineVerticalFieldOfView")] pub fn get_inline_vertical_field_of_view(this: &XrRenderStateInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `inlineVerticalFieldOfView` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrRenderStateInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "inlineVerticalFieldOfView")] - fn set_inline_vertical_field_of_view(this: &XrRenderStateInit, val: f64); + pub fn set_inline_vertical_field_of_view(this: &XrRenderStateInit, val: f64); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `layers` field of this object."] #[doc = ""] @@ -69,8 +97,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "layers")] pub fn get_layers(this: &XrRenderStateInit) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `layers` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrRenderStateInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "layers")] - fn set_layers(this: &XrRenderStateInit, val: &::wasm_bindgen::JsValue); + pub fn set_layers(this: &XrRenderStateInit, val: &::wasm_bindgen::JsValue); } #[cfg(web_sys_unstable_apis)] impl XrRenderStateInit { @@ -87,56 +122,31 @@ impl XrRenderStateInit { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrWebGlLayer")] - #[doc = "Change the `baseLayer` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrRenderStateInit`, `XrWebGlLayer`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_base_layer()` instead."] pub fn base_layer(&mut self, val: Option<&XrWebGlLayer>) -> &mut Self { self.set_base_layer(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `depthFar` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrRenderStateInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_depth_far()` instead."] pub fn depth_far(&mut self, val: f64) -> &mut Self { self.set_depth_far(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `depthNear` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrRenderStateInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_depth_near()` instead."] pub fn depth_near(&mut self, val: f64) -> &mut Self { self.set_depth_near(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `inlineVerticalFieldOfView` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrRenderStateInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_inline_vertical_field_of_view()` instead."] pub fn inline_vertical_field_of_view(&mut self, val: f64) -> &mut Self { self.set_inline_vertical_field_of_view(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `layers` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrRenderStateInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_layers()` instead."] pub fn layers(&mut self, val: Option<&::wasm_bindgen::JsValue>) -> &mut Self { self.set_layers(val.unwrap_or(&::wasm_bindgen::JsValue::NULL)); self diff --git a/crates/web-sys/src/features/gen_XrSessionEventInit.rs b/crates/web-sys/src/features/gen_XrSessionEventInit.rs index ffab5dae7331..39cea9227792 100644 --- a/crates/web-sys/src/features/gen_XrSessionEventInit.rs +++ b/crates/web-sys/src/features/gen_XrSessionEventInit.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &XrSessionEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrSessionEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "bubbles")] - fn set_bubbles(this: &XrSessionEventInit, val: bool); + pub fn set_bubbles(this: &XrSessionEventInit, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `cancelable` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &XrSessionEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrSessionEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "cancelable")] - fn set_cancelable(this: &XrSessionEventInit, val: bool); + pub fn set_cancelable(this: &XrSessionEventInit, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `composed` field of this object."] #[doc = ""] @@ -45,8 +59,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &XrSessionEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrSessionEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "composed")] - fn set_composed(this: &XrSessionEventInit, val: bool); + pub fn set_composed(this: &XrSessionEventInit, val: bool); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrSession")] #[doc = "Get the `session` field of this object."] @@ -57,9 +78,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "session")] pub fn get_session(this: &XrSessionEventInit) -> XrSession; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrSession")] + #[doc = "Change the `session` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrSession`, `XrSessionEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "session")] - fn set_session(this: &XrSessionEventInit, val: &XrSession); + pub fn set_session(this: &XrSessionEventInit, val: &XrSession); } #[cfg(web_sys_unstable_apis)] impl XrSessionEventInit { @@ -77,46 +105,26 @@ impl XrSessionEventInit { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrSessionEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrSessionEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrSessionEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrSession")] - #[doc = "Change the `session` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrSession`, `XrSessionEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_session()` instead."] pub fn session(&mut self, val: &XrSession) -> &mut Self { self.set_session(val); self diff --git a/crates/web-sys/src/features/gen_XrSessionInit.rs b/crates/web-sys/src/features/gen_XrSessionInit.rs index f04622e18a9e..1e31e73dbee4 100644 --- a/crates/web-sys/src/features/gen_XrSessionInit.rs +++ b/crates/web-sys/src/features/gen_XrSessionInit.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "optionalFeatures")] pub fn get_optional_features(this: &XrSessionInit) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `optionalFeatures` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrSessionInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "optionalFeatures")] - fn set_optional_features(this: &XrSessionInit, val: &::wasm_bindgen::JsValue); + pub fn set_optional_features(this: &XrSessionInit, val: &::wasm_bindgen::JsValue); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `requiredFeatures` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "requiredFeatures")] pub fn get_required_features(this: &XrSessionInit) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `requiredFeatures` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrSessionInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "requiredFeatures")] - fn set_required_features(this: &XrSessionInit, val: &::wasm_bindgen::JsValue); + pub fn set_required_features(this: &XrSessionInit, val: &::wasm_bindgen::JsValue); } #[cfg(web_sys_unstable_apis)] impl XrSessionInit { @@ -51,23 +65,13 @@ impl XrSessionInit { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `optionalFeatures` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrSessionInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_optional_features()` instead."] pub fn optional_features(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_optional_features(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `requiredFeatures` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrSessionInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_required_features()` instead."] pub fn required_features(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_required_features(val); self diff --git a/crates/web-sys/src/features/gen_XrSessionSupportedPermissionDescriptor.rs b/crates/web-sys/src/features/gen_XrSessionSupportedPermissionDescriptor.rs index 4f42c1bcd46f..1c1f76d054f5 100644 --- a/crates/web-sys/src/features/gen_XrSessionSupportedPermissionDescriptor.rs +++ b/crates/web-sys/src/features/gen_XrSessionSupportedPermissionDescriptor.rs @@ -24,9 +24,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "name")] pub fn get_name(this: &XrSessionSupportedPermissionDescriptor) -> PermissionName; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "PermissionName")] + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PermissionName`, `XrSessionSupportedPermissionDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "name")] - fn set_name(this: &XrSessionSupportedPermissionDescriptor, val: PermissionName); + pub fn set_name(this: &XrSessionSupportedPermissionDescriptor, val: PermissionName); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrSessionMode")] #[doc = "Get the `mode` field of this object."] @@ -37,9 +44,16 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "mode")] pub fn get_mode(this: &XrSessionSupportedPermissionDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrSessionMode")] + #[doc = "Change the `mode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrSessionMode`, `XrSessionSupportedPermissionDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "mode")] - fn set_mode(this: &XrSessionSupportedPermissionDescriptor, val: XrSessionMode); + pub fn set_mode(this: &XrSessionSupportedPermissionDescriptor, val: XrSessionMode); } #[cfg(web_sys_unstable_apis)] impl XrSessionSupportedPermissionDescriptor { @@ -58,24 +72,14 @@ impl XrSessionSupportedPermissionDescriptor { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "PermissionName")] - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PermissionName`, `XrSessionSupportedPermissionDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: PermissionName) -> &mut Self { self.set_name(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrSessionMode")] - #[doc = "Change the `mode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrSessionMode`, `XrSessionSupportedPermissionDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_mode()` instead."] pub fn mode(&mut self, val: XrSessionMode) -> &mut Self { self.set_mode(val); self diff --git a/crates/web-sys/src/features/gen_XrWebGlLayerInit.rs b/crates/web-sys/src/features/gen_XrWebGlLayerInit.rs index 6a6ca56f341b..9c813965d66e 100644 --- a/crates/web-sys/src/features/gen_XrWebGlLayerInit.rs +++ b/crates/web-sys/src/features/gen_XrWebGlLayerInit.rs @@ -23,8 +23,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "alpha")] pub fn get_alpha(this: &XrWebGlLayerInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `alpha` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrWebGlLayerInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "alpha")] - fn set_alpha(this: &XrWebGlLayerInit, val: bool); + pub fn set_alpha(this: &XrWebGlLayerInit, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `antialias` field of this object."] #[doc = ""] @@ -34,8 +41,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "antialias")] pub fn get_antialias(this: &XrWebGlLayerInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `antialias` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrWebGlLayerInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "antialias")] - fn set_antialias(this: &XrWebGlLayerInit, val: bool); + pub fn set_antialias(this: &XrWebGlLayerInit, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `depth` field of this object."] #[doc = ""] @@ -45,8 +59,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "depth")] pub fn get_depth(this: &XrWebGlLayerInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `depth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrWebGlLayerInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "depth")] - fn set_depth(this: &XrWebGlLayerInit, val: bool); + pub fn set_depth(this: &XrWebGlLayerInit, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `framebufferScaleFactor` field of this object."] #[doc = ""] @@ -56,8 +77,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "framebufferScaleFactor")] pub fn get_framebuffer_scale_factor(this: &XrWebGlLayerInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `framebufferScaleFactor` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrWebGlLayerInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "framebufferScaleFactor")] - fn set_framebuffer_scale_factor(this: &XrWebGlLayerInit, val: f64); + pub fn set_framebuffer_scale_factor(this: &XrWebGlLayerInit, val: f64); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `ignoreDepthValues` field of this object."] #[doc = ""] @@ -67,8 +95,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "ignoreDepthValues")] pub fn get_ignore_depth_values(this: &XrWebGlLayerInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `ignoreDepthValues` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrWebGlLayerInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "ignoreDepthValues")] - fn set_ignore_depth_values(this: &XrWebGlLayerInit, val: bool); + pub fn set_ignore_depth_values(this: &XrWebGlLayerInit, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `stencil` field of this object."] #[doc = ""] @@ -78,8 +113,15 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "stencil")] pub fn get_stencil(this: &XrWebGlLayerInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `stencil` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrWebGlLayerInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "stencil")] - fn set_stencil(this: &XrWebGlLayerInit, val: bool); + pub fn set_stencil(this: &XrWebGlLayerInit, val: bool); } #[cfg(web_sys_unstable_apis)] impl XrWebGlLayerInit { @@ -95,67 +137,37 @@ impl XrWebGlLayerInit { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `alpha` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrWebGlLayerInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_alpha()` instead."] pub fn alpha(&mut self, val: bool) -> &mut Self { self.set_alpha(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `antialias` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrWebGlLayerInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_antialias()` instead."] pub fn antialias(&mut self, val: bool) -> &mut Self { self.set_antialias(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `depth` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrWebGlLayerInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_depth()` instead."] pub fn depth(&mut self, val: bool) -> &mut Self { self.set_depth(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `framebufferScaleFactor` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrWebGlLayerInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_framebuffer_scale_factor()` instead."] pub fn framebuffer_scale_factor(&mut self, val: f64) -> &mut Self { self.set_framebuffer_scale_factor(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `ignoreDepthValues` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrWebGlLayerInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_ignore_depth_values()` instead."] pub fn ignore_depth_values(&mut self, val: bool) -> &mut Self { self.set_ignore_depth_values(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `stencil` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrWebGlLayerInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_stencil()` instead."] pub fn stencil(&mut self, val: bool) -> &mut Self { self.set_stencil(val); self diff --git a/crates/webidl/src/generator.rs b/crates/webidl/src/generator.rs index 8701b37f185b..641b61fffc01 100644 --- a/crates/webidl/src/generator.rs +++ b/crates/webidl/src/generator.rs @@ -662,34 +662,37 @@ impl DictionaryField { let unstable_attr = maybe_unstable_attr(self.unstable); let unstable_docs = maybe_unstable_docs(self.unstable); - let doc_comment = comment( + let getter_doc_comment = comment( format!("Get the `{}` field of this object.", js_name), &required_doc_string(options, features), ); + let setter_doc_comment = comment( + format!("Change the `{}` field of this object.", js_name), + &required_doc_string(options, features), + ); + quote! { #unstable_attr #cfg_features - #doc_comment + #getter_doc_comment #unstable_docs #[wasm_bindgen(method, getter = #js_name)] pub fn #getter_name(this: &#parent_ident) -> #return_ty; + #unstable_attr #cfg_features + #setter_doc_comment + #unstable_docs #[wasm_bindgen(method, setter = #js_name)] - fn #setter_name(this: &#parent_ident, val: #ty); + pub fn #setter_name(this: &#parent_ident, val: #ty); } } - fn generate_rust_setter( - &self, - options: &Options, - features: &BTreeSet, - cfg_features: &Option, - ) -> TokenStream { + fn generate_rust_setter(&self, cfg_features: &Option) -> TokenStream { let DictionaryField { name, - js_name, + js_name: _, ty, return_ty: _, is_js_value_ref_option_type: _, @@ -699,14 +702,9 @@ impl DictionaryField { let name = rust_ident(name); let unstable_attr = maybe_unstable_attr(*unstable); - let unstable_docs = maybe_unstable_docs(*unstable); - - let doc_comment = comment( - format!("Change the `{}` field of this object.", js_name), - &required_doc_string(options, features), - ); let setter_name = self.setter_name(); + let deprecated = format!("Use `{}()` instead.", setter_name); let shim_args = if self.is_js_value_ref_option_type { quote! { val.unwrap_or(&::wasm_bindgen::JsValue::NULL) } @@ -717,8 +715,7 @@ impl DictionaryField { quote! { #unstable_attr #cfg_features - #doc_comment - #unstable_docs + #[deprecated = #deprecated] pub fn #name(&mut self, val: #ty) -> &mut Self { self.#setter_name(#shim_args); self @@ -815,11 +812,8 @@ impl Dictionary { let fields = fields .iter() - .zip(field_features.iter()) .zip(field_cfg_features.iter()) - .map(|((field, features), cfg_features)| { - field.generate_rust_setter(options, features, cfg_features) - }) + .map(|(field, cfg_features)| field.generate_rust_setter(cfg_features)) .collect::>(); let mut base_stream = quote! { diff --git a/examples/fetch/src/lib.rs b/examples/fetch/src/lib.rs index 95af06e4c28a..47e7c0f33fd3 100644 --- a/examples/fetch/src/lib.rs +++ b/examples/fetch/src/lib.rs @@ -4,9 +4,9 @@ use web_sys::{Request, RequestInit, RequestMode, Response}; #[wasm_bindgen] pub async fn run(repo: String) -> Result { - let mut opts = RequestInit::new(); - opts.method("GET"); - opts.mode(RequestMode::Cors); + let opts = RequestInit::new(); + opts.set_method("GET"); + opts.set_mode(RequestMode::Cors); let url = format!("https://api.github.com/repos/{}/branches/master", repo); diff --git a/examples/wasm-audio-worklet/src/dependent_module.rs b/examples/wasm-audio-worklet/src/dependent_module.rs index 6b01eb175abb..ce7f038fdcd2 100644 --- a/examples/wasm-audio-worklet/src/dependent_module.rs +++ b/examples/wasm-audio-worklet/src/dependent_module.rs @@ -23,9 +23,11 @@ pub fn on_the_fly(code: &str) -> Result { IMPORT_META.url(), ); + let options = BlobPropertyBag::new(); + options.set_type("text/javascript"); Url::create_object_url_with_blob(&Blob::new_with_str_sequence_and_options( &Array::of2(&JsValue::from(header.as_str()), &JsValue::from(code)), - BlobPropertyBag::new().type_("text/javascript"), + &options, )?) } diff --git a/examples/wasm-audio-worklet/src/wasm_audio.rs b/examples/wasm-audio-worklet/src/wasm_audio.rs index decaebd60d54..5b0534d99b2c 100644 --- a/examples/wasm-audio-worklet/src/wasm_audio.rs +++ b/examples/wasm-audio-worklet/src/wasm_audio.rs @@ -41,15 +41,13 @@ pub fn wasm_audio_node( ctx: &AudioContext, process: Box bool>, ) -> Result { - AudioWorkletNode::new_with_options( - ctx, - "WasmProcessor", - AudioWorkletNodeOptions::new().processor_options(Some(&js_sys::Array::of3( - &wasm_bindgen::module(), - &wasm_bindgen::memory(), - &WasmAudioProcessor(process).pack().into(), - ))), - ) + let options = AudioWorkletNodeOptions::new(); + options.set_processor_options(Some(&js_sys::Array::of3( + &wasm_bindgen::module(), + &wasm_bindgen::memory(), + &WasmAudioProcessor(process).pack().into(), + ))); + AudioWorkletNode::new_with_options(ctx, "WasmProcessor", &options) } pub async fn prepare_wasm_audio(ctx: &AudioContext) -> Result<(), JsValue> { diff --git a/examples/webrtc_datachannel/src/lib.rs b/examples/webrtc_datachannel/src/lib.rs index 7bb52f0a0e35..8a94fb62d45b 100644 --- a/examples/webrtc_datachannel/src/lib.rs +++ b/examples/webrtc_datachannel/src/lib.rs @@ -113,8 +113,8 @@ async fn start() -> Result<(), JsValue> { .unwrap(); console_log!("pc1: offer {:?}", offer_sdp); - let mut offer_obj = RtcSessionDescriptionInit::new(RtcSdpType::Offer); - offer_obj.sdp(&offer_sdp); + let offer_obj = RtcSessionDescriptionInit::new(RtcSdpType::Offer); + offer_obj.set_sdp(&offer_sdp); let sld_promise = pc1.set_local_description(&offer_obj); JsFuture::from(sld_promise).await?; console_log!("pc1: state {:?}", pc1.signaling_state()); @@ -124,8 +124,8 @@ async fn start() -> Result<(), JsValue> { * Create and send ANSWER from pc2 to pc1 * */ - let mut offer_obj = RtcSessionDescriptionInit::new(RtcSdpType::Offer); - offer_obj.sdp(&offer_sdp); + let offer_obj = RtcSessionDescriptionInit::new(RtcSdpType::Offer); + offer_obj.set_sdp(&offer_sdp); let srd_promise = pc2.set_remote_description(&offer_obj); JsFuture::from(srd_promise).await?; console_log!("pc2: state {:?}", pc2.signaling_state()); @@ -136,8 +136,8 @@ async fn start() -> Result<(), JsValue> { .unwrap(); console_log!("pc2: answer {:?}", answer_sdp); - let mut answer_obj = RtcSessionDescriptionInit::new(RtcSdpType::Answer); - answer_obj.sdp(&answer_sdp); + let answer_obj = RtcSessionDescriptionInit::new(RtcSdpType::Answer); + answer_obj.set_sdp(&answer_sdp); let sld_promise = pc2.set_local_description(&answer_obj); JsFuture::from(sld_promise).await?; console_log!("pc2: state {:?}", pc2.signaling_state()); @@ -146,8 +146,8 @@ async fn start() -> Result<(), JsValue> { * Receive ANSWER from pc2 * */ - let mut answer_obj = RtcSessionDescriptionInit::new(RtcSdpType::Answer); - answer_obj.sdp(&answer_sdp); + let answer_obj = RtcSessionDescriptionInit::new(RtcSdpType::Answer); + answer_obj.set_sdp(&answer_sdp); let srd_promise = pc1.set_remote_description(&answer_obj); JsFuture::from(srd_promise).await?; console_log!("pc1: state {:?}", pc1.signaling_state());