Skip to content

Commit

Permalink
tmp dirty fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cdoublev committed Jun 10, 2021
1 parent feebfaa commit 9878bec
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/CSSStyleDeclaration-impl.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});

Expand Down

0 comments on commit 9878bec

Please sign in to comment.