eric7/WebBrowser/WebBrowserView.py

branch
eric7
changeset 8687
f671fd72dfb6
parent 8637
394377638256
child 8692
9c72f9bc9d72
equal deleted inserted replaced
8686:af2ee3a303ac 8687:f671fd72dfb6
388 388
389 def unselect(self): 389 def unselect(self):
390 """ 390 """
391 Public slot to clear the current selection. 391 Public slot to clear the current selection.
392 """ 392 """
393 try: 393 self.triggerPageAction(QWebEnginePage.WebAction.Unselect)
394 self.triggerPageAction(QWebEnginePage.WebAction.Unselect)
395 except AttributeError:
396 # prior to 5.7.0
397 self.page().runJavaScript(
398 "window.getSelection().empty()",
399 WebBrowserPage.SafeJsWorld)
400 394
401 def isForwardAvailable(self): 395 def isForwardAvailable(self):
402 """ 396 """
403 Public method to determine, if a forward move in history is possible. 397 Public method to determine, if a forward move in history is possible.
404 398

eric ide

mercurial