scala-js-dom
scala-js-dom copied to clipboard
Fix crypto `new`-based constructors?
Continuation of https://github.com/scala-js/scala-js-dom/issues/624.
I "fixed" that one in https://github.com/scala-js/scala-js-dom/pull/657 but only looked at Init types and neglected the many crypto types which turns out need the same treatment. I noticed this while reviewing https://github.com/scala-js/scala-js-dom/pull/667.
This one is harder, because it seems that many of the members are actually required and not optional, as was generally the case for the Init types. So if we made this change, when used required members would be defined as vals but the optional ones would be set imperatively, which is a bit strange but maybe okay.
Source-breaking, once again, and possibly not worth it in this case. But in general I think the type signatures for crypto stuff need to be improved, so linking to https://github.com/scala-js/scala-js-dom/issues/660.