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

Closure Library v20160822

Compare
Choose a tag to compare
@brad4d brad4d released this 24 Aug 18:40

New Additions

  • Add new API goog.html.sanitizer.CssSanitizer.sanitizeInlineStyleString() for CSS sanitization.
  • Add goog.dom.getElementsByTagName.
  • Add a separate package to relax the HTML sanitizer's policy in a potentially unsafe way.
  • Add enum for HTML attributes. goog.dom.Attr.
  • Make goog.html.sanitizer.CssSanitizer.sanitizeInlineStyle public.
  • Added optional boolean to 0/1 serialization approach to goog.proto2.ObjectSerializer.
  • Add convenience API goog.dom.safe.setStyle() to allow setting style attributes on HTML elements safely.
  • Add goog.dom.getCanvasContext2D.
  • Added intl.collator options support.
  • Add http status code to status name mapping,
  • Added a configuration option to the HTML sanitizer to save the original tag name of sanitized tags in a data attribute.
  • Add two methods: XhrIo.getStreamingResponseHeader() and XhrIo.getAllStreamingResponseHeaders(), which allow getting response headers before the XMLHttpRequest object has reached the COMPLETE(value 4) state.
  • goog.getCssName can now optionally delegate to a global map function
  • A PropertyReplacer is now available on goog.labs.testing.Environment.

Backwards Incompatible Changes

  • goog.html.sanitizer.HtmlSanitizer.Builder is now marked as @final, in order to prevent developers from circumventing its safe interface.
  • Mocks now stub non-enumerable properties (like ES6 class methods).
  • sanitize unknown tags as span instead of
    . For consistency, sanitizeToDomNode now wraps the output in a span tag instead of a div.
  • goog.labs.mock now stubs non-enumerable properties
  • goog.disposable.IDisposable is now @record
  • Disallow non-HTML tags in goog.dom.safe.setInnerHtml.
  • Assert that goog.dom.safe.setImageSrc is correctly invoked on an object of type HTMLImageElement.
  • goog.object.unsafeClone has a T->T signature instead of ->
  • Delete goog.dom.createUntypedDom.
  • Assert that goog.dom.safe.setAnchorHref is correctly invoked on
  • Assert that goog.dom.safe wrappers for setting href and src
  • The function returned by goog.dom.animationFrame.createTask now uses the global object as context when opt_context is not provided.
  • goog.net.BrowserChannel.MAGIC_RESPONSE_COOKIE has been
  • goog.labs.mock is now enforced as test only.
  • Delete goog.dom.TypedTagName.
  • Assert that goog.dom.safe.setLocationHref is correctly invoked
  • closure.labs.html.Sanitizer has been deleted. Please use closure.html.sanitizer.HtmlSanitizer instead.

Other Changes

  • goog.Uri no longer fails when there's a newline in the fragment part of the uri.
  • Fix error when css rule does not contain a selector.
  • Update transpile.js to stop monkey-patching property accessors.
  • Replacing Function type with tighter function(?):? type in
  • Improve reported stack traces reported by the test runner for IE
  • Update transpile.js to include Reflect polyfills.
  • Fix goog.requires in demos.
  • Failing on goog.getCssName if a dot is passed as className.
  • Cleanup of deferred queue's pool.add()
  • Fix bug to handle AltGr characters in Firefox.
  • AnimatedZippy now fires TOGGLE_BEGIN event at the beginning of animation and fires TOGGLE_END event at the end of animation.
  • Make headers in testing.net.XhrIo non-nullable to match the ones in goog.net.XhrIo.
  • Only seal objects during module loading.
  • Add safe versions of goog.net.jsloader.load and variants, that require goog.html.TrustedResourceUrls. The old ones are still working, but they are deprecated.
  • Added the missing implementation of withCredentials in XhrManager
  • goog.i18n.currency.getCurrencyPattern methods have been deprecated in favor of formatting numbers using goog.i18n.NumberFormat.
  • Fix for test adapter for async tests that use MockClock.
  • Prevent mutation of input options object in goog.labs.net.xhr.getBlob() or getBytes().
  • Bug fix. Fixing the return type annotation of goog.color.hexToHsl to goog.color.Hsl.
  • Use goog.events.KeyHandler in goog.ui.Zippy to correctly handle the keyboard events.
  • Fixing issue with test util to respect caching behavior.
  • Fix type declaration in JsonPrettyPrinter constructor.
  • Improve goog.userAgent dead-code removal.
  • Replace explicit type of implemented field in Listener with @override.
  • Fixed bug in goog.labs.mock when verifying a mock function with nullable parameters.