Skip to content

Add more details to valid expression locations #453

@justinfagnani

Description

@justinfagnani

We should document how bindings in comments, <template> tags, and <style> when polyfilled work or don't work.

  • Bindings in comments don't break a template, but don't render
  • Bindings in <template> will break a template (due to them being invisible to lit-html's template prep code). Use static templates instead.
  • Bindings in <style> work in native shadow DOM, but in Shady CSS they will only render the first value and never update.
  • Bindings in <textarea> will work for initial render (TODO verify, and we might throw soon), but if the user edits the value the binding will break.
  • Bindings in open tag name position will throw in dev mode and break a template in prod mode. Bindings in close tag name position will break a template in prod mode.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions