We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 93ae1a8 commit 8750bc4Copy full SHA for 8750bc4
lib/patch/jsdom.js
@@ -1,3 +1,15 @@
1
+//
2
+// We need to load cssstyle's parsers.js, but its location differs
3
+// between node 4 and node 5, so check which one we have.
4
5
+
6
+var fs = require('fs');
7
8
+var PARSERS = 'jsdom/node_modules/cssstyle/lib/parsers.js'; // node 4 hierarchy
9
+try {fs.accessSync(PARSERS, fs.F_OK)} catch (e) {
10
+ PARSERS = 'cssstyle/lib/parsers.js'; // node 5 heirarchy
11
+}
12
13
//
14
// Patch for CSSStyleDeclaration padding property so that it sets/clears
15
// the Top, Right, Bottom, and Left properties (and also validates the
0 commit comments