Table of contents
If you've browsed MDN recently, you may have noticed some Web API
types with really long names, including such bangers as
ReadableStreamDefaultReader and
FileSystemWritableFileStream. If you've ever thought "I
wonder what the longest one is", you're in luck — this is exactly what
this post is about.
The names
Section titled 'The names'50+ characters
Section titled '50+ characters'InterestGroupBiddingAndScoringScriptRunnerGlobalScopeWEBGL_multi_draw_instanced_base_vertex_base_instance
40+ characters
Section titled '40+ characters'WEBGL_draw_instanced_base_vertex_base_instanceRunFunctionForSharedStorageSelectURLOperationInterestGroupReportingScriptRunnerGlobalScopeWindowControlsOverlayGeometryChangeEventInitInterestGroupBiddingScriptRunnerGlobalScopeInterestGroupScoringScriptRunnerGlobalScopeContentVisibilityAutoStateChangeEventInitTopLevelStorageAccessPermissionDescriptorProtectedAudiencePrivateAggregationConfigAuthenticationExtensionsClientOutputsJSONPresentationConnectionAvailableEventInitPrivateNetworkAccessPermissionDescriptorAuthenticationExtensionsClientInputsJSONAuthenticationExtensionsLargeBlobOutputsWindowControlsOverlayGeometryChangeEvent
30+ characters
Section titled '30+ characters'SecurityPolicyViolationEventDispositionIdentityCredentialRequestOptionsContextMediaCapabilitiesKeySystemConfigurationSanitizerElementNamespaceWithAttributesAuthenticationExtensionsLargeBlobInputsMLQuantizeDequantizeLinearSupportLimitsWEBGL_blend_equation_advanced_coherentOrientationSensorLocalCoordinateSystemSharedStorageRunOperationMethodOptionsPublicKeyCredentialCreationOptionsJSONXRSessionSupportedPermissionDescriptorContentVisibilityAutoStateChangeEventAuthenticationExtensionsClientOutputsNavigationCurrentEntryChangeEventInitPrivateAttributionAggregationServicesSecurePaymentConfirmationAvailabilityAuthenticationExtensionsPaymentInputsSharedStoragePrivateAggregationConfigHTMLSharedStorageWritableElementUtilsPublicKeyCredentialClientCapabilitiesPublicKeyCredentialRequestOptionsJSONIdentityCredentialRequestOptionsModeAuthenticationExtensionsClientInputsFileSystemHandlePermissionDescriptorSVGFilterPrimitiveStandardAttributesMockCapturePromptResultConfigurationPermissionsPolicyViolationReportBodyPrivateAttributionAggregationServicePresentationConnectionAvailableEventPresentationConnectionCloseEventInitCollectedClientAdditionalPaymentDataInterestGroupScriptRunnerGlobalScopeAuthenticatorAttestationResponseJSONMLConvTranspose2dFilterOperandLayoutIdentityCredentialDisconnectOptionsSVGComponentTransferFunctionElementImageBitmapRenderingContextSettingsNavigationUpdateCurrentEntryOptionsPerformanceLongAnimationFrameTimingPrivateAttributionImpressionOptionsPrivateAttributionConversionOptionsReadableStreamBYOBReaderReadOptionsBluetoothLEScanPermissionDescriptorBluetoothManufacturerDataFilterInitGPURenderPassDepthStencilAttachmentWEBGL_compressed_texture_s3tc_srgbAccelerometerLocalCoordinateSystemAttributionReportingRequestOptionsPerformanceObserverCallbackOptionsPrivateAttributionConversionResultRemotePlaybackAvailabilityCallbackSharedStorageModifierMethodOptionsMediaStreamTrackAudioSourceOptionsAuthenticatorAssertionResponseJSONPublicKeyCredentialCreationOptionsAuthenticationExtensionsPRFOutputsRTCPeerConnectionIceErrorEventInitXRTransientInputHitTestOptionsInitFederatedCredentialRequestOptionsDocumentPictureInPictureEventInitOffscreenCanvasRenderingContext2DNavigationCurrentEntryChangeEventOnBeforeUnloadEventHandlerNonNullMagnetometerLocalCoordinateSystemDeviceMotionEventAccelerationInitDeviceMotionEventRotationRateInitPresentationConnectionCloseReasonAuctionReportBuyerDebugModeConfigBluetoothRemoteGATTCharacteristicBluetoothCharacteristicPropertiesPublicKeyCredentialUserEntityJSONPublicKeyCredentialDescriptorJSONPublicKeyCredentialRequestOptionsAuthenticationExtensionsPRFValuesAuthenticationExtensionsPRFInputsMLBatchNormalizationSupportLimitsSecurityPolicyViolationEventInitIdentityCredentialRequestOptionsHandwritingRecognizerQueryResultCanvasRenderingContext2DSettingsCameraDevicePermissionDescriptorPresentationConnectionCloseEventSecurePaymentConfirmationRequestTransformStreamDefaultControllerDirectFromSellerSignalsForSellerAudioWorkletProcessorConstructorAuthenticatorAttestationResponseVideoEncoderEncodeOptionsForHevcGPURenderBundleEncoderDescriptorWebTransportDatagramDuplexStreamEXT_disjoint_timer_query_webgl2ExtendableCookieChangeEventInitPaintRenderingContext2DSettingsDigitalCredentialRequestOptionsDocumentPictureInPictureOptionsFileSystemCreateWritableOptionsObservableInspectorAbortHandlerPushSubscriptionChangeEventInitSharedStorageWorkletGlobalScopeSpeechRecognitionErrorEventInitReadableStreamDefaultControllerWritableStreamDefaultControllerPAExtendedHistogramContributionDirectFromSellerSignalsForBuyerBluetoothManufacturerDataFilterBluetoothLEScanPermissionResultOfflineAudioCompletionEventInitMediaStreamAudioDestinationNodeMediaStreamTrackAudioSourceNodeAttestationConveyancePreferenceVideoEncoderEncodeOptionsForAv1VideoEncoderEncodeOptionsForAvcVideoEncoderEncodeOptionsForVp9EncodedAudioChunkOutputCallbackEncodedVideoChunkOutputCallbackWebGL2RenderingContextOverloadsGPUExternalTextureBindingLayoutRTCRemoteOutboundRtpStreamStatsRTCRtpHeaderExtensionParametersRTCRtpHeaderExtensionCapabilityWebTransportBidirectionalStreamUSBIsochronousOutTransferPacketUSBIsochronousOutTransferResultEXT_texture_filter_anisotropicSVGAnimatedPreserveAspectRatioWEBGL_compressed_texture_pvrtcHTMLAttributionSrcElementUtilsCredentialMediationRequirementSpatialNavigationSearchOptionsCharacterBoundsUpdateEventInitBrowserCaptureMediaStreamTrackIdentityProviderRequestOptionsIdentityProviderClientMetadataFileSystemPermissionDescriptorGyroscopeLocalCoordinateSystemMediaTrackSupportedConstraintsMockCaptureDeviceConfigurationNotificationPermissionCallbackObservableSubscriptionCallbackObservableEventListenerOptionsSanitizerElementWithAttributesSurfaceSwitchingPreferenceEnumReadableStreamGetReaderOptionsUnderlyingSourceCancelCallbackAuctionRealTimeReportingConfigBluetoothServiceDataFilterInitAudioContextRenderSizeCategoryMediaElementAudioSourceOptionsAuthenticatorAssertionResponseAuthenticatorSelectionCriteriaNavigatorAutomationInformationWebGLRenderingContextOverloadsGPUStorageTextureBindingLayoutGPUShaderModuleCompilationHintGPUCopyExternalImageSourceInfoMLInstanceNormalizationOptionsRTCIdentityProviderGlobalScopeRTCRemoteInboundRtpStreamStatsRTCPeerConnectionErrorCallbackRTCLocalSessionDescriptionInitRTCPeerConnectionIceErrorEventWebTransportReceiveStreamStatsUSBIsochronousInTransferPacketUSBIsochronousInTransferResult
25+ characters
Section titled '25+ characters'OES_texture_half_float_linearWEBGL_compressed_texture_astcWEBGL_compressed_texture_etc1WEBGL_compressed_texture_s3tcClipboardPermissionDescriptorCaretPositionFromPointOptionsDocumentPictureInPictureEventMediaKeySystemMediaCapabilitySVGFEComponentTransferElementFileSystemGetDirectoryOptionsIntersectionObserverEntryInitMediaCapabilitiesDecodingInfoMediaCapabilitiesEncodingInfoCanvasCaptureMediaStreamTrackMediaStreamTrackProcessorInitDeviceMotionEventAccelerationDeviceMotionEventRotationRatePaymentRequestUpdateEventInitSharedStorageSetMethodOptionsSharedStorageWorkletNavigatorSpeechSynthesisErrorEventInitReadableStreamIteratorOptionsUnderlyingSourceStartCallbackWebAssemblyInstantiatedSourceBluetoothPermissionDescriptorBluetoothAdvertisingEventInitBluetoothRemoteGATTDescriptorMediaStreamAudioSourceOptionsAllAcceptedCredentialsOptionsPublicKeyCredentialParametersPublicKeyCredentialUserEntityPublicKeyCredentialDescriptorGPUComputePassTimestampWritesSFrameTransformErrorEventTypeSFrameTransformErrorEventInitRTCStatsIceCandidatePairStateRTCSessionDescriptionCallbackRTCIceServerTransportProtocolRTCPeerConnectionIceEventInitWebTransportDatagramsWritableWebTransportCongestionControlWebTransportSendStreamOptionsXRTransientInputHitTestSourceXRTransientInputHitTestResultXRInputSourcesChangeEventInitSecurityPolicyViolationEventEXT_texture_compression_bptcEXT_texture_compression_rgtcWEBGL_compressed_texture_etcBackgroundFetchFailureReasonBackgroundFetchUpdateUIEventScriptingPolicyViolationTypeViewTransitionUpdateCallbackSVGFESpecularLightingElementFileSystemWritableFileStreamIntersectionObserverCallbackConstrainDOMStringParametersPaymentMethodChangeEventInitPerformanceObserverEntryListGenerateTestReportParametersSharedStorageUrlWithMetadataSpeechRecognitionAlternativeUnderlyingSourcePullCallbackReadableByteStreamControllerTransformerTransformCallbackBluetoothManufacturerDataMapBluetoothDeviceEventHandlersVideoTransferCharacteristicsGPUExternalTextureDescriptorGPUBindGroupLayoutDescriptorGPUComputePipelineDescriptorGPUCopyExternalImageDestInfoGPURenderPassTimestampWritesGPURenderPassColorAttachmentMLRecurrentNetworkActivationMLNormalizationSupportLimitsRTCEncodedVideoFrameMetadataRTCEncodedAudioFrameMetadataRTCIdentityProviderRegistrarUSBControlTransferParametersEXT_color_buffer_half_floatKHR_parallel_shader_compileBackgroundFetchRegistrationClipboardUnsanitizedFormatsExtendableCookieChangeEventAnimationWorkletGlobalScopeAnimatorInstanceConstructorIntrinsicSizesResultOptionsTextEncoderEncodeIntoResultMediaKeySystemConfigurationMediaKeySessionClosedReasonIdentityProviderAccountListSVGFEDiffuseLightingElementSVGFEDisplacementMapElementHandwritingHintsQueryResultImageBitmapRenderingContextOffscreenRenderingContextIdNavigatorConcurrentHardwareInputDeviceCapabilitiesInitKeySystemTrackConfigurationMockMicrophoneConfigurationPerformanceNavigationTimingNavigatorNetworkInformationPaymentRequestDetailsUpdatePerformanceObserverCallbackPresentationConnectionStatePushSubscriptionOptionsInitPushSubscriptionChangeEventSanitizerAttributeNamespaceTaskPriorityChangeEventInitPaymentCredentialInstrumentServiceWorkerUpdateViaCacheSharedStorageModifierMethodSharedStorageWorkletOptionsSpeechRecognitionErrorEventSpeechRecognitionResultListSpeechRecognitionPhraseListReadableStreamGenericReaderReadableStreamDefaultReaderUnderlyingSinkStartCallbackUnderlyingSinkWriteCallbackUnderlyingSinkCloseCallbackUnderlyingSinkAbortCallbackWritableStreamDefaultWriterIterationCompositeOperationBasePropertyIndexedKeyframeCharacteristicEventHandlersBluetoothCharacteristicUUIDOTPCredentialRequestOptionsAudioContextLatencyCategoryOfflineAudioCompletionEventMediaElementAudioSourceNodeAudioWorkletProcessCallbackPublicKeyCredentialRpEntityUserVerificationRequirementGPUPipelineLayoutDescriptorGPURenderPipelineDescriptorGPUCommandEncoderDescriptorGPUUncapturedErrorEventInitMLBatchNormalizationOptionsMLConv2dFilterOperandLayoutMLRecurrentNetworkDirectionMLLayerNormalizationOptionsRTCEncodedVideoFrameOptionsRTCEncodedAudioFrameOptionsRTCIdentityValidationResultRTCRtpSynchronizationSourceWebTransportReliabilityModeWebTransportConnectionStatsWebTransportSendStreamStatsSummarizerCreateCoreOptionsAccelerometerSensorOptionsHighlightsFromPointOptionsSpatialNavigationDirectionStartViewTransitionOptionsCharacterBoundsUpdateEventSVGFEConvolveMatrixElementFileSystemReadWriteOptionsFileSystemSyncAccessHandleHandwritingModelConstraintHandwritingRecognitionTypeHTMLFormControlsCollectionNavigationInterceptOptionsNavigationInterceptHandlerOnErrorEventHandlerNonNullOnBeforeUnloadEventHandlerStructuredSerializeOptionsDedicatedWorkerGlobalScopeConstrainPoint2DParametersDelegatedInkTrailPresenterMediaDecodingConfigurationMediaEncodingConfigurationConstrainBooleanParametersDeviceOrientationEventInitMemoryAttributionContainerPrivateAttributionProtocolPresentationConnectionListNetworkInformationSaveDataCollectedClientPaymentDataExtendableMessageEventInitSpeechRecognitionErrorCodeSpeechRecognitionEventInitSVGAnimateTransformElementAuctionAdInterestGroupSizeProtectedAudienceUtilitiesReportResultBrowserSignalsVideoFrameCallbackMetadataAnimationPlaybackEventInitBluetoothServiceDataFilterBluetoothPermissionStorageWatchAdvertisementsOptionsBluetoothRemoteGATTServiceOTPCredentialTransportTypeOfflineAudioContextOptionsMediaStreamAudioSourceNodeAuthenticationResponseJSONCredentialPropertiesOutputWebGLShaderPrecisionFormatWebGL2RenderingContextBaseGPUCopyExternalImageSourceGPUCommandBufferDescriptorMLSingleInputSupportLimitsRTCIdentityAssertionResultRTCIdentityProviderDetailsRTCIdentityProviderOptionsRTCQualityLimitationReasonRTCRtpTransceiverDirectionRTCDTMFToneChangeEventInitSummarizerSummarizeOptionsXMLHttpRequestResponseTypeIDBVersionChangeEventInitWindowOrWorkerGlobalScopeWebGLVertexArrayObjectOESSVGTextPositioningElementWEBGL_debug_renderer_infoServiceWorkerRegistrationCredentialCreationOptionsScriptingPolicyReportBodyCSSPositionTryDescriptorsCSSVariableReferenceValueCSSMatrixComponentOptionsTextFormatUpdateEventInitFileSystemDirectoryReaderFileSystemEntriesCallbackIdentityProviderWellKnownIdentityProviderAPIConfigIdentityAssertionResponseFenceReportingDestinationFileSystemDirectoryHandleHandwritingDrawingSegmentHTMLHyperlinkElementUtilsOffscreenRenderingContextNavigationNavigateOptionsNavigationHistoryBehaviorPromiseRejectionEventInitIntersectionObserverEntryPerformanceLongTaskTimingMagnetometerSensorOptionsMediaStreamTrackEventInitMediaStreamTrackProcessorMediaSessionPlaybackStateMediaSessionActionHandlerMediaSessionActionDetailsAbsoluteOrientationSensorRelativeOrientationSensorPaymentRequestUpdateEventPictureInPictureEventInitReportingObserverCallbackPerformanceResourceTimingSanitizerElementNamespaceSchedulerPostTaskCallbackCaptureStartFocusBehaviorSelfCapturePreferenceEnumSystemAudioPreferenceEnumDisplayMediaStreamOptionsDisplayCaptureSurfaceTypeSharedStorageAppendMethodSharedStorageDeleteMethodSpeechSynthesisErrorEventReadableStreamBYOBRequestTransformerCancelCallbackByteLengthQueuingStrategyAuctionAdInterestGroupKeyAuctionReportBuyersConfigURLPatternComponentResultPerformanceMeasureOptionsVideoFrameRequestCallbackBluetoothLEScanFilterInitBluetoothPermissionResultBluetoothAdvertisingEventBluetoothRemoteGATTServerDynamicsCompressorOptionsCurrentUserDetailsOptionsPublicKeyCredentialEntityVideoEncoderEncodeOptionsEncodedAudioChunkMetadataEncodedVideoChunkMetadataWebGLRenderingContextBaseGPUShaderModuleDescriptorGPUCompilationMessageTypeGPUPipelineDescriptorBaseGPURenderBundleDescriptorMLLogicalNotSupportLimitsSFrameTransformErrorEventGenerateAssertionCallbackValidateAssertionCallbackRTCReceivedRtpStreamStatsRTCOutboundRtpStreamStatsRTCSessionDescriptionInitRTCPeerConnectionIceEventWebTransportDatagramStatsWebTransportReceiveStreamXRInputSourcesChangeEventXRReferenceSpaceEventInitRewriterCreateCoreOptionsXMLHttpRequestEventTarget
How to reproduce this list
Section titled 'How to reproduce this list'Use the following Node script. It uses the WebIDL definitions from every Web standard to do its job. And yes, I am as surprised as you that they not only have a JavaScript API for this, but it's also all in one place and easy to use.
import idl from "@webref/idl";
const specs = await idl.parseAll();
const asts = Object.values(specs);
const definitions = asts.flat();
const allNames = definitions
.map(definition => definition.name)
.filter(name => name != undefined);
const uniqueNames = Array.from(new Set(allNames))
.toSorted((a, b) => b.length - a.length);
const THRESHOLD = 25;
const longNames = uniqueNames.filter(name => name.length >= THRESHOLD);
const byCharacters = name => Math.floor(name.length / 10) * 10;
const namesByCharacters =
Object.entries(Object.groupBy(longNames, byCharacters))
.map(entry => ({characters: entry[0], names: entry[1]}))
.toSorted((a, b) => b.characters - a.characters);
for (const group of namesByCharacters) {
const characters = group == namesByCharacters.at(-1)
? THRESHOLD
: group.characters;
console.log(`### ${characters}+ characters\n`);
for (const name of group.names) {
console.log(`* \`${name}\``);
}
console.log();
}