Skip to content

Releases: google/closure-library

Closure Library v20160315

28 Mar 17:41
Compare
Choose a tag to compare

New Additions

  • Create goog.html.SafeHtmlFormatter.
  • Added new string method, goog.string.lastComponent.
  • Add goog.style.installSafeStyles and setSafeStyles.
  • Add a SafeHtml.createSandboxIframe function, more restrictive than SafeHtml.createIframe, but with less prerequisites.
  • Adds goog.array.removeLast.
  • Added support for CTR mode in goog.crypt.Ctr.
  • Add goog.html.SafeUrl.createTelUrl.
  • Add goog.html.SafeHtml.createScriptSrc.
  • Add goog.html.TrustedResourceUrl.fromConstants.
  • Added compiler-aware caching primitive.
  • Allow @Suppress {underscore}

Backwards Incompatible Changes

  • goog.provide now throws an exception if used from within a goog.module.
  • Breaking change for third parties: This will break your build if your code uses these methods. Use setSafeHtml, setText and setAfterLabelSafeHtml instead.
  • Removes the ability to set the blocksize from goog.crypt.cbc and ctr.
  • Delete deprecated methods goog.i18n.BidiFormatter#spanWrap and spanWrapWithKnownDir. Breaking change for third parties: This will break your build if your code uses goog.i18n.BidiFormatter#spanWrap or spanWrapWithKnownDir. Use spanWrapSafeHtml and spanWrapSafeHtmlWithKnownDir instead.
  • the obsolete typedef goog.array.ArrayLike has been removed, use IArrayLike
  • Breaking change for third parties. This change will break your build if your code passes string as opt_blankPageUrl to goog.History constructor. Pass goog.html.TrustedResourceUrl instead.
  • goog.window.open now sanitizes its non-SafeUrl inputs.
  • Breaking change for third parties. This will break your build if your code passes string URL to goog.ui.media.FlashObject. Pass goog.html.TrustedResourceUrl instead.
  • JpegEncoder has been removed
  • Breaking change for third parties: This will break your build if your code uses this method. Use goog.ui.DrilldownRow constructor instead.
  • Change the type annotation of opt_startValue from Object to the actual template for inOrderTraverse/reverseOrderTraverse in goog.structs.AvlTree.
  • The callback specified in the XHR response of goog.ui.ac.RichRemote should return an object with a render() method. If this method doesn't exist then toString() is called instead which is an undocumented feature. The result of toString() was previously assigned to innerHTML, now it is assigned to textContent. If your code used this undocumented feature then this change will cause double escaping.
  • Breaking change for third parties: This will break your build if your code uses goog.ui.Tooltip#setHtml. Use setSafeHtml or setText instead.
  • Breaking change for third parties. This will break your build if your code passes a string URL to goog.ui.media.MediaModel.Player constructor or goog.ui.media.MediaModel.Player#setUrl. Pass goog.html.TrustedResourceUrl instead.
  • Breaking change for third parties. Your code will break if it passes string HTML or style to goog.dom.iframe functions. Pass goog.html.SafeHtml or goog.html.SafeStyle instead.

Other Changes

  • Deprecate htmlToDocumentFragment.
  • goog.scope is now not supported within a goog.module
  • goog.module.* renamed to goog.loader.*
  • Fix MouseWheelHandler scrolling in Edge.
  • Fix bug in htmlprettyprinter that would break pretty printing after any unclosed <.
  • Promise rejections are passed to generator.throw in goog.labs.promise.run.
  • goog.iter.groupBy is now declared as taking a function(VALUE), not function(...VALUE). This is strictly an annotational change; there is no actual impact beyond type checking.
  • Deprecate goog.dom.htmlToDocumentFragment.
  • Deprecate goog.i18n.BidiFormatter#spanWrap and spanWrapWithKnownDir.
  • Relaxed condition when Dragger would preventDefault so touch event would pass through. Improved touch response on goog.ui.Dialog close button.
  • Added support for CSP nonces in jsloader scripts and JSONP requests.
  • Deprecate goog.format.insertWordBreaks and goog.format.insertWordBreaksBasic.
  • Fix bug in goog.ui.Control for IE9+ where a double click caused performActionInternal to be fired three times.
  • Documentation for goog.html.legacyconversions is updated to reflect the new contract for these functions. Previously they were meant just for libraries, now they are also meant for application code. There are however no API changes.

Closure Library 20160208

09 Feb 20:19
Compare
Choose a tag to compare

New Additions

  • Add goog.ui.Dialog#setTextContent. Allows plain text to be set in the content element.

Backwards Incompatible Changes

  • goog.html.legacyconversions.ALLOW_LEGACY_CONVERSIONS define no longer exists. Calls to goog.html.legacyconversions can be prevented using JS Conformance instead.
  • goog.ui.Prompt's constructor promptBody argument is now treated as plain text. Breaking change for third parties: This will introduce double-escaping if your code passes a string with HTML code to goog.ui.Prompt. Pass SafeHtml instead.
  • Remove deprecated function goog.ui.Control.decorate.
  • Delete deprecated goog.ui.tree.BaseNode#setHtml and setAfterLabelHtml.Breaking change for third parties: This will introduce double-escaping if your code is passing an HTML code to tree constructors.
  • Ban the creation of meta tags through goog.html.SafeHtml.create.

Other Changes

  • Add type information to the SafeHtml#unwrap (and similar) error message.
  • goog.addDependency's module parameter can now optionally be a dictionary.
  • Type of goog.ui.ComboBoxItem's opt_data changed from {Object=} to {*=} to match type of goog.ui.MenuItem's opt_model.
  • Re-declared input type of ImageLoader.addImage from "string or Image or null" to "string or HTMLImageElement", which makes more sense.
  • assertHtmlMatches now describes the problem node when classes don't match.
  • Added a doc/ directory from which to generate gh-pages.

Closure Library v20160125

27 Jan 19:53
Compare
Choose a tag to compare

New Additions

  • Exposed recacheListAndItemBounds API on DragListGroup to allow the cached boundaries of drag lists and drag items to be manually refreshed.

Closure Library v20160119

19 Jan 23:52
Compare
Choose a tag to compare

New Additions

  • Added goog.functions.partialRight.
  • Added new API, goog.dom.getDocumentHeightForWindow.

Backwards Incompatible Changes

  • Improved typechecking on goog.proto2.Message.prototype.forEachUnknown. You may see some new type errors in code that calls that method.
  • Breaking change for third parties: This will introduce double-escaping if your code passes a string with HTML code to goog.ui.Bubble. Pass SafeHtml instead.

Closure Library v20160106

07 Jan 23:36
Compare
Choose a tag to compare

First Closure Library base release.