Skip to content

Commit

Permalink
BREAKING CHANGE: drop creator support (jsdom#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
saschanaz authored Nov 2, 2017
1 parent 4f1aab4 commit 0ecc486
Show file tree
Hide file tree
Showing 33 changed files with 36 additions and 103 deletions.
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,6 @@ An operation looks like this:
"type": "operation",
"getter": false,
"setter": false,
"creator": false,
"deleter": false,
"static": false,
"stringifier": false,
Expand Down Expand Up @@ -392,7 +391,6 @@ The fields are as follows:
* `type`: Always "operation".
* `getter`: True if a getter operation.
* `setter`: True if a setter operation.
* `creator`: True if a creator operation.
* `deleter`: True if a deleter operation.
* `static`: True if a static operation.
* `stringifier`: True if a stringifier operation.
Expand Down Expand Up @@ -471,7 +469,6 @@ Iterator members look like this
"type": "iterator",
"getter": false,
"setter": false,
"creator": false,
"deleter": false,
"static": false,
"stringifier": false,
Expand Down
5 changes: 1 addition & 4 deletions lib/webidl2.js
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,6 @@
type: "operation",
getter: false,
setter: false,
creator: false,
deleter: false,
"static": false,
stringifier: false
Expand All @@ -582,11 +581,10 @@
all_ws();
if (consume(ID, "getter")) ret.getter = true;
else if (consume(ID, "setter")) ret.setter = true;
else if (consume(ID, "creator")) ret.creator = true;
else if (consume(ID, "deleter")) ret.deleter = true;
else break;
}
if (ret.getter || ret.setter || ret.creator || ret.deleter) {
if (ret.getter || ret.setter || ret.deleter) {
all_ws();
ret.idlType = return_type();
operation_rest(ret, store);
Expand Down Expand Up @@ -800,7 +798,6 @@
type: "operation",
getter: false,
setter: false,
creator: false,
deleter: false,
"static": false,
stringifier: false
Expand Down
4 changes: 4 additions & 0 deletions test/invalid/idl/setter-creator.widl
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
interface OrderedMap {
setter creator void set(DOMString name, any value);
};
4 changes: 4 additions & 0 deletions test/invalid/json/setter-creator.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"message": "Invalid operation",
"line": 3
}
4 changes: 2 additions & 2 deletions test/syntax/idl/indexed-properties.widl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ interface OrderedMap {
deleter void removeByIndex(unsigned long index);

getter any get(DOMString name);
setter creator void set(DOMString name, any value);
setter void set(DOMString name, any value);
deleter void remove(DOMString name);
};
};
5 changes: 1 addition & 4 deletions test/syntax/json/allowany.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"type": "operation",
"getter": false,
"setter": false,
"creator": false,
"deleter": false,
"static": false,
"stringifier": false,
Expand All @@ -27,7 +26,6 @@
"type": "operation",
"getter": false,
"setter": false,
"creator": false,
"deleter": false,
"static": false,
"stringifier": false,
Expand Down Expand Up @@ -60,7 +58,6 @@
"type": "operation",
"getter": false,
"setter": false,
"creator": false,
"deleter": false,
"static": false,
"stringifier": false,
Expand Down Expand Up @@ -99,4 +96,4 @@
"inheritance": null,
"extAttrs": []
}
]
]
3 changes: 1 addition & 2 deletions test/syntax/json/callback.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
"type": "operation",
"getter": false,
"setter": false,
"creator": false,
"deleter": false,
"static": false,
"stringifier": false,
Expand Down Expand Up @@ -108,4 +107,4 @@
],
"extAttrs": []
}
]
]
3 changes: 1 addition & 2 deletions test/syntax/json/enum.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
"type": "operation",
"getter": false,
"setter": false,
"creator": false,
"deleter": false,
"static": false,
"stringifier": false,
Expand Down Expand Up @@ -106,4 +105,4 @@
],
"extAttrs": []
}
]
]
8 changes: 1 addition & 7 deletions test/syntax/json/equivalent-decl.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
"type": "operation",
"getter": true,
"setter": false,
"creator": false,
"deleter": false,
"static": false,
"stringifier": false,
Expand Down Expand Up @@ -57,7 +56,6 @@
"type": "operation",
"getter": false,
"setter": true,
"creator": false,
"deleter": false,
"static": false,
"stringifier": false,
Expand Down Expand Up @@ -128,7 +126,6 @@
"type": "operation",
"getter": false,
"setter": false,
"creator": false,
"deleter": false,
"static": false,
"stringifier": false,
Expand Down Expand Up @@ -161,7 +158,6 @@
"type": "operation",
"getter": false,
"setter": false,
"creator": false,
"deleter": false,
"static": false,
"stringifier": false,
Expand Down Expand Up @@ -207,7 +203,6 @@
"type": "operation",
"getter": true,
"setter": false,
"creator": false,
"deleter": false,
"static": false,
"stringifier": false,
Expand Down Expand Up @@ -240,7 +235,6 @@
"type": "operation",
"getter": false,
"setter": true,
"creator": false,
"deleter": false,
"static": false,
"stringifier": false,
Expand Down Expand Up @@ -286,4 +280,4 @@
"inheritance": null,
"extAttrs": []
}
]
]
6 changes: 1 addition & 5 deletions test/syntax/json/generic.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"type": "operation",
"getter": false,
"setter": false,
"creator": false,
"deleter": false,
"static": false,
"stringifier": false,
Expand Down Expand Up @@ -76,7 +75,6 @@
"type": "operation",
"getter": false,
"setter": false,
"creator": false,
"deleter": false,
"static": false,
"stringifier": false,
Expand All @@ -101,7 +99,6 @@
"type": "operation",
"getter": false,
"setter": false,
"creator": false,
"deleter": false,
"static": false,
"stringifier": false,
Expand Down Expand Up @@ -135,7 +132,6 @@
"type": "operation",
"getter": false,
"setter": false,
"creator": false,
"deleter": false,
"static": false,
"stringifier": false,
Expand All @@ -160,4 +156,4 @@
"inheritance": "Event",
"extAttrs": []
}
]
]
4 changes: 1 addition & 3 deletions test/syntax/json/getter-setter.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
"type": "operation",
"getter": true,
"setter": false,
"creator": false,
"deleter": false,
"static": false,
"stringifier": false,
Expand Down Expand Up @@ -57,7 +56,6 @@
"type": "operation",
"getter": false,
"setter": true,
"creator": false,
"deleter": false,
"static": false,
"stringifier": false,
Expand Down Expand Up @@ -103,4 +101,4 @@
"inheritance": null,
"extAttrs": []
}
]
]
3 changes: 0 additions & 3 deletions test/syntax/json/identifier-qualified-names.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"type": "operation",
"getter": false,
"setter": false,
"creator": false,
"deleter": false,
"static": false,
"stringifier": false,
Expand Down Expand Up @@ -53,7 +52,6 @@
"type": "operation",
"getter": true,
"setter": false,
"creator": false,
"deleter": false,
"static": false,
"stringifier": false,
Expand Down Expand Up @@ -136,7 +134,6 @@
"type": "operation",
"getter": false,
"setter": false,
"creator": false,
"deleter": false,
"static": false,
"stringifier": false,
Expand Down
3 changes: 1 addition & 2 deletions test/syntax/json/implements.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
"type": "operation",
"getter": false,
"setter": false,
"creator": false,
"deleter": false,
"static": false,
"stringifier": false,
Expand Down Expand Up @@ -98,4 +97,4 @@
"implements": "EventTarget",
"extAttrs": []
}
]
]
8 changes: 1 addition & 7 deletions test/syntax/json/indexed-properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
"type": "operation",
"getter": true,
"setter": false,
"creator": false,
"deleter": false,
"static": false,
"stringifier": false,
Expand Down Expand Up @@ -57,7 +56,6 @@
"type": "operation",
"getter": false,
"setter": true,
"creator": false,
"deleter": false,
"static": false,
"stringifier": false,
Expand Down Expand Up @@ -103,7 +101,6 @@
"type": "operation",
"getter": false,
"setter": false,
"creator": false,
"deleter": true,
"static": false,
"stringifier": false,
Expand Down Expand Up @@ -136,7 +133,6 @@
"type": "operation",
"getter": true,
"setter": false,
"creator": false,
"deleter": false,
"static": false,
"stringifier": false,
Expand Down Expand Up @@ -169,7 +165,6 @@
"type": "operation",
"getter": false,
"setter": true,
"creator": true,
"deleter": false,
"static": false,
"stringifier": false,
Expand Down Expand Up @@ -215,7 +210,6 @@
"type": "operation",
"getter": false,
"setter": false,
"creator": false,
"deleter": true,
"static": false,
"stringifier": false,
Expand Down Expand Up @@ -248,4 +242,4 @@
"inheritance": null,
"extAttrs": []
}
]
]
8 changes: 1 addition & 7 deletions test/syntax/json/iterator.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"type": "operation",
"getter": false,
"setter": false,
"creator": false,
"deleter": false,
"static": false,
"stringifier": false,
Expand Down Expand Up @@ -57,7 +56,6 @@
"type": "iterator",
"getter": false,
"setter": false,
"creator": false,
"deleter": false,
"static": false,
"stringifier": false,
Expand Down Expand Up @@ -108,7 +106,6 @@
"type": "operation",
"getter": false,
"setter": false,
"creator": false,
"deleter": false,
"static": false,
"stringifier": false,
Expand Down Expand Up @@ -157,7 +154,6 @@
"type": "iterator",
"getter": false,
"setter": false,
"creator": false,
"deleter": false,
"static": false,
"stringifier": false,
Expand Down Expand Up @@ -234,7 +230,6 @@
"type": "iterator",
"getter": false,
"setter": false,
"creator": false,
"deleter": false,
"static": false,
"stringifier": false,
Expand All @@ -261,7 +256,6 @@
"type": "iterator",
"getter": false,
"setter": false,
"creator": false,
"deleter": false,
"static": false,
"stringifier": false,
Expand All @@ -279,4 +273,4 @@
"inheritance": null,
"extAttrs": []
}
]
]
Loading

0 comments on commit 0ecc486

Please sign in to comment.