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

Closure Library v20171112

Compare
Choose a tag to compare
@shicks shicks released this 17 Nov 20:44

New Additions

  • goog.dom.asserts.assertIsHTML(Form|Input|Button)Element
  • Allow importing test assertions.
  • Adds the assertion 'assertFinite' to goog.asserts.
  • added goog.soy.Renderer#getDom (protected method).
  • Add a new createTest method that can be used instead of createTestFromAutoDiscoveredFunction
  • Added goog.math.Vec2.rescaled() and goog.math.Vec3.rescaled() static functions.
  • Add TrustedResourceUrl#cloneWithParams.
  • Add callback support to goog.debug.Trace for its following functions: startTrace, stopTrace, and addComment
  • Make goog.events.* support MediaQueryList (from window.matchMedia).
  • Add goog.html.testing.checkTypedStringEquality.
  • Introduced a module to calculate specificity of CSS selectors.
  • goog.dom.safe.replaceLocation, goog.dom.safe.setFormElementAction, setInputFormAction, setButtonFormAction

Backwards Incompatible Changes

  • Store goog.editor.Field#cssStyles as SafeStyleSheet.
  • Removal of goog.labs.promise.run.
  • Pass testSource instead of goog.global.
  • changes how the HTML sanitizer inlines style rules.
  • Add support in the HTML and CSSSanitizer for inlining style rules found in style tags into style attributes.
  • By default, restrict the effect of sanitized STYLE tags to the current HtmlSanitizer.sanitize call.
  • Remove createTestFromAutoDiscoveredFunction now that createTest exists.
  • Delete unused inheritBlendedCSS.
  • Added support for allowing STYLE tags in the HtmlSanitizer.
  • removed unused API

Other Changes

  • Fix file:// protocol loading.
  • new WebChannel disableRedact option.
  • decodeStringToUint8Array returns a Uint8Array with a buffer with a more accurate size.
  • specified client-initiated half-close as a public API (to be implemented).
  • WebChannel: 1) new messageContentType option; 2) send() now takes raw strings.
  • Fix bug with nested testSuites rerun on the same page.
  • goog.debug.Logger no longer logs to an attached profiler log by default.
  • Introduces a workaround for window.open(..., 'noopener') which will cause the the URL to open in a new browser window with no bookmark bar or ability to add tabs. This is a known issue tracked here: https://github\.com/whatwg/html/issues/1902
  • Removed all instance of goog.log.info from the Closure's combobox component. This was the last ui component to still use goog.log.info in uncompiled code.
  • make webchannel close() work from react-native, which doesn't support sendBeacon or Image.
  • Make ObjectSerializer support camelCase in addition to underscore_delimited field names for serialized JSON.
  • add metadata dispatching support for WebChannel. See goog.net.WebChannel.MessageEvent.prototype.metadataKey
  • bug fix - stop IE from logging profile output to console.
  • Tighten the return type of installSafeStyleSheet().
  • Improve error message when a testing assertion method gets an incorrect number of arguments.
  • Make goog.debug.catchErrors() and goog.debug.ErrorReporter() play more nicely.
  • Update TRY currency symbol.
  • new WebChannel disableRedact option
  • Add a 1/2 second delay to allow the inappropriate synchronous test to work even though it should be async.
  • Add the new Belarusian ruble (BYN) to the tier 2 Closure currencies.
  • Provide safe API for Jsonp.
  • Annotates a callsite where the argument can never be null
  • DateTime.toUTCRfc3339String() will properly print milliseconds, padded with zeroes.
  • Improve accessibility for DatePicker widget:
  • Fix goog.globalEval in the event it runs in CSP compliant contexts.
  • Allow tests to be objects in addition to functions. This allows users to add additional setup and teardown methods.