fix the fix to city-list example autoscroll

TBR=esprehn

Review URL: https://codereview.chromium.org/760403002
This commit is contained in:
Rafael Weinstein 2014-11-27 12:44:24 -08:00
parent 034e19300d
commit 76ef4db5e4

View File

@ -31,7 +31,11 @@ window.startLoad = new Date().getTime();
<city-list></city-list>
<script>
var cityList = document.querySelector('city-list');
var scrollBy = Number(location.search.match(/auto=([0-9]+)/)[1]);
var scrollBy = 0;
var toks = location.search.match(/auto=([0-9]+)/);
if (toks) {
scrollBy = Number(toks[1]);
}
function autoScroll() {
cityList.scrollBy(scrollBy);