Skip to content

Hotjar support available in Lit 2.x? #2265

Answered by graynorton
jeffchew asked this question in Q&A
Discussion options

You must be logged in to vote

The long-term solution is for Hotjar to implement support for constructable stylesheets.

Meanwhile, you can force Lit not to use constructable stylesheets by including a script tag like this in the page before loading Lit:

<script>delete Document.prototype['adoptedStyleSheets'];</script>

It's kind of gross, but it means we don't need to add configuration complexity to the Lit API and it does exactly what you need to do to make Hotjar work.

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@web-padawan
Comment options

@abdonrd
Comment options

@jeffchew
Comment options

@graynorton
Comment options

@web-padawan
Comment options

Answer selected by jeffchew
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants