Open dy opened 3 years ago
Some css-like variables would come handy. But what's the syntax/method?
<svg left:="{{ a * b }}">
, <svg left:calc="{{ a * b }}">
<script scoped>for await (let props of this.props) { this.props.y = props.x * 2 }</script>
<my-element left="{{ a * b }}">
(\
attributeCallback
- that's very normal to react on property change, so reuse that. :star:
<define-element>
vs<template is="define-element">
<define-element>
misses useful declaration-by-example - tagname, extension, proptypes, enforces module exports.<template is="define-element">
has clumsy implementation, uncertainty if tag is declared or reused as content, conflicts with immediate template (shadow-root="open" etc), makes uncertain scope of template parts.<element-defs>
inspired by SVG<defs>
is graceful mix, excluding drawbacks of both.export default propTypes
,export let x = 1
for parts