Comparing version 1.1.0 to 1.1.1
@@ -24,3 +24,3 @@ /********************************************************************* | ||
var numberRegEx = /^[\-+]?[0-9]*\.[0-9]+$/; | ||
var lengthRegEx = /^(0|[\-+]?[0-9]*\.?[0-9]+(in|cm|em|mm|pt|pc|px|ex|rem))$/; | ||
var lengthRegEx = /^(0|[\-+]?[0-9]*\.?[0-9]+(in|cm|em|mm|pt|pc|px|ex|rem|vh|vw))$/; | ||
var percentRegEx = /^[\-+]?[0-9]*\.?[0-9]+%$/; | ||
@@ -27,0 +27,0 @@ var urlRegEx = /^url\(\s*([^\)]*)\s*\)$/; |
@@ -9,3 +9,3 @@ { | ||
], | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"homepage": "https://github.com/jsakas/CSSStyleDeclaration", | ||
@@ -55,5 +55,5 @@ "maintainers": [ | ||
"test": "node ./scripts/generate_properties.js && node ./scripts/generate_valid_properties.js && nodeunit tests", | ||
"prepublish": "node ./scripts/generate_properties.js && node ./scripts/generate_valid_properties.js" | ||
"prepare": "node ./scripts/generate_properties.js && node ./scripts/generate_valid_properties.js" | ||
}, | ||
"license": "MIT" | ||
} |
@@ -59,5 +59,5 @@ "use strict"; | ||
test.expect(8); | ||
style.cssText = 'color: blue; background-color: red; width: 78%'; | ||
test.ok(3 === style.length, 'length is not 3'); | ||
test.ok('color: blue; background-color: red; width: 78%;' === style.cssText, 'cssText is wrong'); | ||
style.cssText = 'color: blue; background-color: red; width: 78%; height: 50vh;'; | ||
test.ok(4 === style.length, 'length is not 4'); | ||
test.ok('color: blue; background-color: red; width: 78%; height: 50vh;' === style.cssText, 'cssText is wrong'); | ||
test.ok('blue' === style.getPropertyValue('color'), "getPropertyValue('color') failed"); | ||
@@ -112,3 +112,3 @@ test.ok('color' === style.item(0), 'item(0) failed'); | ||
var style = new cssstyle.CSSStyleDeclaration(); | ||
test.expect(7); | ||
test.expect(9); | ||
style.height = 6; | ||
@@ -120,2 +120,6 @@ test.ok('' === style.height, 'height does not remain unset'); | ||
test.ok('34%' === style.height, 'height is not 34%'); | ||
style.height = '100vh'; | ||
test.ok('100vh' === style.height, 'height is not 100vh'); | ||
style.height = '100vw'; | ||
test.ok('100vw' === style.height, 'height is not 100vw'); | ||
style.height = ''; | ||
@@ -122,0 +126,0 @@ test.ok(style.length === 1, 'length is not 1'); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
395853
12805