From 276b461ab2a3109eedec1e3b864ef74d998420f6 Mon Sep 17 00:00:00 2001 From: Kevin Pfeifer Date: Tue, 9 May 2023 20:17:58 +0200 Subject: [PATCH] remove turbolinks support --- webroot/js/inject-iframe.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/webroot/js/inject-iframe.js b/webroot/js/inject-iframe.js index 3e293fad..d84fe911 100644 --- a/webroot/js/inject-iframe.js +++ b/webroot/js/inject-iframe.js @@ -93,23 +93,14 @@ if (elem) { }; }; - // Bind on ready callbacks to DOMContentLoaded (native js) and turbolinks:load - // Turbolinks replaces the body and merges the head of an HTML page. + // Bind on ready callbacks to DOMContentLoaded (native js) // Since the body is already loaded (DOMContentLoaded), the event is not triggered. if (doc.addEventListener) { // This ensures that all event listeners get applied only once. if (!win.debugKitListenersApplied) { - // The DOMContentLoaded is for all pages that do not have Turbolinks doc.addEventListener('DOMContentLoaded', onReady, false); doc.addEventListener('DOMContentLoaded', proxyAjaxOpen, false); doc.addEventListener('DOMContentLoaded', proxyAjaxSend, false); - - // turbolinks:load is the alternative DOMContentLoaded Event of Turbolinks - // https://github.com/turbolinks/turbolinks - // https://github.com/cakephp/debug_kit/pull/664 - doc.addEventListener('turbolinks:load', onReady, false); - doc.addEventListener('turbolinks:load', proxyAjaxOpen, false); - doc.addEventListener('turbolinks:load', proxyAjaxSend, false); win.debugKitListenersApplied = true; } } else {