Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

173
Vistas
Instantiate Svelte Component in HTML5 Custom Tag (without Shadow DOM)

I'm building a Svelte component library to be consumed using JavaScript only. At a later stage also by other Svelte applications as an additional option.

I want to avoid Svelte's custom element feature, since there are limitations with true Web Components and its Shadow DOM.

Currently the component is instantiated like this:

<div id="my-component"></div>
<script>
    document.addEventListener("DOMContentLoaded", function (event) {
        new MySvelteComponent({
            target: document.getElementById("my-component"),
            props: {
                firstProp: true,
                secondProp: "some value"
            }
        });
    });
</script>

Now I would like to provide a more elegant way by defining a HTLM5 custom tag like:

<my-component firstProp="true" secondProp="some value">

What is a good way to implement this?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda