perf: postpone initializing site header
Postpone this step to the stage that DOM loaed, but img and css not
This commit is contained in:
parent
735c2ad48b
commit
4e3e599bbf
1 changed files with 3 additions and 2 deletions
|
@ -56,7 +56,7 @@
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
(function() {
|
function initHeader() {
|
||||||
var lastScrollY = getScrollPos().y;
|
var lastScrollY = getScrollPos().y;
|
||||||
var documentElement = document.documentElement;
|
var documentElement = document.documentElement;
|
||||||
|
|
||||||
|
@ -87,5 +87,6 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
storeScrollData();
|
storeScrollData();
|
||||||
})();
|
}
|
||||||
|
document.addEventListener('DOMContentLoaded', initHeader);
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in a new issue