I made something to try out for “funtional webcomponents” with vanillaJs. I’m working towards a UI framework for my personal projects. It’s far from finished but i thought it might be an interesting concept to share.

    • Solemarc@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      17 days ago

      MDN says you’re right because innerHTML is un-escaped and you’re probably trying to use textContent. Didn’t know about this one, thanks.

      • xoronOP
        link
        fedilink
        arrow-up
        1
        ·
        14 days ago

        Interesting. I’ll investigate this further. Thanks for pointing it out.

  • shortrounddev@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    18 days ago

    That’s really cool. I always thought web components needed something more to be really useful. I work with vanilla web components at work all the time and they’re not really that fun to work with

    • xoronOP
      link
      fedilink
      arrow-up
      1
      ·
      18 days ago

      thanks! ikr. i had the same exp which im sure imspired this approach.

      the functional approach makes it easier for readability and debugging.