https://github.com/Polymer/polymer/pull/4821 addressed the fact that <dom-repeat> and <dom-if> elements can participate in e.g. flexbox and other selectors inadvertently, which was a change from Polymer 1.x where these were <template> type extensions, by adding this.style.display = 'none' to the elements' lifecycle. Although it fixed the issue, it unfortunately has been found to add a measurable tax to element boot-up, particularly on Edge, which is unfortunate if e.g. flexbox issues can otherwise be avoided.
This issue is to only set display: none when not running under the legacyOptimizations flag, as a way to opt-out of the correct behavior to optimize for performance.
Description
https://github.com/Polymer/polymer/pull/4821 addressed the fact that
<dom-repeat>
and<dom-if>
elements can participate in e.g. flexbox and other selectors inadvertently, which was a change from Polymer 1.x where these were<template>
type extensions, by addingthis.style.display = 'none'
to the elements' lifecycle. Although it fixed the issue, it unfortunately has been found to add a measurable tax to element boot-up, particularly on Edge, which is unfortunate if e.g. flexbox issues can otherwise be avoided.This issue is to only set
display: none
when not running under thelegacyOptimizations
flag, as a way to opt-out of the correct behavior to optimize for performance.