Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

WileyLabs/fragment-based-selection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fragment Identifiers for finding things in HTML

The Apache Annotator project is currently continuing the work on the Selectors and States work begun by the Web Annotation Working Group at the W3C.

These experiments take a slightly different approach, but follow a similar pattern of extensibility--both approaches follow the XPointer Framework syntax.

The approach taken here is to map existing JS APIs into the HTML Fragment Identifier space while leaving the door open to other selection systems in the future.

Selector examples--which you can test in index.html--are:

  • #querySelector(.content h3)
  • #querySelectorAll(.content li)
  • #evaluate(//*[@class='content']//li)

The next steps would be to turn the found elements into DOM Selection hilights and scroll the view port to the first visible element found following the process describe in Navigating to a fragment in HTML.

License

MIT

Releases

No releases published

Packages

No packages published