Skip to content

Releases: jsdom/webidl2js

18.0.0

13 Feb 08:22
Compare
Choose a tag to compare

17.1.0

06 Feb 23:22
Compare
Choose a tag to compare

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

06 Oct 16:37
Compare
Choose a tag to compare
  • 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 of void. This also changes how [WebIDL2JSValueAsUnsupported] works to require =_undefined instead of =undefined since undefined 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 the new() export in the generated wrapper class files. (#239, @ExE-Boss)

16.2.0

11 Jun 15:24
Compare
Choose a tag to compare
  • 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

05 May 18:48
Compare
Choose a tag to compare
  • 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 the T. (#219, @ExE-Boss)

16.0.0

29 Apr 17:45
Compare
Choose a tag to compare

Breaking changes:

  • Made [Exposed] required, per the Web IDL specification.
  • Made the globalNames second argument to install() 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 a const variable.

15.3.0

20 Apr 14:51
Compare
Choose a tag to compare
  • Added the new() export to generated wrapper class files, for creating instances without running the constructor.
  • Fixed the backward-compatibility breakages accidentally introduced in v15.2.0.

15.2.0 (deprecated)

17 Apr 18:17
Compare
Choose a tag to compare
  • Added full support for callback interfaces. (#172, @ExE-Boss)
  • Added support for [LegacyWindowAlias], [NoInterfaceObject], and [Exposed], through the new install() 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

26 Mar 18:48
6b27842
Compare
Choose a tag to compare
  • Added some preliminary support for Web IDL callback interfaces
  • Some miscellaneous clean-ups of generated files (#179, #184, @ExE-Boss)

15.0.0

23 Mar 20:33
d176871
Compare
Choose a tag to compare
  • (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 with undefined or null. (#166, @ExE-Boss)