From 60ddc3176b2bb2c6b4fdcfb3ea9b611848df7b69 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 25 Mar 2016 14:26:40 +0530 Subject: [PATCH] ... --- src/pyj/srv.pyj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pyj/srv.pyj b/src/pyj/srv.pyj index c9a7f9a4b3..473bf5962d 100644 --- a/src/pyj/srv.pyj +++ b/src/pyj/srv.pyj @@ -60,7 +60,7 @@ is_running_in_iframe = False # Changed before script is loaded in the iframe if is_running_in_iframe: init() else: - main_js = document.scripts[0].textContent + main_js = (document.currentScript or document.scripts[0]).textContent # We wait for all page elements to load, since this is a single page app # with a largely empty starting document, we can use this to preload any resources # we know are going to be needed immediately.