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

How to determine if one should load the polyfill #237

Open
richard-muvirimi opened this issue Jul 17, 2023 · 1 comment
Open

How to determine if one should load the polyfill #237

richard-muvirimi opened this issue Jul 17, 2023 · 1 comment

Comments

@richard-muvirimi
Copy link

richard-muvirimi commented Jul 17, 2023

Kindly expose a function to determine if the modal element is already present so that the CSS styles can be loaded dynamically.

I know one can check the forceRegister function but having a standard API helps reduce a lot of confusion

@replete
Copy link

replete commented Aug 8, 2024

My solution:

let dialog = document.createElement('dialog')
let polyfillNeeded = (!dialog.showModal || !dialog.close)

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