Implement dom.offset()
Implement caret positioning