Skip to content

Commit e051a5c

Browse files
committed
Merge branch 'master' into feat/ext-attr/legacy-factory-function
2 parents 0176da0 + 7d45dfc commit e051a5c

File tree

3 files changed

+18
-6
lines changed

3 files changed

+18
-6
lines changed

lib/constructs/interface.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1381,7 +1381,7 @@ class Interface {
13811381
addOne(`static get ${propName}`, [], body[0]);
13821382
}
13831383
if (body[1] !== undefined) {
1384-
addOne(`static set ${propName}`, args, body[0]);
1384+
addOne(`static set ${propName}`, args, body[1]);
13851385
}
13861386
}
13871387
}

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "webidl2js",
3-
"version": "15.3.0",
3+
"version": "16.0.0",
44
"description": "Auto-generates class structures for WebIDL specifications",
55
"main": "lib/transformer.js",
66
"repository": "github:jsdom/webidl2js",

test/__snapshots__/test.js.snap

+16-4
Original file line numberDiff line numberDiff line change
@@ -2074,7 +2074,11 @@ exports.install = (globalObject, globalNames) => {
20742074
static set staticAttr(V) {
20752075
const esValue = this !== null && this !== undefined ? this : globalObject;
20762076

2077-
return Impl.implementation[\\"staticAttr\\"];
2077+
V = conversions[\\"DOMString\\"](V, {
2078+
context: \\"Failed to set the 'staticAttr' property on 'Global': The provided value\\"
2079+
});
2080+
2081+
Impl.implementation[\\"staticAttr\\"] = V;
20782082
}
20792083
}
20802084
Object.defineProperties(Global.prototype, { [Symbol.toStringTag]: { value: \\"Global\\", configurable: true } });
@@ -5691,7 +5695,9 @@ exports.install = (globalObject, globalNames) => {
56915695
static set abc(V) {
56925696
const esValue = this !== null && this !== undefined ? this : globalObject;
56935697

5694-
return Impl.implementation[\\"abc\\"];
5698+
V = conversions[\\"DOMString\\"](V, { context: \\"Failed to set the 'abc' property on 'Static': The provided value\\" });
5699+
5700+
Impl.implementation[\\"abc\\"] = V;
56955701
}
56965702
}
56975703
Object.defineProperties(Static.prototype, {
@@ -11969,7 +11975,11 @@ exports.install = (globalObject, globalNames) => {
1196911975
static set staticAttr(V) {
1197011976
const esValue = this !== null && this !== undefined ? this : globalObject;
1197111977

11972-
return Impl.implementation[\\"staticAttr\\"];
11978+
V = conversions[\\"DOMString\\"](V, {
11979+
context: \\"Failed to set the 'staticAttr' property on 'Global': The provided value\\"
11980+
});
11981+
11982+
Impl.implementation[\\"staticAttr\\"] = V;
1197311983
}
1197411984
}
1197511985
Object.defineProperties(Global.prototype, { [Symbol.toStringTag]: { value: \\"Global\\", configurable: true } });
@@ -15567,7 +15577,9 @@ exports.install = (globalObject, globalNames) => {
1556715577
static set abc(V) {
1556815578
const esValue = this !== null && this !== undefined ? this : globalObject;
1556915579

15570-
return Impl.implementation[\\"abc\\"];
15580+
V = conversions[\\"DOMString\\"](V, { context: \\"Failed to set the 'abc' property on 'Static': The provided value\\" });
15581+
15582+
Impl.implementation[\\"abc\\"] = V;
1557115583
}
1557215584
}
1557315585
Object.defineProperties(Static.prototype, {

0 commit comments

Comments
 (0)