GithubHelp home page GithubHelp logo

Web Component or Custom Element Support about vugu HOT 4 OPEN

vugu avatar vugu commented on April 28, 2024
Web Component or Custom Element Support

from vugu.

Comments (4)

snoop244 avatar snoop244 commented on April 28, 2024

The benefit is that teams, like ours, with existing applications could start mixing in golang wasm components, particularly in areas where wasm will shine over js... without having to (re)write the whole application in wasm.

from vugu.

snoop244 avatar snoop244 commented on April 28, 2024

Apologies for the multiple posts. Here is a somewhat dated post on golang WASM web components: https://matthewphillips.info/programming/wasm-golang-ce.html

from vugu.

bradleypeabody avatar bradleypeabody commented on April 28, 2024

Thanks for the issue. I'm not too familiar with WebComponents and the ins-and-outs of their use. Other than using a custom element in your HTML and including the appropriate JS file, what else would be needed in order to make this work?

Vugu doesn't much care what HTML elements it outputs. If you put a tag in a vugu file, Vugu will end up calling document.createElement('some-custom-element') to create the DOM for it. Although just from a quick look here https://developer.mozilla.org/en-US/docs/Web/API/Document/createElement it seems like there needs to be an options object passed with an is property as the second argument. So yeah it would seem that needs something custom from Vugu.

Is there anything else that would be needed to make this work? It sounds like it could be done without too much trouble.

from vugu.

ystyle avatar ystyle commented on April 28, 2024

It now supports use web Component in vugu, but it will has some error. see this #62

from vugu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.