QtWebEngine: Implement webelem.classes

This commit is contained in:
Florian Bruhin 2016-09-07 12:31:48 +02:00
parent 522049132b
commit fca37abf55
3 changed files with 2 additions and 3 deletions

View File

@ -71,8 +71,7 @@ class WebEngineElement(webelem.AbstractWebElement):
def classes(self):
"""Get a list of classes assigned to this element."""
log.stub()
return []
return self._js_dict['class_name'].split()
def tag_name(self):
"""Get the tag name of this element.

View File

@ -36,6 +36,7 @@ window._qutebrowser.webelem = (function() {
"text": elem.text,
"tag_name": elem.tagName,
"outer_xml": elem.outerHTML,
"class_name": elem.className,
"rects": [], // Gets filled up later
};

View File

@ -139,7 +139,6 @@ Feature: Using hints
# The actual check is already done above
Then no crash should happen
@qtwebengine_todo: webelem.classes is not implemented yet
Scenario: Hinting with ACE editor
When I open data/hints/ace/ace.html
And I hint with args "inputs" and follow a