@acemir/cssom 0.9.9 → 0.9.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/CSSOM.js CHANGED
@@ -63,7 +63,7 @@ CSSOM.CSSStyleDeclaration.prototype = {
63
63
  {
64
64
  // NOTE: Check viability to add a validation for css values or use a dependency like csstree-validator
65
65
  if (basicStylePropertyValueValidationRegExp.test(value)) {
66
- parseErrorHandler && parseErrorHandler('Invalid CSSStyleDeclaration property value');
66
+ parseErrorHandler && parseErrorHandler('Invalid CSSStyleDeclaration property (name = "' + name + '", value = "' + value + '")');
67
67
  } else if (this[name]) {
68
68
  // Property already exist. Overwrite it.
69
69
  var index = Array.prototype.indexOf.call(this, name);
@@ -2596,7 +2596,7 @@ CSSOM.parse = function parse(token, errorHandler) {
2596
2596
  if (styleRule === nestedSelectorRule) {
2597
2597
  nestedSelectorRule = null;
2598
2598
  }
2599
- parseError('Invalid CSSStyleRule.selectorText');
2599
+ parseError('Invalid CSSStyleRule (selectorText = "' + styleRule.selectorText + '")');
2600
2600
  } else {
2601
2601
  currentScope.cssRules.push(styleRule);
2602
2602
  }
@@ -64,7 +64,7 @@ CSSOM.CSSStyleDeclaration.prototype = {
64
64
  {
65
65
  // NOTE: Check viability to add a validation for css values or use a dependency like csstree-validator
66
66
  if (basicStylePropertyValueValidationRegExp.test(value)) {
67
- parseErrorHandler && parseErrorHandler('Invalid CSSStyleDeclaration property value');
67
+ parseErrorHandler && parseErrorHandler('Invalid CSSStyleDeclaration property (name = "' + name + '", value = "' + value + '")');
68
68
  } else if (this[name]) {
69
69
  // Property already exist. Overwrite it.
70
70
  var index = Array.prototype.indexOf.call(this, name);
package/lib/parse.js CHANGED
@@ -1015,7 +1015,7 @@ CSSOM.parse = function parse(token, errorHandler) {
1015
1015
  if (styleRule === nestedSelectorRule) {
1016
1016
  nestedSelectorRule = null;
1017
1017
  }
1018
- parseError('Invalid CSSStyleRule.selectorText');
1018
+ parseError('Invalid CSSStyleRule (selectorText = "' + styleRule.selectorText + '")');
1019
1019
  } else {
1020
1020
  currentScope.cssRules.push(styleRule);
1021
1021
  }
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "parser",
8
8
  "styleSheet"
9
9
  ],
10
- "version": "0.9.9",
10
+ "version": "0.9.10",
11
11
  "author": "Nikita Vasilyev <me@elv1s.ru>",
12
12
  "contributors": [
13
13
  "Acemir Sousa Mendes <acemirsm@gmail.com>"