Use double quotes for JS strings
eslint won't enforce it inside that snippet, but hey, why not?
This commit is contained in:
parent
60c86a08c4
commit
c3b80c6b5b
@ -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)))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user