[Pkg-javascript-commits] [node-cssstyle] 37/39: fixed some jslint errors
Wolfgang Borgert
debacle at moszumanska.debian.org
Sat Sep 20 19:37:34 UTC 2014
This is an automated email from the git hooks/post-receive script.
debacle pushed a commit to branch master
in repository node-cssstyle.
commit c0477270c851b2ca23de53b73c856cd207de3b18
Author: Chad Walker <chad at chad-cat-lore-eddie.com>
Date: Mon May 19 20:07:53 2014 -0500
fixed some jslint errors
---
lib/CSSStyleDeclaration.js | 44 +++++++++++++++++++++++---------------------
1 file changed, 23 insertions(+), 21 deletions(-)
diff --git a/lib/CSSStyleDeclaration.js b/lib/CSSStyleDeclaration.js
index 36f3cf0..dbe16e3 100644
--- a/lib/CSSStyleDeclaration.js
+++ b/lib/CSSStyleDeclaration.js
@@ -137,10 +137,13 @@ Object.defineProperties(CSSStyleDeclaration.prototype, {
get: function () {
var properties = [];
var i;
+ var name;
+ var value;
+ var priority;
for (i = 0; i < this._length; i++) {
- var name = this[i];
- var value = this.getPropertyValue(name);
- var priority = this.getPropertyPriority(name);
+ name = this[i];
+ value = this.getPropertyValue(name);
+ priority = this.getPropertyPriority(name);
if (priority !== '') {
priority = " !" + priority;
}
@@ -188,6 +191,23 @@ Object.defineProperties(CSSStyleDeclaration.prototype, {
}
});
+var LazyDefinition = function (property, modulePath) {
+ this.get = function () {
+ var definition = require(modulePath).definition;
+ Object.defineProperty(this, property, definition);
+ return this[property];
+ };
+
+ this.set = function (v) {
+ var definition = require(modulePath).definition;
+ Object.defineProperty(this, property, definition);
+ this[property] = v;
+ };
+
+ this.enumerable = true;
+ this.configurable = true;
+};
+
/*
*
* http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSS2Properties
@@ -195,7 +215,6 @@ Object.defineProperties(CSSStyleDeclaration.prototype, {
var property_files = fs.readdirSync(__dirname + '/properties');
property_files.forEach(function (property) {
var dashed;
- var definition;
if (property.substr(-3) === '.js') {
property = path.basename(property, '.js');
dashed = camelToDashed(property);
@@ -204,21 +223,4 @@ property_files.forEach(function (property) {
}
});
-function LazyDefinition(property, modulePath) {
- this.get = function() {
- var definition = require(modulePath).definition;
- Object.defineProperty(this, property, definition);
- return this[property];
- };
-
- this.set = function(v) {
- var definition = require(modulePath).definition;
- Object.defineProperty(this, property, definition);
- this[property] = v;
- };
-
- this.enumerable = true;
- this.configurable = true;
-}
-
exports.CSSStyleDeclaration = CSSStyleDeclaration;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-cssstyle.git
More information about the Pkg-javascript-commits
mailing list