* Whether this is allowed to render when not in viewport. * @return {boolean}
()
| 792 | * @return {boolean} |
| 793 | */ |
| 794 | renderOutsideViewport() { |
| 795 | // The exception is for owned resources, since they only attempt to |
| 796 | // render outside viewport when the owner has explicitly allowed it. |
| 797 | // TODO(jridgewell, #5803): Resources should be asking owner if it can |
| 798 | // prerender this resource, so that it can avoid expensive elements wayyy |
| 799 | // outside of viewport. For now, blindly trust that owner knows what it's |
| 800 | // doing. |
| 801 | this.resolveDeferredsWhenWithinViewports_(); |
| 802 | return ( |
| 803 | this.hasOwner() || |
| 804 | this.isWithinViewportRatio(this.element.renderOutsideViewport()) |
| 805 | ); |
| 806 | } |
| 807 | |
| 808 | /** |
| 809 | * Whether this is allowed to render when scheduler is idle but not in |
no test coverage detected