Skip to content

Global variables #17

@sp00n

Description

@sp00n

You have a few variables in your files that pollute the global namespace:
currentproperties, idx, key, mozFilter, msFilter, oFilter and webkitFilter all show up in the global DOM list.

Also, the cssParser.js file you're using uses A LOT of global variables for its internal logic, which seems kind of superflous. I haven't done any extensive testing (besides Firefox and Chrome), but I've simply put everything except the CSSScanner and CSSParser functions inside a self-executing anonymous function, and it seems to work for the time being (see above). There are certainly better ways though.
Maybe even some revised libraries for this, but I couldn't find the original code with a quick search for "cssparser js mozilla".

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