You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using custom elements to extend existing html templates. Common case is to add some new tags, like <my-video>, <my-menu> etc.
Unfortunately those tags does not play good with SEO.
In custom elements specification mentioned that extend of new tag registration we can extend existing one.
Describe the proposed solution
add additional property to customElement configuration. Like:
<svelte:optionscustomElement={{tag: 'my-video',
extends: 'video',
baseClass: HTMLVideoElement,
props: {
name: { reflect: true, type: 'String', attribute: 'src' }
}
}}><script>exportletsrc;// here we will get src tag from html</script><video{src}/> // and render own video tag inside custom component.
Where in element we specify which tag we want to extend.
Then we can use the resulting component as <video as="my-video" src="https://video.mp4">
Describe the problem
I'm using custom elements to extend existing html templates. Common case is to add some new tags, like
<my-video>
,<my-menu>
etc.Unfortunately those tags does not play good with SEO.
In custom elements specification mentioned that extend of new tag registration we can extend existing one.
Describe the proposed solution
add additional property to customElement configuration. Like:
Where in
element
we specify which tag we want to extend.Then we can use the resulting component as
<video as="my-video" src="https://video.mp4">
Alternatives considered
didn't work,
because with tags like video we must create Video as
Which is currently not possible in svelte.
Importance
would make my life easier
The text was updated successfully, but these errors were encountered: