merge the changes of 

https://github.com/hypothesis/dom-text-mapper/issues/10
https://github.com/hypothesis/h/commit/4781620b051553887fb9e8f2f09d882381065853