Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specialized core Locator extensions for "HTML": CSS Selector, Partial CFI and DOM Range #99

Open
danielweck opened this issue Jun 5, 2019 · 3 comments

Comments

@danielweck
Copy link
Member

danielweck commented Jun 5, 2019

Follow-up from: #98 and #95

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
Copy link
Member Author

Let's continue to discuss the specifics of domRange here:
#95

@danielweck
Copy link
Member Author

@llemeurfr
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants