aphex
aphex

Reputation: 3412

Control polymer element Rendering

Is it possible to control the rendering of an element in polymer? I do have multiple paper-tabs and I want to render only the visible content first and after that render it in the background or render it on visible. I want to optimize that, because I have a lot of elements in every tab and the rendering performance is not so good.

I'm using the latest polymer version 1.7

Edit: The hidden attribute of the web component doesn't effect the rendering.

Upvotes: 0

Views: 69

Answers (1)

a1626
a1626

Reputation: 2964

Here are some ways in which you can achieve this

  • Include elements of each tab inside a dom-if and make dom-if true only when tab is selected
  • Move all the elements/UI inside each tab into a new element and lazy load those elements only when tab is selected. You can lazy load elements using importHref

Upvotes: 0

Related Questions