• fiah@discuss.tchncs.de
    link
    fedilink
    arrow-up
    22
    ·
    10 months ago

    Can you write a website in other languages, like c# or python?

    sure, as long as it compiles to javascript

    • Bye@lemmy.world
      link
      fedilink
      arrow-up
      8
      arrow-down
      1
      ·
      10 months ago

      But the browser can’t handle other languages? That seems a bit silly

      • Pankkake@lemmy.world
        link
        fedilink
        arrow-up
        17
        ·
        10 months ago

        There’s a push towards WebAssembly. Officially it’s not supported yet, but most browsers can handle it. I don’t know how mature the project is though.

        But yeah, essentially everything on the web is JS.

      • Ephera@lemmy.ml
        link
        fedilink
        arrow-up
        3
        ·
        10 months ago

        There’s actually in theory all the pieces in place to use a different scripting language, because in the early days, there really were multiple. But yeah, the massive DOM API is only really standardized+implemented+documented for JS, so you don’t get around it in the end.

        As the others said, though, WebAssembly is starting to become a thing and the JS boilerplate for calling the DOM API can be generated for you.