Fix userscripts

This commit is contained in:
Florian Bruhin 2016-07-27 17:05:24 +02:00
parent 5eca6e11a5
commit 49f57a5d7e
2 changed files with 6 additions and 1 deletions

View File

@ -547,7 +547,7 @@ class HintManager(QObject):
env = {
'QUTE_MODE': 'hints',
'QUTE_SELECTED_TEXT': str(elem),
'QUTE_SELECTED_HTML': elem.toOuterXml(),
'QUTE_SELECTED_HTML': elem.outer_xml(),
}
url = self._resolve_url(elem, context.baseurl)
if url is not None:

View File

@ -339,6 +339,11 @@ class WebElementWrapper(collections.abc.MutableMapping):
self._check_vanished()
return utils.compact_text(self._elem.toOuterXml(), 500)
def outer_xml(self):
"""Get the full HTML representation of this element."""
self._check_vanished()
return self._elem.toOuterXml()
def tag_name(self):
"""Get the tag name for the current element."""
self._check_vanished()