From 9878bece0532d8e1ce737f53c44e63c10f420282 Mon Sep 17 00:00:00 2001 From: Guillaume Date: Thu, 10 Jun 2021 21:33:17 +0200 Subject: [PATCH] tmp dirty fix --- lib/CSSStyleDeclaration-impl.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/CSSStyleDeclaration-impl.js b/lib/CSSStyleDeclaration-impl.js index 0e9467ce..cb155a3e 100644 --- a/lib/CSSStyleDeclaration-impl.js +++ b/lib/CSSStyleDeclaration-impl.js @@ -285,17 +285,18 @@ function createSetter(property, setter, longhands) { const shorthands = []; implementedProperties.forEach(property => { - const camelCaseName = cssPropertyToIDLAttribute(property); + const attribute = cssPropertyToIDLAttribute(property); + const filename = attribute[0].toLowerCase() + attribute.slice(1); const { definition, longhands, serialize = serializeShorthand, - } = require(`./properties/${camelCaseName}`); + } = require(`./properties/${filename}`); if (longhands) { shorthands.push([property, longhands, serialize]); } definition.set = createSetter(property, definition.set, longhands); - Object.defineProperty(CSSStyleDeclarationImpl.prototype, camelCaseName, definition); + Object.defineProperty(CSSStyleDeclarationImpl.prototype, attribute, definition); Object.defineProperty(CSSStyleDeclarationImpl.prototype, property, definition); });