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

Expose parse to CSSGroupingRule #114

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MrDOS
Copy link

@MrDOS MrDOS commented May 13, 2022

CSSGroupingRule.insertRule requires parse. Previously:

$ pwd
/path/to/CSSOM
$ node
Welcome to Node.js v18.1.0.
Type ".help" for more information.
> const CSSOM = require('./lib');
undefined
> const rule = new CSSOM.CSSGroupingRule();
undefined
> rule.insertRule('#a{}', 0);
Uncaught TypeError: CSSOM.parse is not a function
    at CSSGroupingRule.insertRule (/path/to/CSSOM/lib/CSSGroupingRule.js:41:22)

Now:

> rule.insertRule('#a{}', 0);
0

`CSSGroupingRule.insertRule` requires `parse`. Previously:

    $ pwd
    /path/to/CSSOM
    $ node
    Welcome to Node.js v18.1.0.
    Type ".help" for more information.
    > const CSSOM = require('./lib');
    undefined
    > const rule = new CSSOM.CSSGroupingRule();
    undefined
    > rule.insertRule('#a{}', 0);
    Uncaught TypeError: CSSOM.parse is not a function
        at CSSGroupingRule.insertRule (/path/to/CSSOM/lib/CSSGroupingRule.js:41:22)

Now:

    > rule.insertRule('#a{}', 0);
    0
@MrDOS
Copy link
Author

MrDOS commented May 13, 2022

D'oh, I somehow didn't see #113, which does the same thing as this.

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

Successfully merging this pull request may close these issues.

None yet

1 participant