From 20342974f717f55afbe07c855406e3921525eb9e Mon Sep 17 00:00:00 2001 From: Maxime BACONNAIS Date: Fri, 2 Dec 2016 13:06:21 +0100 Subject: [PATCH] Auto-execute InstantClick when the page is ready --- src/instantclick.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/instantclick.js b/src/instantclick.js index 1d07f01..706909c 100644 --- a/src/instantclick.js +++ b/src/instantclick.js @@ -810,3 +810,8 @@ var instantClick } }(document, location, navigator.userAgent); + +// Auto-launch when DOM content is loaded +document.addEventListener('DOMContentLoaded', function() { + InstantClick.init(); +});