Closed Timmy000 closed 11 years ago
Hi Timmy,
while this is definitely a useful addition, I am hesitant to diverge even more from the original server. In general, I don't really like the idea of the capybara.js file, which is hardcoded into the server. A more flexible approach (which you can easily use without extending either the server or the dryscrape lib) would be:
def has_focus(node):
return node.eval_script("node == document.activeElement")
def set_focus(node):
node.exec_script("document.activeElement = node")
Fair enough, I'll use the snippet you've suggested.
Hi niklasb,
I ended up adding this set of functions to my local copy of webkit server.
Any chance you want to include them (or something like them) in the main repo?