web_view_crash.py
import sys
from PyQt4.QtGui import *
from PyQt4.QtCore import *
from PyQt4.QtWebKit import *
app = QApplication(sys.argv)
view = QWebView()
view.settings().setAttribute(QWebSettings.JavascriptEnabled, True)
view.load(QUrl('infinite_loop.html'))
view.show()
app.exec_()
infinite_loop.html
<script>
while(true) {
document.write('infinite loop...')}
</script>
I want to fix this from my python code, without touching the javascript. Can I kill the javascript somehow?
Edit: Both files are local.