Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mobile Safari incorrectly warns "Your browser does not support WebComponents" #338

Open
simonw opened this issue Jul 10, 2024 · 2 comments

Comments

@simonw
Copy link

simonw commented Jul 10, 2024

I got this error in Mobile Safari on this page: https://www.muicss.com/docs/v1/webcomponents/buttons

IMG_9867

Mobile Safari does support WebComponents.

@simonw
Copy link
Author

simonw commented Jul 10, 2024

Here's the problem:

// check browser support
if (typeof HTMLElement === 'undefined' || !document.registerElement) {
throw new Error("MUI: Client does not support web components");
}

document.registerElement is obsolete and has been removed from some browsers. The thing to check for instead is window.customElements.

@simonw simonw changed the title Warning: Your browser does not support WebComponents Mobile Safari incorrectly warns "Your browser does not support WebComponents" Jul 10, 2024
@amorey
Copy link
Member

amorey commented Jul 10, 2024

Thanks for the heads up! Will fix asap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants