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

import and innerHTML are inappropriate #4

Open
jabcreations opened this issue Sep 4, 2022 · 0 comments
Open

import and innerHTML are inappropriate #4

jabcreations opened this issue Sep 4, 2022 · 0 comments

Comments

@jabcreations
Copy link

Hi,

While looking for a polyfilly for backdrop-filter I came across this project. Two things:

First innerHTML is a proprietary Microsoft method and it does not work properly with the DOM. You should never use innerHTML as in example id attributes are not properly validated and in many browsers that new id won't be seen.

Secondly import has low compatibility which negates the point of creating a polyfill. This polyfill won't work in Pale Moon, Opera or Waterfox thus negating it's use. Just stick with using named functions that can be called via the DOMContentLoaded / onload event:

window.onload = function(event)
{
polyfill_backdrop();
}

I don't know what an NPM package is, I don't know why everyone convolutes things. It's a script, put it in a named function and call the function. If you care about the project and iron those issues out please let me know. Also if you're having trouble with innerHTML you can look up JAB Creations javascript docs, you'll find plenty of functions such as xml_add and CSS specific functions though I'd be happy to help out here too.

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

1 participant