WebKit JS
Access and modify DOM elements within a webpage, including touch events and visual effects.
Overview
This covers miscellaneous DOM extensions used by Safari in macOS and iOS. These extensions include DOM touch events for processing gestures for devices that have a touch screen and visual effects that support 2D and 3D transforms, animation, and transitions. Most of the classes described in this reference are Apple extensions that may also be proposed W3C standards.
Topics
Essentials
Adding an AirPlay button to your Safari media controlsAdding Picture in Picture to your Safari media controls
Classes
ANGLEInstancedArraysAbstractWorkerAnalyserNodeAnimationEventAttrAudioBufferAudioBufferSourceNodeAudioContextAudioDestinationNodeAudioListenerAudioNodeAudioParamAudioProcessingEventAudioTrackAudioTrackListBarPropBeforeLoadEventBeforeUnloadEventBiquadFilterNodeBlobByteLengthQueuingStrategyCDATASectionCSSFontFaceRuleCSSImportRuleCSSKeyframeRuleCSSKeyframesRuleCSSMediaRuleCSSPageRuleCSSRuleCSSRuleListCSSStyleDeclarationCSSStyleRuleCSSStyleSheetCSSSupportsRuleCSSUnknownRuleCanvasGradientCanvasPatternCanvasRenderingContext2DChannelMergerNodeChannelSplitterNodeCharacterDataChildNodeClientRectClientRectListCloseEventCommandLineAPIHostCommentCompositionEventConvolverNodeCoordinatesCountQueuingStrategyCryptoCryptoKeyCustomEventDOMApplicationCacheDOMCSSNamespaceDOMErrorDOMFormDataDOMImplementationDOMMimeTypeDOMMimeTypeArrayDOMNamedFlowCollectionDOMParserDOMPathDOMPluginDOMPluginArrayDOMSelectionDOMStringListDOMStringMapDOMTokenListDOMURLDOMWindowDataCueDataTransferDatabaseDedicatedWorkerGlobalScopeDelayNodeDeviceMotionEventDeviceOrientationEventDocumentDocumentFragmentDocumentTypeDynamicsCompressorNodeEXTBlendMinMaxEXTFragDepthEXTShaderTextureLODEXTTextureFilterAnisotropicEXTsRGBErrorEventEventEventListenerEventSourceEventTargetFileFileErrorFileListFileReaderFileReaderSyncFocusEventFontFaceFontFaceSetGCObservationGainNodeGeolocationGeopositionGestureEventGlobalEventHandlersHTMLAllCollectionHTMLAnchorElementHTMLAppletElementHTMLAreaElementHTMLAttachmentElementHTMLAudioElementHTMLBRElementHTMLBaseElementHTMLBodyElementHTMLButtonElementHTMLCanvasElementHTMLCollectionHTMLDListElementHTMLDataElementHTMLDetailsElementHTMLDirectoryElementHTMLDivElementHTMLDocumentHTMLElementHTMLEmbedElementHTMLFieldSetElementHTMLFontElementHTMLFormControlsCollectionHTMLFormElementHTMLFrameElementHTMLFrameSetElementHTMLHRElementHTMLHeadElementHTMLHeadingElementHTMLHtmlElementHTMLHyperlinkElementUtilsHTMLIFrameElementHTMLImageElementHTMLInputElementHTMLKeygenElementHTMLLIElementHTMLLabelElementHTMLLegendElementHTMLLinkElementHTMLMapElementHTMLMarqueeElementHTMLMediaElementHTMLMenuElementHTMLMetaElementHTMLMeterElementHTMLModElementHTMLOListElementHTMLObjectElementHTMLOptGroupElementHTMLOptionElementHTMLOptionsCollectionHTMLOutputElementHTMLParagraphElementHTMLParamElementHTMLPictureElementHTMLPreElementHTMLProgressElementHTMLQuoteElementHTMLScriptElementHTMLSelectElementHTMLSlotElementHTMLSourceElementHTMLSpanElementHTMLStyleElementHTMLTableCaptionElementHTMLTableCellElementHTMLTableColElementHTMLTableElementHTMLTableRowElementHTMLTableSectionElementHTMLTemplateElementHTMLTextAreaElementHTMLTimeElementHTMLTitleElementHTMLTrackElementHTMLUListElementHTMLUnknownElementHTMLVideoElementHashChangeEventHistoryIDBCursorIDBCursorWithValueIDBDatabaseIDBFactoryIDBIndexIDBKeyRangeIDBObjectStoreIDBOpenDBRequestIDBRequestIDBTransactionIDBVersionChangeEventImageDataInspectorFrontendHostInterfaceNameInternalSettingsKeyboardEventLocationMallocStatisticsMediaControllerMediaControlsHostMediaElementAudioSourceNodeMediaErrorMediaListMediaQueryListMediaSourceMediaStreamAudioDestinationNodeMediaStreamAudioSourceNodeMemoryInfoMessageChannelMessageEventMessagePortMockContentFilterSettingsMockPageOverlayMouseEventMutationEventMutationObserverMutationRecordNamedNodeMapNavigatorNavigatorConcurrentHardwareNavigatorIDNavigatorLanguageNavigatorOnLineNodeNodeFilterNodeIteratorNodeListNonDocumentTypeChildNodeNonElementParentNodeNotificationNotificationCenterOESElementIndexUintOESStandardDerivativesOESTextureFloatOESTextureFloatLinearOESTextureHalfFloatOESTextureHalfFloatLinearOESVertexArrayObjectOfflineAudioCompletionEventOfflineAudioContextOscillatorNodeOverflowEventPageTransitionEventPannerNodeParentNodePerformancePerformanceEntryPerformanceEntryListPerformanceNavigationPerformanceResourceTimingPerformanceTimingPeriodicWavePopStateEventPositionErrorProcessingInstructionProgressEventQuickTimePluginReplacementRadioNodeListRangeReadableStreamReadableStreamSourceSQLErrorSQLResultSetSQLResultSetRowListSQLTransactionSVGAElementSVGAltGlyphDefElementSVGAltGlyphElementSVGAltGlyphItemElementSVGAngleSVGAnimateColorElementSVGAnimateElementSVGAnimateMotionElementSVGAnimateTransformElementSVGAnimatedAngleSVGAnimatedBooleanSVGAnimatedEnumerationSVGAnimatedIntegerSVGAnimatedLengthSVGAnimatedLengthListSVGAnimatedNumberSVGAnimatedNumberListSVGAnimatedPreserveAspectRatioSVGAnimatedRectSVGAnimatedStringSVGAnimatedTransformListSVGAnimationElementSVGCircleElementSVGClipPathElementSVGComponentTransferFunctionElementSVGCursorElementSVGDefsElementSVGDescElementSVGElementSVGEllipseElementSVGExternalResourcesRequiredSVGFEBlendElementSVGFEColorMatrixElementSVGFEComponentTransferElementSVGFECompositeElementSVGFEConvolveMatrixElementSVGFEDiffuseLightingElementSVGFEDisplacementMapElementSVGFEDistantLightElementSVGFEDropShadowElementSVGFEFloodElementSVGFEFuncAElementSVGFEFuncBElementSVGFEFuncGElementSVGFEFuncRElementSVGFEGaussianBlurElementSVGFEImageElementSVGFEMergeElementSVGFEMergeNodeElementSVGFEMorphologyElementSVGFEOffsetElementSVGFEPointLightElementSVGFESpecularLightingElementSVGFESpotLightElementSVGFETileElementSVGFETurbulenceElementSVGFilterElementSVGFilterPrimitiveStandardAttributesSVGFitToViewBoxSVGFontElementSVGFontFaceElementSVGFontFaceFormatElementSVGFontFaceNameElementSVGFontFaceSrcElementSVGFontFaceUriElementSVGForeignObjectElementSVGGElementSVGGlyphElementSVGGlyphRefElementSVGGradientElementSVGGraphicsElementSVGHKernElementSVGImageElementSVGLengthSVGLengthListSVGLineElementSVGLinearGradientElementSVGMPathElementSVGMarkerElementSVGMaskElementSVGMatrixSVGMetadataElementSVGMissingGlyphElementSVGNumberSVGNumberListSVGPathElementSVGPathSegSVGPathSegArcAbsSVGPathSegArcRelSVGPathSegClosePathSVGPathSegCurvetoCubicAbsSVGPathSegCurvetoCubicRelSVGPathSegCurvetoCubicSmoothAbsSVGPathSegCurvetoCubicSmoothRelSVGPathSegCurvetoQuadraticAbsSVGPathSegCurvetoQuadraticRelSVGPathSegCurvetoQuadraticSmoothAbsSVGPathSegCurvetoQuadraticSmoothRelSVGPathSegLinetoAbsSVGPathSegLinetoHorizontalAbsSVGPathSegLinetoHorizontalRelSVGPathSegLinetoRelSVGPathSegLinetoVerticalAbsSVGPathSegLinetoVerticalRelSVGPathSegListSVGPathSegMovetoAbsSVGPathSegMovetoRelSVGPatternElementSVGPointSVGPointListSVGPolygonElementSVGPolylineElementSVGPreserveAspectRatioSVGRadialGradientElementSVGRectSVGRectElementSVGRenderingIntentSVGSVGElementSVGScriptElementSVGSetElementSVGStopElementSVGStringListSVGStyleElementSVGSwitchElementSVGSymbolElementSVGTRefElementSVGTSpanElementSVGTestsSVGTextContentElementSVGTextElementSVGTextPathElementSVGTextPositioningElementSVGTitleElementSVGTransformSVGTransformListSVGURIReferenceSVGUnitTypesSVGUseElementSVGVKernElementSVGViewElementSVGViewSpecSVGZoomAndPanSVGZoomEventScreenScriptProcessorNodeSecurityPolicyViolationEventShadowRootSlotableSourceBufferSourceBufferListSpeechSynthesisSpeechSynthesisEventSpeechSynthesisUtteranceSpeechSynthesisVoiceStorageStorageEventStyleMediaStyleSheetStyleSheetListSubtleCryptoTestActiveDOMObjectTestClassWithJSBuiltinConstructorTestCustomConstructorWithNoInterfaceObjectTestCustomNamedGetterTestEventTargetTestGenerateIsReachableTestIterableTestJSBuiltinConstructorTestMediaQueryListListenerTestNamedConstructorTestNodeTestOverloadedConstructorsTestOverrideBuiltinsTestTypedefsTextTextEventTextMetricsTextTrackTextTrackCueTextTrackCueListTextTrackListTimeRangesTouchTouchEventTouchListTrackEventTransitionEventTreeWalkerTypeConversionsUIEventURLUtilsUserMessageHandlerUserMessageHandlersNamespaceVTTCueVTTRegionVTTRegionListValidityStateVideoPlaybackQualityVideoTrackVideoTrackListWaveShaperNodeWebGL2RenderingContextWebGLActiveInfoWebGLBufferWebGLCompressedTextureATCWebGLCompressedTexturePVRTCWebGLCompressedTextureS3TCWebGLContextEventWebGLDebugRendererInfoWebGLDebugShadersWebGLDepthTextureWebGLDrawBuffersWebGLFramebufferWebGLLoseContextWebGLProgramWebGLQueryWebGLRenderbufferWebGLRenderingContextWebGLRenderingContextBaseWebGLSamplerWebGLShaderWebGLShaderPrecisionFormatWebGLSyncWebGLTextureWebGLTransformFeedbackWebGLUniformLocationWebGLVertexArrayObjectWebGLVertexArrayObjectOESWebKitAnimationEventWebKitCSSMatrixWebKitCSSRegionRuleWebKitNamedFlowWebKitNamespaceWebKitPlaybackTargetAvailabilityEventWebKitPointWebKitTransitionEventWebSocketWheelEventWindowEventHandlersWindowOrWorkerGlobalScopeWorkerWorkerGlobalScopeWorkerLocationWorkerNavigatorWritableStreamXMLDocumentXMLHttpRequestXMLHttpRequestEventTargetXMLHttpRequestProgressEventXMLHttpRequestUploadXMLSerializerXPathEvaluatorXPathExpressionXPathNSResolverXPathResultXSLTProcessorAnimatableAnimationEffectAnimationTimelineCSSNamespaceRuleCanvasPathClipboardEventCustomElementRegistryDOMPointDOMPointReadOnlyDOMRectDOMRectReadOnlyDeprecatedCSSOMCounterDeprecatedCSSOMPrimitiveValueDeprecatedCSSOMRGBColorDeprecatedCSSOMRectDeprecatedCSSOMValueDeprecatedCSSOMValueListDocumentOrShadowRootDocumentTimelineFetchBodyFetchHeadersFetchRequestFetchResponseGamepadGamepadButtonGamepadEventGamepadListGlobalCryptoInputEventKeyframeEffectReadableByteStreamControllerReadableStreamDefaultControllerReadableStreamDefaultReaderStaticRangeTestCEReactionsTestCEReactionsStringifierTestCallbackInterfaceTestDOMJITTestEventConstructorTestOverloadedConstructorsWithSequenceTestSerializationTextDecoderTextEncoderURLSearchParamsWebAnimationWebKitMediaKeyErrorWebKitMediaKeyMessageEventWebKitMediaKeyNeededEventWebKitMediaKeySessionWebKitMediaKeysWebKitSubtleCrypto