Skip to content

Commit 0f13723

Browse files
committed
Update WebIDL2JS to v16.0
1 parent 76c55ec commit 0f13723

File tree

5 files changed

+24
-18
lines changed

5 files changed

+24
-18
lines changed

index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
const webidlWrapper = require('./webidl2js-wrapper.js');
33

44
const sharedGlobalObject = {};
5-
webidlWrapper.install(sharedGlobalObject);
5+
webidlWrapper.install(sharedGlobalObject, ['Window']);
66

77
const origCSSStyleDeclaration = sharedGlobalObject.CSSStyleDeclaration;
88

package-lock.json

+17-11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
"prettier": "~1.18.0",
5656
"request": "^2.88.0",
5757
"resolve": "~1.11.1",
58-
"webidl2js": "^15.1.0"
58+
"webidl2js": "^16.0.0"
5959
},
6060
"scripts": {
6161
"prepare": "npm run generate",

scripts/convert-idl.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ partial interface CSSStyleDeclaration {
3939

4040
for (const property of propertyNames) {
4141
const camelCasedAttribute = cssPropertyToIDLAttribute(property);
42-
genIDL.write(` [CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString _${camelCasedAttribute};
42+
genIDL.write(` [CEReactions] attribute [LegacyNullToEmptyString] CSSOMString _${camelCasedAttribute};
4343
`);
4444
}
4545

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

@@ -60,7 +60,7 @@ partial interface CSSStyleDeclaration {
6060

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

src/CSSStyleDeclaration.webidl

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ interface CSSStyleDeclaration {
99
getter CSSOMString item(unsigned long index);
1010
CSSOMString getPropertyValue(CSSOMString property);
1111
CSSOMString getPropertyPriority(CSSOMString property);
12-
[CEReactions] void setProperty(CSSOMString property, [TreatNullAs=EmptyString] CSSOMString value, optional [TreatNullAs=EmptyString] CSSOMString priority = "");
12+
[CEReactions] void setProperty(CSSOMString property, [LegacyNullToEmptyString] CSSOMString value, optional [LegacyNullToEmptyString] CSSOMString priority = "");
1313
[CEReactions] CSSOMString removeProperty(CSSOMString property);
1414
readonly attribute CSSRule? parentRule;
15-
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString cssFloat;
15+
[CEReactions] attribute [LegacyNullToEmptyString] CSSOMString cssFloat;
1616
};
1717

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

0 commit comments

Comments
 (0)