Skip to content

Property with reflect: false results in halting error #353

Description

@klebba

Repro case:

import XElement from 'https://deno.land/x/element/x-element.js';

class ReflectFalseElement extends XElement {

  static get properties() {
    return {
      radius: {
        type: Number,
        reflect: false,
      },
    };
  }

  static template(html) {
    return () => html`
      <div>Silly hats only.</div>
    `;
  }
}

customElements.define('reflect-false', ReflectFalseElement);
<!doctype html>
<html>
  <head>
    <meta charset="UTF-8">
    <meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' https://deno.land">
    <title>reflect-false</title>
    <script type="module" blocking="render" src="./reflect-false.js"></script>
  </head>
  <body>
    <reflect-false radius="7"></reflect-false>
  </body>
</html>
Image

While there is no reason to include reflect: false in your property definition, the behavior is surprising.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions