OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 cr.define('settings', function() { | |
6 | |
Dan Beam
2017/03/17 00:31:43
nit: no \n
dpapad
2017/03/17 20:53:55
Done.
| |
7 function ensureLazyLoaded() { | |
8 // Only trigger lazy loading, if we are in top-level Settings page. | |
9 if (window.location.href == 'chrome://md-settings/') { | |
Dan Beam
2017/03/17 00:31:43
nit: if (location.href == location.origin) {
gets
dpapad
2017/03/17 20:53:55
Done.
| |
10 suiteSetup(function() { | |
11 return new Promise(function(resolve, reject) { | |
Dan Beam
2017/03/17 00:31:43
nit: mention this needs to be basically exactly th
dpapad
2017/03/17 20:53:55
Done.
| |
12 Polymer.Base.importHref('/lazy_load.html', resolve, reject, true); | |
13 }); | |
14 }); | |
15 } | |
16 } | |
17 | |
18 return { | |
19 ensureLazyLoaded: ensureLazyLoaded, | |
20 }; | |
21 }); | |
OLD | NEW |