This repository has been archived by the owner on Aug 1, 2024. It is now read-only.
Closure Library v20210601
New Additions
- goog.storage.mechanism.IterableMechanism now implements ES6 Iteration protocols. The default implementation delegates to the existing goog.iter.Iterator via a shim. Support for iteration using goog.iter.Iterable is softly deprecated and will eventually be removed in favour of ES6 iteration. (8e7279e)
- Add new goog.array toMap and bucketToMap methods that act like toObject and bucket, but return an ES6 map. (8d6fec3)
- Introduce goog.singleton.getInstance() which can replace goog.addSingletonGetter(). (de77284)
- Implement
MockClock.doTimeWarpAsync()
. (a9e3d01) - goog.dom.fullscreen.requestFullscreenWithKeys now accepts options to pass to goog.dom.fullscreen.requestFullscreen when feasible. (8d18ebb)
- goog.iter.Iterator's next method (with ES4 iteration semantics) is being renamed to
nextValueOrThrow
. The existingnext
method has been left for backwards-compatibility and marked deprecated. Users are encouraged to migrate all usages ofnext
tonextValueOrThrow
. (f05a665) - Added a unique id to the aria-live regions created by goog.a11y.aria.Announcer and added a public method to get the id for a specific priority. (c0047ef)
- goog.cloneObject and goog.object.unsafeClone now shallow-clone ES6 Maps and Sets. (8ad7d98)
- Add methods to goog.structs.Map to align the implementation with native ES6 Map. This marks the first of several steps in migrating goog.structs.Map to ES6 Map. (132696f)
- Create goog.collections.maps, containing helper methods that operate on Map-Like collections. These functions are the intended replacement for various methods on goog.structs.Map, and as such various methods on goog.structs.Map are marked deprecated with their intended replacements noted in the deprecation message. (ba5012f)
- Support iterating over keys and values for ES6 Map and Set in goog.structs. (0515a76)
- Copy functionality from goog.structs.Set that is not present on ES6 Set into helper functions in goog.collections.sets, and add additional methods on goog.structs.Set instances to align with native ES6 Set. goog.structs.Set is softly-deprecated in favour of ES6 Set. (6f2c86c)
- Rename declarations of goog.iter.Iterator#next to #nextValueOrThrow, leaving behind aliasing implementations of #next. If your codebase uses goog.iter.Iterator, similar changes should be applied to your codebase to prepare for upcoming Closure Library changes that call
nextValueOrThrow
wherenext
is currently called. (32872c4)
Backwards Incompatible Changes
- Make goog.getScriptNonce private. Existing users should use goog.dom.safe.getScriptNonce instead. (69dc26e)
- Remove goog.userAgent.isVersion, the old name for goog.userAgent.isVersionOrHigher. (62c6d5a)
- goog.debug.errorHandlerWeakDep has been removed. (edaa2d5)
- Remove support for integrating with the ActiveX garbage collector in goog.debug.Trace as ActiveX is deprecated. (40e5451)
Other Changes
- Deprecate Closure Python scripts. (89659f0)
- Create the script tag in jsloader.safeLoad using the document it will be appended to, instead of the current document. (aa5b129)
- Allow dimension picker to be extended. (be5fd1a)
- Correctly parse ISO 8601 date strings representing dates in years 0-99. (1f76d5f)
- Add goog.dom.safe.getScriptNonce, take 2. (de69cc1)
- Fix 'undefined' streaming response header in testing XhrIo. (c1b7b96)
- A data update based on ICU69.1. (1bfee28)
- Fix test filtering for generated test names, which can contain any character. (99c8cc3)
- Compact decimals formatting - inheritance improvement (from CLDR). (21ad239)
- Allow
shouldRunTests
to be respected in nested tests when a containing test object does not defineshouldRunTests
. (5e49bff) - Delete script nonce cache. (4dcfc9e)
- introduce goog.getLocale() (5d1bd01)
- Allow goog.ui.InputDatePicker to use any implementation of a DateTime(Parser|Formatter). (7bf5f74)
- Minor optimisation of base64 serialization. (eef94a6)
- Fix verbalization in PaletteRenderer (ce40d50)
- Improvement to time zone detection. (15fe94f)
- Fixes output for infinity in compact short style (2c26f37)