scharf / dom-text-mapper

A JavaScript library for mapping sub-strings of the string representation of an HTML document to individual DOM elements

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dom-text-mapper

A JavaScript library for mapping sub-strings of the string representation of an HTML document to individual DOM elements

The code traverses the DOM, and compares it to the text string what we get when the document is rendered, and collects info about which string slice belonds to each DOM elements.

Then it can provide mapping between string slices and DOM elements.

About

A JavaScript library for mapping sub-strings of the string representation of an HTML document to individual DOM elements

License:BSD 2-Clause "Simplified" License


Languages

Language:JavaScript 60.2%Language:CoffeeScript 39.8%