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 318 forks source link

TypeError: Illegal invocation error is thrown when using queryAssignedNodes with text nodes #1088

Closed dmondev closed 3 years ago

dmondev commented 3 years ago

Description

queryAssignedNodes throws A "TypeError: Illegal invocation" when slotted content contains text nodes.

Live Demo

https://webcomponents.dev/edit/FXrFMojSYzYa8eJNaJzh

Steps to Reproduce

  1. Create my-element with child nodes containing text.

Expected Results

No error is throw

Actual Results

TypeError: Illegal invocation is thrown

Browsers Affected (Haven't tested in other browsers)

Versions

Uses the default/current version in https://webcomponents.dev

sorvell commented 3 years ago

Acknowledged. This is due to a typo in the code and there's obviously not a good test for this. We'll work on getting it fixed. Thanks.