Wraps link content in a span element for animation purposes
Checks if a link's content is already wrapped in a span, and if not, wraps it.
Skips slot content to avoid interfering with web component content distribution.
This is useful for CSS animations that target the span within links.
Parameters
element: {element:HTMLElement|HTMLAnchorElement}
The element containing the link, or the link itself
Wraps link content in a span element for animation purposes
Checks if a link's content is already wrapped in a span, and if not, wraps it. Skips slot content to avoid interfering with web component content distribution. This is useful for CSS animations that target the span within links.