top | item 40153843

(no title)

sir_pepe | 1 year ago

When you want to pass an object to a web component without going through JSON or some other stringification procedure.

discuss

order

politelemon|1 year ago

How do you read it in the web component afterwards? Passing it via property sounds quite useful.

throwitaway1123|1 year ago

Web components are implemented using custom elements which are just plain JS classes that extend the HTMLElement class, so you would access the property the same way you would access a property in a normal JS class.