Skip to content

import and innerHTML are inappropriate #4

@jabcreations

Description

@jabcreations

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions