4 Matching Annotations
- Aug 2022
- Mar 2021
-
www.jackfranklin.co.uk www.jackfranklin.co.uk
-
My preference here is biased by the fact that I spend everyday at work building web components, so Svelte's approach feels very familiar to slots in web components.
first sighting: That <template>/<slot> is part of HTML standard and the reason Svelte uses similar/same syntax is probably because it was trying to make it match / based on that syntax (as they did with other areas of the syntax, some of it even JS/JSX-like, but more leaning towards HTML-like) so that it's familiar and consistent across platforms.
-
-
developer.mozilla.org developer.mozilla.org
-
<template> and <slot>
-
This element and its contents are not rendered in the DOM, but it can still be referenced using JavaScript.
-