Releases: jsdom/webidl2js
Releases · jsdom/webidl2js
18.0.0
- Now requires Node.js v18 or higher.
- Fixed async iterator
return()
method behavior, per whatwg/webidl@400ce04. (#269, @MattiasBuelens)
17.1.0
Allowed named/indexed getters, setters, and deleters to appear on derived interfaces, where if present they shadow the parent interface's instance of that construct. This is not allowed per the Web IDL standard, but the Web IDL standard has a known bug in this regard: whatwg/webidl#833. (#258, @UndefinedBehaviour)
17.0.0
- Now requires Node.js v12 or higher.
- Changed sync iterators, async iterators, exceptions, and promises to be created in the relevant realm of the platform object, instead of in the outer Node.js realm. This is still not completely correct in some cases (e.g. errors should generally be created in the current realm instead of the relevant realm), but is a significant improvement. (#234, #241, #247, @ExE-Boss, @ninevra)
- Changed the
convert()
export in the generated wrapper class files to require a first argument that is the global object into which conversions are happening. (#251) - Updated our Web IDL parser to now require using
undefined
instead ofvoid
. This also changes how[WebIDL2JSValueAsUnsupported]
works to require=_undefined
instead of=undefined
sinceundefined
is now a keyword. - Changed
[LegacyNoInterfaceObject]
interfaces to now require[Exposed]
, per the spec. (#230, @ExE-Boss) - Changed unforgeable getters/setters to be shared between instances instead of per-instance, per the spec. (#226, @ExE-Boss)
- Added a
newTarget
parameter to thenew()
export in the generated wrapper class files. (#239, @ExE-Boss)
16.2.0
- Added support for async iterables. (#224)
- Added
[WebIDL2JSCallWithGlobal]
to allow implementing static operations that depend on the global object. (#216, @ExE-Boss) - Improved the error messages thrown by the generated code when calling a method or accessor on a non-instance. (#222, @ExE-Boss)
- The code generator now throws an error if an argument is defaulted using
= {}
in the IDL file, but the argument's type does not exist as a dictionary. (#225) - Tweaked the
[[Set]]
operation generated for legacy platform objects to follow the latest Web IDL spec. (#218, @ExE-Boss)
16.1.0
- Added support for callback function types. (#194, @ExE-Boss)
- Fixed the generated code for static attribute setters. Previously it would call the implementation class getter, ignoring the given value. (#211, @ExE-Boss)
- Fixed the generated code for
Promise<T>
type conversions. Previously it would convert rejected promises to fulfilled ones, and would do type conversions for theT
. (#219, @ExE-Boss)
16.0.0
Breaking changes:
- Made
[Exposed]
required, per the Web IDL specification. - Made the
globalNames
second argument toinstall()
required, instead of having it default to["Window"]
. - Aligned with the Web IDL specification's legacy extended attribute renames:
[LenientThis]
→[LegacyLenientThis]
;[NoInterfaceObject]
→[LegacyNoInterfaceObject]
;[TreatNullAs=EmptyString]
→[LegacyNullToEmptyString]
;[OverrideBuiltins]
→[LegacyOverrideBuiltins]
; and[Unforgeable]
→[LegacyUnforgeable]
. - Removed
[LegacyArrayClass]
support, as it was removed from the Web IDL specification.
Additions:
Fixes:
- Fixed promise-typed operations and attributes to always return promises, including for thisArg or argument conversion errors.
- Fixed conversion of non-string values to enumeration types. Now
{ toString() { return "foo" } }
will be properly treated the same as"foo"
in such cases. - Fixed
[LegacyLenientThis]
, which previously generated code which would not actually allow invalid thisArg values. (#210, @ExE-Boss) - Fixed
new()
to work for legacy platform objects; previously the generated code would try to reassign aconst
variable.
15.3.0
15.2.0 (deprecated)
- Added full support for callback interfaces. (#172, @ExE-Boss)
- Added support for
[LegacyWindowAlias]
,[NoInterfaceObject]
, and[Exposed]
, through the newinstall()
export of the generated wrapper files. (#187, #192, @ExE-Boss)
This release is deprecated because it accidentally introduced backward-compatibility breakages. In particular, it introduced a new required second argument to install()
, and make [Exposed]
required on all interfaces. Use v15.3.0 instead.
15.1.0
15.0.0
- (breaking) Removed built-in support for reflection. The functionality has now moved to host-side through a processor.
- Removed unused code related to old-style mixins. (#171, @ExE-Boss)
- Made the default
this
value the global proxy object when a function is called withundefined
ornull
. (#166, @ExE-Boss)