Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

Closure Library v20160315

Compare
Choose a tag to compare
@blickly blickly released this 28 Mar 17:41

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.