
Polymer (as well as webcomponents-lite) perform some initialization in handlers for the `requestAnimationFrame` callback for performance reasons. The principal drawback of this approach is that pages will not render in background tabs (such as tabs created by Ctrl+Click-ing a link) because the rAF system will not offer a frame until the tab has been foregrounded. With this change, PolyGerrit pages are rendered in the background by calling a private function that tweaks the internal state of the Polymer rendering mechanism to bypass the rAF callback (on the Polymer team's advice). Because GR-ROUTER depended on the `webcomponentsready` event, which had been polyfilled by webcomponents-light inside another rAF callback, it is refactored to initialize the router inside a Polymer instance method. Bug: Issue 4334 Change-Id: I8fa43e37199848e053225626406e31613c20deda
24 lines
952 B
HTML
24 lines
952 B
HTML
<!--
|
|
Copyright (C) 2016 The Android Open Source Project
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
-->
|
|
<link rel="import" href="../../../bower_components/polymer/polymer.html">
|
|
<link rel="import" href="../../shared/gr-rest-api-interface/gr-rest-api-interface.html">
|
|
<link rel="import" href="../gr-reporting/gr-reporting.html">
|
|
|
|
<dom-module id="gr-router">
|
|
<script src="../../../bower_components/page/page.js"></script>
|
|
<script src="gr-router.js"></script>
|
|
</dom-module>
|