Use double quotes for JS strings

eslint won't enforce it inside that snippet, but hey, why not?
This commit is contained in:
Florian Bruhin 2016-09-07 11:48:34 +02:00
parent 60c86a08c4
commit c3b80c6b5b

View File

@ -139,9 +139,9 @@ class WebKitElement(webelem.AbstractWebElement):
raise webelem.Error("Element is not editable!")
log.misc.debug("Inserting text into element {!r}".format(self))
self._elem.evaluateJavaScript("""
var text = '{}';
var event = document.createEvent('TextEvent');
event.initTextEvent('textInput', true, true, null, text);
var text = "{}";
var event = document.createEvent("TextEvent");
event.initTextEvent("textInput", true, true, null, text);
this.dispatchEvent(event);
""".format(javascript.string_escape(text)))