Releases: scala-js/scala-js-dom
v2.8.1
What's Changed
- Add support for Web NFC API by @FabioPinheiro in #806
- Add
hasPointerCapture/releasePointerCapture/setPointerCapturetoElementby @updraft0 in #822 - fix:
NDEFReadingEventInit.serialNumberreturns a string by @zetashift in #825 - Feature/complete text metrics by @buntec in #827
- Fix URLSearchParams constructor parameters by @steinybot in #835
- Generic error event for EventSource by @cornerman in #832
- Added Canvas 2D filter property by @daniel-ciocirlan in #840
- Add composition related handlers and field by @nineclue in #839
- Added missing constructors to ImageData facade. by @dragonfly-ai in #829
- URL constructor for Worker by @JPonte in #857
- Proposal for MathML base class by @Quafadas in #858
- Tidy Mathml element by @Quafadas in #869
- Make dom.URL.searchParams readonly (val) by @raquo in #871
New Contributors
- @updraft0 made their first contribution in #822
- @steinybot made their first contribution in #835
- @daniel-ciocirlan made their first contribution in #840
- @nineclue made their first contribution in #839
- @dragonfly-ai made their first contribution in #829
- @JPonte made their first contribution in #857
- @Quafadas made their first contribution in #858
Full Changelog: v2.8.0...v2.8.1
v2.8.0
scala-js-dom v2.8.0 is the ninth release in the 2.x series. It is binary-compatible with previous 2.x releases, although there are minor source-breaking changes, and is published for Scala 2.11, 2.12, 2.13, and 3.1+ with Scala.js 1.7+.
If you are upgrading from scala-js-dom 1.x, please find the migration guide in #627. CrossVersion.for3Use2_13 from your build.
What's Changed
- Add
BroadcastChannelby @armanbilge in #817 PerformanceAPI improvements by @cquiroz in #709- Fix type of
ImageData#databy @armanbilge in #818
New Contributors
Full Changelog: v2.7.0...v2.8.0
v2.7.0
scala-js-dom v2.7.0 is the eighth release in the 2.x series. It is binary-compatible with previous 2.x releases, although there are minor source-breaking changes, and is published for Scala 2.11, 2.12, 2.13, and 3.1+ with Scala.js 1.7+.
If you are upgrading from scala-js-dom 1.x, please find the migration guide in #627. CrossVersion.for3Use2_13 from your build.
Thank you to the many new contributors to this release, we appreciate your efforts!
What's Changed
- Fix doc in
HTMLAnchorElementby @faveoled in #783 - Add
HTMLAnchorElement#downloadby @faveoled in #784 - add
DateTimeFormatOptions#fractionalSecondDigitsby @mraulim in #787 - Allow
MediaSourceto be passed in toURL.createObjectURLby @yilinwei in #794 - Add
optionsparameter toDocument#createElementby @alfonso-landin in #788 - Mention preference for overloads in contrib doc by @armanbilge in #795
- Update dom/form data by @G-yhlee in #800
- Add Compression APIs by @armanbilge in #796
- Add
XMLDocumentby @armanbilge in #804 - Add facade for Intersection Observer API by @lindholc in #805
- Add Navigator's ProtocolHandler methods by @FabioPinheiro in #808
New Contributors
- @mraulim made their first contribution in #787
- @yilinwei made their first contribution in #794
- @alfonso-landin made their first contribution in #788
- @G-yhlee made their first contribution in #800
- @lindholc made their first contribution in #805
Full Changelog: v2.6.0...v2.7.0
v2.6.0
scala-js-dom v2.6.0 is the seventh release in the 2.x series. It is binary-compatible with previous 2.x releases, although there are minor source-breaking changes, and is published for Scala 2.11, 2.12, 2.13, and 3.1+ with Scala.js 1.7+.
If you are upgrading from scala-js-dom 1.x, please find the migration guide in #627. CrossVersion.for3Use2_13 from your build.
This release fixes a regression introduced in v2.5.0. We apologize for the inconvenience.
What's Changed
- Fix
WebSocket#onerror... again ... by @armanbilge in #777
Full Changelog: v2.5.0...v2.6.0
v2.5.0
scala-js-dom v2.5.0 is the sixth release in the 2.x series. It is binary-compatible with previous 2.x releases, although there are minor source-breaking changes, and is published for Scala 2.11, 2.12, 2.13, and 3.1+ with Scala.js 1.7+.
If you are upgrading from scala-js-dom 1.x, please find the migration guide in #627. CrossVersion.for3Use2_13 from your build.
What's Changed
Blob#slicedoc fix by @faveoled in #768- add Path2D and related methods by @buntec in #769
- Fix
WebSocket#onerrorby @armanbilge in #773 - Remove attributes members from Node class by @zetashift in #775
- Add
HTMLElement.focus(options)by @buntec in #776
New Contributors
Full Changelog: v2.4.0...v2.5.0
v2.4.0
scala-js-dom v2.4.0 is the fifth release in the 2.x series. It is binary-compatible with previous 2.x releases, although there are minor source-breaking changes, and is published for Scala 2.11, 2.12, 2.13, and 3.1+ with Scala.js 1.7+.
If you are upgrading from scala-js-dom 1.x, please find the migration guide in #627.
In other news: we are happy to welcome @zetashift to the maintainer team!
User-facing PRs
- Updates
MediaQueryListto extendEventTargetby @mabasic in #724 - Add
KeyboardEvent#codeby @fndejan in #727 - Change
Storage#lengthto adefinstead ofvarby @zetashift in #737 SubtleCrypto#deriveBitsshould return aPromise[ArrayBuffer]by @zetashift in #740- Fixup
Clipboardto use addedClipboardItemby @zetashift in #736 - Add
Event.composedby @armanbilge in #751 - Add
Element#closestby @DanielMoss in #752 - Add alias to
HTMLDialogElementin html object. by @Lasering in #753 - Add
Imagefacade and additional facades forHTMLImageElement#621 by @zetashift in #725 - Fixup
Location#originandLocation#reloadby @zetashift in #761 - Add Web Lock APIs by @armanbilge in #762
- Add
Audio, fixImageby @armanbilge in #765 - Refresh DataTransfer API by @zetashift in #763
New Contributors
- @mabasic made their first contribution in #724
- @fndejan made their first contribution in #727
- @DanielMoss made their first contribution in #752
Thank you wonderful contributors, new and returning!
Full Changelog: v2.3.0...v2.4.0
v2.3.0
scala-js-dom v2.3.0 is the fourth release in the 2.x series. It is binary-compatible with previous 2.x releases, although there are minor source-breaking changes, and is published for Scala 2.11, 2.12, 2.13, and 3.1+ with Scala.js 1.7+.
If you are upgrading from scala-js-dom 1.x, please find the migration guide in #627. CrossVersion.for3Use2_13 from your build.
User-facing PRs
- Add
ServiceWorkerRegistrationOptionsby @armanbilge in #704 - Add
EventSourceInitby @armanbilge in #703 - IDB cursor result types were incorrectly abstract by @japgolly in #705
- Add
InputEvent,StaticRange,AbstractRangeby @armanbilge in #695 - Update Index.scalatex to use version 2.2.0 by @felher in #710
- Create
HTMLDialogElementby @Lasering in #708 - Add
URLSearchParamstoBodyInitby @zetashift in #722 - Add
History#scrollRestorationby @zetashift in #718 - Add
RequestInit#duplexby @zetashift in #719 - Add
Element#replaceWithby @zetashift in #720 - Fixup
BlobandFileAPIs by @zetashift in #721 - Update to Scala.js 1.7.1, Scala 2.12.15, 3.1.3 by @armanbilge in #723
New Contributors
- @felher made their first contribution in #710
- @Lasering made their first contribution in #708
- @zetashift made their first contribution in #722
Thank you wonderful contributors!
Full Changelog: v2.2.0...v2.3.0
v2.2.0
scala-js-dom v2.2.0 is the third release in the 2.x series. It is fully binary-compatible with v2.0.0 and v2.1.0, although there are minor source-breaking changes, and is published for Scala 2.11, 2.12, 2.13, and 3.0+ with Scala.js 1.5+.
If you are upgrading from scala-js-dom 1.x, please find the migration guide in #627. CrossVersion.for3Use2_13 from your build.
User-facing PRs
- Fix
dom.crypto.getRandomValuesby @AlexITC & @armanbilge in #669 - Add
EventListenerOptions#signalby @armanbilge in #686 - Add
WorkerOptionsto Worker constructors by @armanbilge in #691 - Add Façade Types to Support
ResizeObserverby @chrisshafer in #694 - Partial façade for Shadow DOM APIs by @peter-jerry-ye in #697
- Add
reportValidityfacade method by @987Nabil in #700
New Contributors
- @AlexITC made their first contribution in #667
- @chrisshafer made their first contribution in #694
- @peter-jerry-ye made their first contribution in #697
- @987Nabil made their first contribution in #700
Thank you wonderful contributors!
Full Changelog: v2.1.0...v2.2.0
v2.1.0
scala-js-dom v2.1.0 is the second release in the 2.x series. It is fully binary-compatible with v2.0.0, although there are minor source-breaking changes, and is published for Scala 2.11, 2.12, 2.13, and 3.0+ with Scala.js 1.5+.
If you are upgrading from scala-js-dom 1.x, please find the migration guide in #627. CrossVersion.for3Use2_13 from your build.
User-facing PRs
- Add Code of Conduct by @armanbilge in #623
- Fetch request body as ReadableStream by @ptrdom in #628
- Change ReadableStream#pipeTo to return js.Promise[Unit] by @matil019 in #639
- Always use
varandundefinedfornew-based constructors by @armanbilge in #657
New Contributors
Thank you both!
Full Changelog: v2.0.0...v2.1.0
v2.0.0
scala-js-dom v2.0.0 is the first release in the 2.x series. It is published for Scala 2.11, 2.12, 2.13, and 3.0+ with Scala.js 1.5+. Note that it breaks binary-compatibility with the 1.x series.
!! IMPORTANT: Remove CrossVersion.for3Use2_13 !!
As scala-js-dom v2.x publishes a Scala 3 artifact, this setting is no longer necessary. Failing to remove this from your build.sbt will cause your library to become binary-incompatible with other libraries correctly depending on scala-js-dom v2.x.
Migration guide
Update: for the latest migration guide with additional notes/hints from the community see #627.
scala-js-dom v2.0.0 is source-compatible to a great extent with v1.2.0, besides some corrections to facades and many new deprecation warnings. While testing the RC, we were able to upgrade several projects without making any changes!
To address the deprecation warnings:
- Replace imports into the
dom.raw.*,dom.experimental.*anddom.crypto.*sub-packages withdom.*. Nearly everything is indom.*now except forintlandwebgl. - Use
new-based constructors instead ofapply-based constructors.
Note that a consequence of retiring the experimental package is that we no longer designate experimental APIs. You can consult MDN and caniuse to determine which APIs are suitable for your projects.
You can also automate some, hopefully the majority, of your migration by running this quick script:
find . -type f -path '*/src/*.scala' -exec perl -pi -e '
s/\bdom\.(raw|crypto|webworkers)\./dom./;
s/\bdom\.experimental\.[a-z]+\./dom./;
s/\bClientRect\b/DOMRect/g;
' {} +Example migration
import org.scalajs.dom
// Before (deprecated)
val response = dom.experimental.ResponseInit(myStatus, myStatusText, myHeaders)
// After
val response = new dom.ResponseInit {
var status = myStatus
var statusText = myStatusText
var headers = myHeaders
}User-facing PRs
Thanks to our community contributors to this release for bravely opening PRs despite the significant churn as we put together 2.0.0! Now that things have stabilized, we look forward to many more PRs. Check out the contributing guide and help-wanted issues.
- Cleanups, part 1. by @sjrd in #458
- feat(idb): Update to newer API by @mprevel in #350
- Enable ExplicitResultTypes by @japgolly in #549
- Fix #516 Request extends Body by @armanbilge in #550
- Fix #515 Blob.stream() emits Uint8Array by @armanbilge in #551
- Added ImageCapture by @RoelofRuis in #410
- Document coding standards and conventions by @japgolly in #523
- Remove MDN from scaladocs by @armanbilge in #554
- Add Node.baseURI by @AugustNagro in #559
- add Node.isConnected by @AugustNagro in #558
- Add remove and other missing Element methods by @japgolly in #561
- Revise all
postMessagemethods by @japgolly in #563 - querySelectorAll returns Elements, not Nodes by @japgolly in #560
- Improve precision of IDB API and add tests by @japgolly in #569
- Clean up config traits by @sjrd in #579
- Restructure Java-style by @japgolly in #586
- The great migration to
domby @armanbilge in #588 - Use opaque types for Scala 3 by @armanbilge in #592
- Add
webcryptoby @japgolly in #598 - Improve
HTMLCollection, addHTMLOptionsCollectionandHTMLFormControlsCollectionby @ghostbuster91 in #593 - Make opaque string types subtype String by @japgolly in #603
- Minor fixes by @japgolly in #616
- Revise and add
ReadyStateclasses by @japgolly in #617
Full Changelog: v1.2.0...v2.0.0