From 0987c28226714633a470b8b8a7ee89de9c7f6bc9 Mon Sep 17 00:00:00 2001 From: Dmitry Shachnev Date: Sun, 18 Dec 2022 18:31:53 +0300 Subject: [PATCH] webeneginepreview: Allow to load iframes such as YouTube embeds Fixes #604. --- ReText/webenginepreview.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ReText/webenginepreview.py b/ReText/webenginepreview.py index 5fe3a26c..eeb21807 100644 --- a/ReText/webenginepreview.py +++ b/ReText/webenginepreview.py @@ -70,6 +70,8 @@ def javaScriptConsoleMessage(self, level, message, lineNumber, sourceId): print("level=%r message=%r lineNumber=%r sourceId=%r" % (level, message, lineNumber, sourceId)) def acceptNavigationRequest(self, url, type, isMainFrame): + if not isMainFrame: + return True if url.scheme() == "data": return True if url.isLocalFile():