mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-12 20:13:59 +02:00
transform/livereloadinject: Add defer to livereload script tag
In #6821 we moved the loading from end of body to head to make Turbolinks and similar work. This commit adds a defer attribute to avoid page parse blocking.
This commit is contained in:
@@ -25,7 +25,7 @@ import (
|
||||
func TestLiveReloadInject(t *testing.T) {
|
||||
c := qt.New(t)
|
||||
|
||||
expectBase := `<script src="/livereload.js?port=1313&mindelay=10&v=2" data-no-instant></script>`
|
||||
expectBase := `<script src="/livereload.js?port=1313&mindelay=10&v=2" data-no-instant defer></script>`
|
||||
apply := func(s string) string {
|
||||
out := new(bytes.Buffer)
|
||||
in := strings.NewReader(s)
|
||||
|
Reference in New Issue
Block a user