Adapt caret to consider iframes as well - trying to address ichord/At.js#124

Signed-off-by: emanuele <emanuele45@gmail.com>