New Additions
goog.log.getRootLoggerhas been added- Add
MockClock.tickAsync() goog.loader.NoopModuleManager: Add new no-op default module manager implementation- Add
goog.functions.isFunction - Add new method
goog.testing.singleton.reset()
Backwards Incompatible Changes
goog.delayhas been removed- Remove support for text/csv in
SafeUrl.{fromBlob,fromDataUrl,tryFromDataUrl}. Safe uses should migrate to unchecked conversions - Tighten strictness in Closure Library functions in
goog.providefiles goog.loader.activeModuleManager: RenamemaybeInitializetoinitialize- Remove deprecated method
goog.fs.blobAsString
Other Changes
- Resolved issue with rendering child tabs incorrectly when they moved right
- Make
goog.eventslibraries compatible with clutz (JS to TS converter) - Allow using
setInnerHtmlwithShadowRoot - Check for
TypedArrayingoog.object.unsafeCloneand clone them appropriately - Fix edge-case in
TestCaseautodiscovery - Add aria-owns to permitted list of attributes with IDENTIFIER contract
- Update
isSafariDesktopOnMobilecheck to account for non-Safari browsers that have recently adopted the same behavior - Typo fix in
goog.url#createUrl - Adds unhandled error handler for
Deferreds for transitional purposes
Assets
2
New Additions
- goog.collections.iters graduated from goog.labs.*
- goog.loader.activeModuleManager optional arguments have been added to maybeInitialize method
- goog.loader.activeModuleManager maybeInitialize method has been added
Other Changes
- Changes ImageLoader event dispatch order to support re-queuing duplicate image IDS
- Add more static methods to goog.log.
- Remove usage of vendor-prefixed versions of Blob#slice.
- goog.log.LogBuffer is now an alias of goog.debug.LogBuffer.
- Update
goog\.dom\.TagNameto be an uninstantiable record type. - Rename goog.testing.singleton.reset to goog.testing.singleton.resetAll
- Resolved issue with rendering child tabs incorrectly when they moved right.
Assets
2
New Additions
- Add commit method to goog.db.Transaction.
- Add trySanitize and tryFromDataUrl to goog.html.SafeUrl
- Add goog.dom.copyContents.
Backwards Incompatible Changes
- declareLegacyNamespace logic has been updated to work more like goog.provide.
- goog.isArray has been deleted. Use Array.isArray instead.
Other Changes
- goog.net.xpc.IframePollingTransport has been removed.
- Removed deprecated goog.object.is in favor of Object.is
- Updated acceptable mXSS output.
- add Event.type to error message when possible.
- Mark goog.iter.Iterator as deprecated
- Make goog.html APIs exclude monkeypatched enumerable properties on Object.prototype
- goog.now now always uses Date.now
Assets
2
New Additions
- Add commit method to goog.db.Transaction.
- Add goog.dom.safe.setInnerHtmlFromConstant.
- Add an adapter API to use Closure asserts with other testing frameworks (eg, Jasmine).
- goog.module.ModuleManager addExtraEdge and removeExtraEdge methods have been added.
Backwards Incompatible Changes
- goog.globalize has been removed
- Remove aliases of goog.getHashCode and goog.removeHashCode from goog.js.
- goog.typeOf no longer special cases very old browsers.
- goog.STRICT_MODE_COMPATIBLE has been removed.
- Remove transitionalforwarddeclarations.js
- goog.getHashCode and goog.removeHashCode have been removed.
- Simplify goog.globalEval in by removing pre-ES5 support.
Other Changes
- Remove useless transitionforwarddeclarations.js
- Deprecate goog.provide, goog.inherits, and goog.bind
- Use the new asserts adapter in fail().
- Templatize goog.array.equals comparison function.
- Deprecate goog.isFunction
- Delete
goog\.result\.Result. - Clean up circular dependency in net/xpc.
- Deprecate goog.object.is
- Fix overflow issue for link dialog input.
- Changed the default value of goog.TRUSTED_TYPES_POLICY_NAME to enable Trusted Types (https://github\.com/w3c/webappsec-trusted-types\) support in goog.html.{SafeHtml,SafeScript,TrustedResourceUrl} and goog.base debug loaders. Trusted Types will be used whenever available in the runtime.
- Deprecate goog.nullFunction.
- requestFullscreen now returns the result of the browser-specific API call.
- Copy much of the interface of
DeferredontoResult. - Aligned the trusted types related tests with the current goog.html.trustedtypes package naming.
Assets
2
New Additions
goog.module.AbstractModuleLoaderextraEdgeshas been added as an optional parameter to the loadModules method.- Added
goog.html.SafeUrl.revokeObjectUrl.
Backwards Incompatible Changes
- Disallow old templates signatures.
- Remove noop method goog.tagUnsealableClass
- goog.isArray now calls Array.isArray
Other Changes
- Update data formatting with ICU67.
- Now handles negative patterns for compact numbers.
- Workaround for https://crbug\.com/1081632\. In workers without a Secure Context (https://www\.w3\.org/TR/secure-contexts/\)
self\.trustedHTMLis defined, but has no properties. Unwrapping goog.html.SafeHtml.EMPTY_HTML in such realms caused errors. - Add callback in URI package to detect usage that is better supported by the new URL package.
- Use Array.isArray instead of goog.typeOf in more places.
- Add URL package to Closure Library.
- Create goog.html Trusted Types policy lazily.
- goog.result.DeferredAdaptor has been removed.
- Update data to ICU 67 / CLDR 37. No API changes.
- goog.html.SafeHtml and goog.html.SafeScript static properties can now be compiled out if they are not used, even when goog.TRUSTED_TYPES_POLICY_NAME is set.
- In autocomplete demos, use JSON data instead of JS data.
- Remove forwardDeclares from Closure dom by adding an abstraction for SavedRanges that use Carets (AbstractSavedCaretRange) and stopping the various Range implementations from directly using goog.dom.Range constructors for new sub-ranges.
Assets
2
New Additions
- goog.module.AbstractModuleLoader extraEdges has been added as an optional parameter to the loadModules method.
- goog.module.AbstractModuleLoader the type of the extraEdges parameter of the loadModules method has been updated to map to a Set
- goog.loader.AbstractModuleManager addExtraEdge and removeExtraEdge methods have been added.
- Whitelist additional ARIA attributes in the HtmlSanitizer.
- Add concat method to iterables library
Backwards Incompatible Changes
- goog.debug.deepFreeze should now be imported with destructuring.
- goog.labs.collections.iterables renamed to goog.labs.collections.iters.
- goog.module.AbstractModuleLoader optional parameters have been merged into a single options bag.
Other Changes
- goog.module.AbstractModuleLoader migrate to ES6 syntax
- Remove an old Safari behaviour workaround in goog.globalEval. This will simplify future Trusted Types integration, as eval(trustedTypes.emptyScript) might be used, and that pattern does not require creating a Trusted Types policy.
- Add optional window object in the call to getScriptNonce.
- Removed references to deprecated parts of the Trusted Types API (
window\.TrustedTypesandTrustedTypePolicyOptions\.createURL) - Remove goog.defineClass's support for sealing instances
- Add scripts to package.json for serving the tests and demos locally.
- Defines
Deferred::getLastValueForMigration. - Move base.js Trusted Types policy creation to the conditional block creating the debug loaders to avoid creating the policy for binaries without the debug loader.
- Use about:blank iframe instead of an iframe with an empty source in goog.async.nextTick. Removed spurious document.write call.
- Remove noop method goog.tagUnsealableClass
Assets
2
Backwards Incompatible Changes
- In the QueryData constructor, as well as in QueryData.createFromKeysValues and QueryData.createFromMap, opt_uri (second-to-last argument) is removed, and opt_ignoreCase (last argument) takes its place.
- Tests calling goog.window.open and mocking window.open now need to pass an undefined 4th parameter or mock goog.window.open.
Other Changes
- Remove demos from checked-in deps.js file.
- Allow string name in goog.dom.safe.openInWindow.
- Allow font/ MIME type in SafeUrl.
- Use setTextContent in modern browsers.
Assets
2
New Additions
- Add SafeHtml.comment.
Security Fixes
- Fixes CVE-2020-8910.
Backwards Incompatible Changes
- Delete inlay css styles, which are not actually used by Closure.
- Add non-nullable modifier to return type of functions never returning null.
- Remove forwardDeclares from Closure Events Listenable by reducing the typing of the event key's src property to just Listenable, instead of Listenable|EventTarget. Note that EventTarget is the primary implementation of Listenable.
Other Changes
- Added SafeUrl.fromMediaSource()
- Fix authority parsing in Closure URI parser.
- Document mode is now based on user agent on IE if not present in document
- Add a define to module manager so that we can control module loading behaviors.
- Add non-nullable modifier to return type of functions never returning null.
- goog.isArray in deprecated in favor of Array.isArray
- Update Thenable.then rejection handler JSDoc to reflect actual functionality.
Assets
2
New Additions
- Create goog.debug.deepFreeze.
- Added goog.async.promises.allMapsValues utility function
Backwards Incompatible Changes
- AbstractRange.prototype.getTextRange(s) now return AbstractRange instead of the specific TextRange subclass
Other Changes
- Remove some forwardDeclares from closure labs net.
- Remove forwardDeclares from closure/graphics.
- Remove forwardDeclare from closure/fs.
- Linkify matching {} and () in URL like https://g\.com?res\{x=3\}
- The functions allowed by the CSS sanitizer are now case insensitive.
- Replace uses of goog.isArray in preparation for its removal
- Remove special case for ie6-ie10 in nexttick.
- Remove some forwardDeclares from closure/net.
- Remove forwardDeclares from various Closure packages.
Assets
2
Note: the last two releases were not pushed to npm. To keep a complete changelog these release notes include the last two as well.
New Additions
- Add TrustedResourceUrl.fromSafeScript().
- New htmlsanitizer builder API addition.
- Extract the version from Headless Chrome user-agent strings.
Backwards Incompatible Changes
- goog.net.WebSocket no longer accepts direct autoReconnect and getNextReconnect arguments; specify these as fields in an options object instead.
- Delete goog.is(Def|Null|DefAndNotNull|String|Boolean|Number) from base.js.
- goog.base has been removed.
- Remove returnValue_ from goog.events.Event.
- Add getter accessor for propagationStopped field on goog.events.Event.
- goog.net.Cookies.prototype.set only accepts options objects for optional parameters.
Other Changes
- Fix a bug when emoji picker is used with urlPrefix
- Fix a keyboard navigation bug in goog.ui.Palette when it's used within a scrollable container.
- All Closure-compiled binaries using Closure Library will now contain Closure's short license.
- Calling MockClock.tick() reentrantly no longer makes time go backwards
- Mark goog.forwardDeclare as deprecated. Users who need type-only imports should use
goog\.requireTypeinstead. - Migration from goog.fs.getBlob to goog.fs.blob.getBlob.
- Remove usages of goog.structs.Set, use ES6 Set instead
- Fix type annotation of getBlobWithProperties.
- goog.functions.create is now deprecated.
- Fix goog.getUid to work correctly with class-side inheritance
- Split goog.fs.getBlob and goog.fs.getBlobWithProperties into a separate goog.fs.blob module.
- Update auto-scrolling implementation in filtered menu highlighting.
- Refactor internal usages of goog.net.Cookies.prototype.set to use the options object.
- Remove instances of goog.getObjectByName in webchannelbase.js.
- Delete deprecated goog.fs.getBlob methods.
- Mark goog.scope() as deprecated.

