SVGBuilderExtensions.OnPlay

SVGBuilderExtensions.OnPlay<TBuilder> method

Sets the ‘onplay’ event attribute for handling play events, typically for media elements.

public static TBuilder OnPlay<TBuilder>(this TBuilder builder, string value)
    where TBuilder : ISVGElementBuilder, IGlobalEventAttributeSetter
ParameterDescription
TBuilderThe type of the SVG element builder.
builderThe SVG element builder.
valueThe JavaScript function or script to execute when the media starts to play.

Return Value

The builder instance for chaining.

See Also