Commit ec6ebfa2 authored by Thomas Lukaszewicz's avatar Thomas Lukaszewicz Committed by Commit Bot

WebUI: Update the Polymer3 bundle to include mixinBehaviors

Include mixinBehaviors from polymer/lib/legacy/class.js to
allow reuse of Polymer behaviors with the non-legacy class
based Polymer3 syntax.

Increase in the minified bundle by 125 bytes.

Bug: 1099917
Change-Id: Ia9c51e5a5672926d922fd0f66fb26d9fbcb760f4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2324810
Commit-Queue: Thomas Lukaszewicz <tluk@chromium.org>
Reviewed-by: default avatardpapad <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#792851}
parent 6b835fc4
......@@ -11647,6 +11647,25 @@ function copyProperties(source, target, excludeProps) {
}
}
/**
* Applies a "legacy" behavior or array of behaviors to the provided class.
*
* Note: this method will automatically also apply the `LegacyElementMixin`
* to ensure that any legacy behaviors can rely on legacy Polymer API on
* the underlying element.
*
* @function
* @template T
* @param {!Object|!Array<!Object>} behaviors Behavior object or array of behaviors.
* @param {function(new:T)} klass Element class.
* @return {?} Returns a new Element class extended by the
* passed in `behaviors` and also by `LegacyElementMixin`.
* @suppress {invalidCasts, checkTypes}
*/
function mixinBehaviors(behaviors, klass) {
return GenerateClassFromInfo({}, LegacyElementMixin(klass), behaviors);
}
// NOTE:
// 1.x
// Behaviors were mixed in *in reverse order* and de-duped on the fly.
......@@ -15020,4 +15039,4 @@ Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
export { Base, Debouncer, DomIf, OptionalMutableDataBehavior, Polymer, PolymerElement, TemplateInstanceBase, Templatizer, afterNextRender, animationFrame, beforeNextRender, calculateSplices, dashToCamelCase, dom, enqueueDebouncer, flush, gestures$1 as gestures, html, idlePeriod, matches, microTask, templatize, translate, useShadow };
export { Base, Debouncer, DomIf, OptionalMutableDataBehavior, Polymer, PolymerElement, TemplateInstanceBase, Templatizer, afterNextRender, animationFrame, beforeNextRender, calculateSplices, dashToCamelCase, dom, enqueueDebouncer, flush, gestures$1 as gestures, html, idlePeriod, matches, microTask, mixinBehaviors, templatize, translate, useShadow };
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -8,21 +8,23 @@ Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
export {afterNextRender, beforeNextRender} from './lib/utils/render-status.js';
export {animationFrame, idlePeriod, microTask} from './lib/utils/async.js';
import * as gestures from './lib/utils/gestures.js';
export {gestures};
export {Base} from './polymer-legacy.js';
export {dashToCamelCase} from './lib/utils/case-map.js';
export {Debouncer, enqueueDebouncer} from './lib/utils/debounce.js';
export {dom, flush} from './lib/legacy/polymer.dom.js';
export {DomIf} from './lib/elements/dom-if.js';
export {html} from './lib/utils/html-tag.js';
export {matches, translate} from './lib/utils/path.js';
export {mixinBehaviors} from './lib/legacy/class.js';
export {OptionalMutableDataBehavior} from './lib/legacy/mutable-data-behavior.js';
export {Polymer} from './lib/legacy/polymer-fn.js';
export {PolymerElement} from './polymer-element.js';
export {TemplateInstanceBase, templatize} from './lib/utils/templatize.js';
export {dom, flush} from './lib/legacy/polymer.dom.js';
export {Templatizer} from './lib/legacy/templatizer-behavior.js';
export {calculateSplices} from './lib/utils/array-splice.js';
export {animationFrame, idlePeriod, microTask} from './lib/utils/async.js';
export {dashToCamelCase} from './lib/utils/case-map.js';
export {Debouncer, enqueueDebouncer} from './lib/utils/debounce.js';
export {html} from './lib/utils/html-tag.js';
export {matches, translate} from './lib/utils/path.js';
export {afterNextRender, beforeNextRender} from './lib/utils/render-status.js';
export {useShadow} from './lib/utils/settings.js';
export {TemplateInstanceBase, templatize} from './lib/utils/templatize.js';
export {PolymerElement} from './polymer-element.js';
export {Base} from './polymer-legacy.js';
export {gestures};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment