Skip to content

Commit

Permalink
Update WebIDL2JS to v16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ExE-Boss committed May 3, 2020
1 parent 76c55ec commit 0f13723
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 18 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
const webidlWrapper = require('./webidl2js-wrapper.js');

const sharedGlobalObject = {};
webidlWrapper.install(sharedGlobalObject);
webidlWrapper.install(sharedGlobalObject, ['Window']);

const origCSSStyleDeclaration = sharedGlobalObject.CSSStyleDeclaration;

Expand Down
28 changes: 17 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"prettier": "~1.18.0",
"request": "^2.88.0",
"resolve": "~1.11.1",
"webidl2js": "^15.1.0"
"webidl2js": "^16.0.0"
},
"scripts": {
"prepare": "npm run generate",
Expand Down
6 changes: 3 additions & 3 deletions scripts/convert-idl.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ partial interface CSSStyleDeclaration {

for (const property of propertyNames) {
const camelCasedAttribute = cssPropertyToIDLAttribute(property);
genIDL.write(` [CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString _${camelCasedAttribute};
genIDL.write(` [CEReactions] attribute [LegacyNullToEmptyString] CSSOMString _${camelCasedAttribute};
`);
}

Expand All @@ -50,7 +50,7 @@ partial interface CSSStyleDeclaration {
for (const property of propertyNames) {
if (!property.startsWith('-webkit-')) continue;
const webkitCasedAttribute = cssPropertyToIDLAttribute(property, /* lowercaseFirst = */ true);
genIDL.write(` [CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString _${webkitCasedAttribute};
genIDL.write(` [CEReactions] attribute [LegacyNullToEmptyString] CSSOMString _${webkitCasedAttribute};
`);
}

Expand All @@ -60,7 +60,7 @@ partial interface CSSStyleDeclaration {

for (const property of propertyNames) {
if (!property.includes('-')) continue;
genIDL.write(` [CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString ${property};
genIDL.write(` [CEReactions] attribute [LegacyNullToEmptyString] CSSOMString ${property};
`);
}

Expand Down
4 changes: 2 additions & 2 deletions src/CSSStyleDeclaration.webidl
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ interface CSSStyleDeclaration {
getter CSSOMString item(unsigned long index);
CSSOMString getPropertyValue(CSSOMString property);
CSSOMString getPropertyPriority(CSSOMString property);
[CEReactions] void setProperty(CSSOMString property, [TreatNullAs=EmptyString] CSSOMString value, optional [TreatNullAs=EmptyString] CSSOMString priority = "");
[CEReactions] void setProperty(CSSOMString property, [LegacyNullToEmptyString] CSSOMString value, optional [LegacyNullToEmptyString] CSSOMString priority = "");
[CEReactions] CSSOMString removeProperty(CSSOMString property);
readonly attribute CSSRule? parentRule;
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString cssFloat;
[CEReactions] attribute [LegacyNullToEmptyString] CSSOMString cssFloat;
};

// Additional partial interfaces are generated by `scripts/convert-idl.js`.

0 comments on commit 0f13723

Please sign in to comment.