lit / lit-element

LEGACY REPO. This repository is for maintenance of the legacy LitElement library. The LitElement base class is now part of the Lit library, which is developed in the lit monorepo.
https://lit-element.polymer-project.org
BSD 3-Clause "New" or "Revised" License
4.49k stars 319 forks source link

Update properties.md #1166

Closed danny-andrews closed 3 years ago

danny-andrews commented 3 years ago

Correct note on converting from attribute to property.

Attributes can't be null. They can only be strings.

google-cla[bot] commented 3 years ago

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

justinfagnani commented 3 years ago

Thanks for the PR!

Attributes can be null in that getAttribute() returns null if the value isn't present: https://developer.mozilla.org/en-US/docs/Web/API/Element/getAttribute#non-existing_attributes. The phrasing could just say if the attribute is present or not, though I'd rather check and change the language in the new lit.dev site.