Code Monkey home page Code Monkey logo

Comments (3)

CaptainCodeman avatar CaptainCodeman commented on June 18, 2024

AFAIK custom elements can't be made void or self-closing, so I think it's better if they behaved consistently and required the closing tag.

from svelte.

thebjorn avatar thebjorn commented on June 18, 2024

@CaptainCodeman did you read the linked issue on the Web Incubator Community Group? (WICG/webcomponents#624)

There is an overwhelming support for self-closing web component tags from the community (with regular xml semantics), and an equally overwhelming reluctance to change parser semantics from the browser makers. Based on the history of parser evolution I fully understand the browser makers, however, .svelte files are not legal html and as such have opportunities for improving DX that the browser makers do not have.

Legal html would still be paste-able into .svelte files (and legal svelte have never been paste-able into .html files. This issue would not change that.

Svelte components must be imported and can be self-closing, this would only extend that to Web Components, thus making the syntax more consistent.

from svelte.

dummdidumm avatar dummdidumm commented on June 18, 2024

It's better to be consistent here. Either we could've kept it as before and allow self-closing for all elements (we changed that), or we warn on all to align with the spec. Having a weird middle ground would confuse both sides. Therefore closing.

from svelte.

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.