Specialized core Locator extensions for "HTML": CSS Selector, Partial CFI and DOM Range
danielweck opened this issue · 3 comments
danielweck commented
TODO: agree on naming, define the JSON Schema
For example:
{
"href": "http://example.com/chapter1",
"type": "text/html",
"title": "Chapter 1",
"locations": {
"progression": 0.8,
"fragments": [
"#paragraph-id",
"t=15"
],
"cssSelector": "body.rootClass div:nth-child(2) p#paragraph-id",
"partialCfi": "/4/2/8/6[paragraph-id]",
"domRange": {
"start": {
"cssSelector": "body.rootClass div:nth-child(2) p#paragraph-id",
"textNodeIndex": 0,
"offset": 11
},
"end": {
"cssSelector": "body.rootClass div:nth-child(2) p#paragraph-id",
"textNodeIndex": 0,
"offset": 22
}
}
}
}
danielweck commented
Let's continue to discuss the specifics of domRange
here:
#95
danielweck commented
llemeurfr commented
Specification moved to: https://github.com/readium/architecture/blob/master/models/locators/extensions/html.md