Hacker News new | past | comments | ask | show | jobs | submit login

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



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.


Thanks understood, that makes it quite simple and intuitive thinking about it.


The author of the thread is arguing against properties.


Yes, I know. I wasn't making a prescriptive comment about whether or not developers should use properties, I was just making a descriptive comment about how properties are accessed in a web component to answer the specific question politelemon asked.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: