question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Declare as a Web Component

See original GitHub issue

Hi GoogleChromeLabs,

I am no expert in web dev or web components, but in my current project when using the dark-mode-toggle, lit-plugin is throwing the following warning message:

Unknown tag <dark-mode-toggle>.
  Check that you've imported the element, and that it's declared on the HTMLElementTagNameMap. If it can't be imported, consider adding it to the 'globalTags' plugin configuration or disabling the 'no-unknown-tag' rule.lit-plugin(no-unknown-tag-name)(2322)

Is there anything you could do to fix the above?

Kind regards, Alex

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
NotWoodscommented, Sep 11, 2020

You may need to reference the dark mode module inside the same script, by doing one of:

import 'dark-mode-toggle'
/// <reference types="dark-mode-toggle" />
0reactions
tomayaccommented, Sep 15, 2020

Thanks, @NotWoods, for the help ❤️ and thanks, @aress31, for confirming this solved your issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Web Components - MDN Web Docs - Mozilla
Create a class in which you specify your web component functionality, using the class syntax. · Register your new custom element using the ......
Read more >
Introduction - webcomponents.org
Web components are a set of web platform APIs that allow you to create new custom, reusable, encapsulated HTML tags to use in...
Read more >
Write your first web component - Opensource.com
Web components are a collection of open source technologies such as ... Attributes are declared observed attributes using a static ...
Read more >
An Introduction to Web Components - Academind
Learn how to get started with web components to build re-usable components (for all frameworks!) ... Declare the watched attributes:.
Read more >
Creating a web Component With Vanilla JavaScript - Section.io
What are web components · Custom elements: these APIs allow you to define and create custom elements to provide the desired UI. ·...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found