Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarification on Property Binding (.) in Custom Elements #1402

Open
Realrubr2 opened this issue Feb 25, 2025 · 2 comments
Open

Clarification on Property Binding (.) in Custom Elements #1402

Realrubr2 opened this issue Feb 25, 2025 · 2 comments

Comments

@Realrubr2
Copy link

Hi,

I've read through the documentation but haven't been able to find a clear explanation of how to access property values using the . syntax inside a custom element.

Is this behavior explicitly documented anywhere? I only discovered it through ChatGPT, which referenced a YouTube video, but I would really like to read the official documentation on this.

Thank you!

@sorvell
Copy link
Member

sorvell commented Feb 25, 2025

this.propertyName

Custom elements are just classes that extend from HTMLElement. You can read about how Javascript classes work here.

@e111077
Copy link
Collaborator

e111077 commented Feb 26, 2025

Hello, we have the following docs here:

https://lit.dev/docs/templates/expressions/#property-expressions

Did you use the site search for this? If so, can you tell me what you searched for so I can update our site search to include those terms?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

3 participants