Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

167
Views
Stripe Elements cannot be mounted in a ShadowRoot. Please mount in the Light DOM

I have been using Stripe for my lit element project. The mounting the card element doesn't works at all. Here is my code sample that I am using

import { LitElement, html, css, property, query } from "lit-element";
import { connect } from "pwa-helpers";
import { store } from "../redux/store";
import { loadStripe } from '@stripe/stripe-js';

export class Checkout extends connect(store)(LitElement) {

async init() {
    stripe = await loadStripe(clientSecret);
    element = stripe.elements();
    card = element.create('card');
    card.mount(this.shadowRoot.querySelector('#stripe-payment-form'));
 }
render() {
return html`
    <div id="stripe-payment-form"></div>
`

}

Every time I run this I am getting the following error

Uncaught (in promise) IntegrationError: Elements cannot be mounted in a ShadowRoot. Please mount in the Light DOM.

I know we don't have DOM in Lit element, but how can we mount the element in shadowDom?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!