diff options
author | Bjørn Erik Pedersen <[email protected]> | 2020-01-31 08:15:22 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2020-01-31 08:15:22 +0100 |
commit | b3f0674b80a32425aeb4412f318c720391bbf773 (patch) | |
tree | 35cdfe7c8dc354477dbed1952533c48c78a40809 /transform/livereloadinject/livereloadinject_test.go | |
parent | ef78a0d18a13098bcea1ff2b2d45d7388b8d41a0 (diff) | |
download | hugo-b3f0674b80a32425aeb4412f318c720391bbf773.tar.gz hugo-b3f0674b80a32425aeb4412f318c720391bbf773.zip |
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.
Diffstat (limited to 'transform/livereloadinject/livereloadinject_test.go')
-rw-r--r-- | transform/livereloadinject/livereloadinject_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/transform/livereloadinject/livereloadinject_test.go b/transform/livereloadinject/livereloadinject_test.go index ea1b3aa65..690db31c2 100644 --- a/transform/livereloadinject/livereloadinject_test.go +++ b/transform/livereloadinject/livereloadinject_test.go @@ -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) |