fix the fix to city-list example autoscroll
TBR=esprehn Review URL: https://codereview.chromium.org/760403002
This commit is contained in:
parent
034e19300d
commit
76ef4db5e4
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user