CSSOM icon indicating copy to clipboard operation
CSSOM copied to clipboard

Expose `parse` to `CSSGroupingRule`

Open MrDOS opened this issue 2 years ago • 1 comments

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 avatar May 13 '22 12:05 MrDOS

D'oh, I somehow didn't see https://github.com/NV/CSSOM/pull/113, which does the same thing as this.

MrDOS avatar May 13 '22 12:05 MrDOS