From 7f57684e2be9e8e9235597e9a616ea6eb96e90ba Mon Sep 17 00:00:00 2001 From: Deathamns Date: Fri, 31 Oct 2014 19:29:44 +0100 Subject: [PATCH] document.head isn't always available in Safari --- src/js/vapi-client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/vapi-client.js b/src/js/vapi-client.js index a58ed1419..1fc45351c 100644 --- a/src/js/vapi-client.js +++ b/src/js/vapi-client.js @@ -306,7 +306,7 @@ if (window.chrome) { "return block(u, 'xmlhttprequest') ? null : xo.apply(this, [].slice.call(arguments));", "};", "})();"].join(''); - document.head.removeChild(document.head.appendChild(tmpJS)); + document.documentElement.removeChild(document.documentElement.appendChild(tmpJS)); }; document.addEventListener('DOMSubtreeModified', firstMutation, true);