Releases: scala-js/scala-js-dom
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
BroadcastChannel
by @armanbilge in #817 Performance
API improvements by @cquiroz in #709- Fix type of
ImageData#data
by @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
HTMLAnchorElement
by @faveoled in #783 - Add
HTMLAnchorElement#download
by @faveoled in #784 - add
DateTimeFormatOptions#fractionalSecondDigits
by @mraulim in #787 - Allow
MediaSource
to be passed in toURL.createObjectURL
by @yilinwei in #794 - Add
options
parameter toDocument#createElement
by @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
XMLDocument
by @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#slice
doc fix by @faveoled in #768- add Path2D and related methods by @buntec in #769
- Fix
WebSocket#onerror
by @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
MediaQueryList
to extendEventTarget
by @mabasic in #724 - Add
KeyboardEvent#code
by @fndejan in #727 - Change
Storage#length
to adef
instead ofvar
by @zetashift in #737 SubtleCrypto#deriveBits
should return aPromise[ArrayBuffer]
by @zetashift in #740- Fixup
Clipboard
to use addedClipboardItem
by @zetashift in #736 - Add
Event.composed
by @armanbilge in #751 - Add
Element#closest
by @DanielMoss in #752 - Add alias to
HTMLDialogElement
in html object. by @Lasering in #753 - Add
Image
facade and additional facades forHTMLImageElement
#621 by @zetashift in #725 - Fixup
Location#origin
andLocation#reload
by @zetashift in #761 - Add Web Lock APIs by @armanbilge in #762
- Add
Audio
, fixImage
by @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
ServiceWorkerRegistrationOptions
by @armanbilge in #704 - Add
EventSourceInit
by @armanbilge in #703 - IDB cursor result types were incorrectly abstract by @japgolly in #705
- Add
InputEvent
,StaticRange
,AbstractRange
by @armanbilge in #695 - Update Index.scalatex to use version 2.2.0 by @felher in #710
- Create
HTMLDialogElement
by @Lasering in #708 - Add
URLSearchParams
toBodyInit
by @zetashift in #722 - Add
History#scrollRestoration
by @zetashift in #718 - Add
RequestInit#duplex
by @zetashift in #719 - Add
Element#replaceWith
by @zetashift in #720 - Fixup
Blob
andFile
APIs 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.getRandomValues
by @AlexITC & @armanbilge in #669 - Add
EventListenerOptions#signal
by @armanbilge in #686 - Add
WorkerOptions
to Worker constructors by @armanbilge in #691 - Add Façade Types to Support
ResizeObserver
by @chrisshafer in #694 - Partial façade for Shadow DOM APIs by @peter-jerry-ye in #697
- Add
reportValidity
facade 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
var
andundefined
fornew
-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 forintl
andwebgl
. - 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
postMessage
methods 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
dom
by @armanbilge in #588 - Use opaque types for Scala 3 by @armanbilge in #592
- Add
webcrypto
by @japgolly in #598 - Improve
HTMLCollection
, addHTMLOptionsCollection
andHTMLFormControlsCollection
by @ghostbuster91 in #593 - Make opaque string types subtype String by @japgolly in #603
- Minor fixes by @japgolly in #616
- Revise and add
ReadyState
classes by @japgolly in #617
Full Changelog: v1.2.0...v2.0.0
v1.2.0
This is the first scala-js-dom release in over a year and brings many improvements and fixes. Nearly all outstanding PRs were merged (save a few that will target v2.0.0). We are very grateful to the many contributors to this release for their patience!
This release is fully binary-compatible with every 1.x release. It is published for Scala 2.11, 2.12, and 2.13 for both SJS 0.6 and 1, as well as 2.10 for SJS 0.6 only.
This release is the first under new maintainership of @japgolly and @armanbilge. Thanks to infrastructure introduced in #471 by @japgolly, the review process will be much more streamlined going forward. We look forward to your PRs!
Finally, as we approach v2.0.0 there are many opportunities to improve scala-js-dom. Please weigh in on #481 and #487 or propose an idea of your own.
Thanks again to all of our contributors!
User-facing PRs
- Remove ServiceWorkerContainer.onerror (#380) @unarist
- Added FileReaderSync to dom.experimental (#424) @catap
- Add CanvasRenderingContext2D.imageSmoothingEnabled (#499) @JD557
- Add WindowOrWorkerGlobalScope (#430) @japgolly & @exoego
- Fix FileReader {abort,error,load} event types (#497) @japgolly
- Make reason for Readable/WritableStream cancel/abort optional (#496) @armanbilge
- FetchEvent extends ExtendableEvent (#495) @armanbilge
- Fix return type of
FetchEvent.preloadResponse
(#494) @armanbilge - Fix #488
HTMLMediaElement.play()
should returnPromise
(#491) @armanbilge - Add ParentNode.replaceChildren (#439) @vhiairrassary
- Fix #489 Add CSS.supports (#492) @armanbilge
- Fix #445 return type for Header#get (#473) @armanbilge
- Add XMLHttpRequest.overrideMimeType (#442) @JD557
- Add onwheel (#436) @vhiairrassary
- Add Element.insertAdjacentElement (#435) @unarist
- Use IDBVersionChangeEvent for IDBOpenDBRequest.onblocked (#434) @unarist
- Add IDBDatabase.onversionchange (#433) @japgolly
- Make crypto.subtle.importKey return a js.Promise[CryptoKey] (#431) @japgolly
- IDBVersionChangeEvent.newVersion can be null (#429) @japgolly
- Avoid forcing evaluation of crypto (#432) @japgolly
- Set version scheme for publishing (#480) @armanbilge
- Fix misuse of ErrorEvent (#379) @unarist
- Added
NavigatorLanguage.languages
(#394) @catap - Make Blob compliance with documentation (#383) @FabioPinheiro
- Expose HTMLMediaElement.srcObject (#365) @exoego
- Add moveTo and moveBy to Window (#335) @anilanar
- Fix #408 link to Scaladoc in README (#474) @armanbilge
- Fix #427: Fix the type of SharedWorker.onconnect (#428) @japgolly
- Fix docs examples (#426) @sake92
- Add REST method PATCH for Ajax (#423) @maksimfedin