Merge branch 'paretje-webengine-setitem'
This commit is contained in:
commit
b3620a99ff
@ -47,7 +47,10 @@ class WebEngineElement(webelem.AbstractWebElement):
|
||||
return attrs[key]
|
||||
|
||||
def __setitem__(self, key, val):
|
||||
log.stub()
|
||||
self._js_dict['attributes'][key] = val
|
||||
js_code = javascript.assemble('webelem', 'set_attribute', self._id,
|
||||
key, val)
|
||||
self._tab.run_js_async(js_code)
|
||||
|
||||
def __delitem__(self, key):
|
||||
log.stub()
|
||||
|
@ -155,5 +155,9 @@ window._qutebrowser.webelem = (function() {
|
||||
return serialize_elem(elem);
|
||||
};
|
||||
|
||||
funcs.set_attribute = function(id, name, value) {
|
||||
elements[id].setAttribute(name, value);
|
||||
};
|
||||
|
||||
return funcs;
|
||||
})();
|
||||
|
Loading…
Reference in New Issue
Block a user