From 78cc9dbd80d091fa7984c0586cc21d8af03d08be Mon Sep 17 00:00:00 2001 From: Thomas Honeyman Date: Thu, 10 Dec 2020 15:05:56 -0800 Subject: [PATCH 1/2] Remove {} return in FFI --- src/Web/CSSOM/CSSStyleSheet.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Web/CSSOM/CSSStyleSheet.js b/src/Web/CSSOM/CSSStyleSheet.js index bc04cc0..0d610d3 100644 --- a/src/Web/CSSOM/CSSStyleSheet.js +++ b/src/Web/CSSOM/CSSStyleSheet.js @@ -17,7 +17,6 @@ exports.setDisabled = function(bool) { return function(sheet) { return function() { sheet.disabled = bool; - return {}; }; }; }; From 1253cf7361fc9ff9ba837791bc7b9a2b02f11262 Mon Sep 17 00:00:00 2001 From: Thomas Honeyman Date: Thu, 10 Dec 2020 15:06:21 -0800 Subject: [PATCH 2/2] Apply eslint suggestions --- src/Web/CSSOM/CSSStyleDeclaration.js | 40 +++++++++++++------------- src/Web/CSSOM/CSSStyleSheet.js | 14 ++++----- src/Web/CSSOM/ElementCSSInlineStyle.js | 4 +-- src/Web/CSSOM/StyleSheetList.js | 6 ++-- 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/src/Web/CSSOM/CSSStyleDeclaration.js b/src/Web/CSSOM/CSSStyleDeclaration.js index c43b49b..c51e14c 100644 --- a/src/Web/CSSOM/CSSStyleDeclaration.js +++ b/src/Web/CSSOM/CSSStyleDeclaration.js @@ -1,53 +1,53 @@ "use strict"; -exports.cssText = function(style) { - return function() { +exports.cssText = function (style) { + return function () { return style.cssText; }; }; -exports.setCssText = function(style) { - return function(newCSS) { - return function() { +exports.setCssText = function (style) { + return function (newCSS) { + return function () { style.cssText = newCSS; }; }; }; -exports.length = function(style) { - return function() { +exports.length = function (style) { + return function () { return style.length; }; }; -exports.getPropertyPriority = function(style) { - return function(propName) { - return function() { +exports.getPropertyPriority = function (style) { + return function (propName) { + return function () { return style.getPropertyPriority(propName); }; }; }; -exports.getPropertyValue = function(style) { - return function(propName) { - return function() { +exports.getPropertyValue = function (style) { + return function (propName) { + return function () { return style.getPropertyValue(propName); }; }; }; -exports.removeProperty = function(style) { - return function(propName) { - return function() { +exports.removeProperty = function (style) { + return function (propName) { + return function () { style.removeProperty(propName); }; }; }; -exports.setProperty = function(style) { - return function(propName) { - return function(propValue) { - return function() { +exports.setProperty = function (style) { + return function (propName) { + return function (propValue) { + return function () { style.setProperty(propName, propValue); }; }; diff --git a/src/Web/CSSOM/CSSStyleSheet.js b/src/Web/CSSOM/CSSStyleSheet.js index 0d610d3..bf3e5b7 100644 --- a/src/Web/CSSOM/CSSStyleSheet.js +++ b/src/Web/CSSOM/CSSStyleSheet.js @@ -1,7 +1,7 @@ "use strict"; -var getProp = function(name) { - return function(sheet) { +var getProp = function (name) { + return function (sheet) { return sheet[name]; }; }; @@ -13,16 +13,16 @@ exports._parentStyleSheet = getProp("parentStyleSheet"); exports._title = getProp("title"); exports._type = getProp("type"); -exports.setDisabled = function(bool) { - return function(sheet) { - return function() { +exports.setDisabled = function (bool) { + return function (sheet) { + return function () { sheet.disabled = bool; }; }; }; -exports.toggleDisabled = function(sheet) { - return function() { +exports.toggleDisabled = function (sheet) { + return function () { var bool = !sheet.disabled; sheet.disabled = bool; return bool; diff --git a/src/Web/CSSOM/ElementCSSInlineStyle.js b/src/Web/CSSOM/ElementCSSInlineStyle.js index c4f0a4d..8fb68e6 100644 --- a/src/Web/CSSOM/ElementCSSInlineStyle.js +++ b/src/Web/CSSOM/ElementCSSInlineStyle.js @@ -1,7 +1,7 @@ "use strict"; -exports.style = function(el) { - return function() { +exports.style = function (el) { + return function () { return el.style; }; }; diff --git a/src/Web/CSSOM/StyleSheetList.js b/src/Web/CSSOM/StyleSheetList.js index 67d5062..5da6581 100644 --- a/src/Web/CSSOM/StyleSheetList.js +++ b/src/Web/CSSOM/StyleSheetList.js @@ -12,9 +12,9 @@ exports.toArray = function (list) { }; }; -exports._item = function(index) { - return function(list) { - return function() { +exports._item = function (index) { + return function (list) { + return function () { return list.item(index); }; };