DOMAnnotations
Nick Stenning, Hypothesis Project
What is the smallest useful low-level component in a client-side API for annotation?
Document
Annotation application
Annotation application
Annotation application
Annotations
Document
Annotation application
Annotation application
Annotation application
How can I attach annotations to parts of the DOM?
How can I retrieve annotations associated with parts of the DOM?
How can I be notified when annotations are attached/changed/removed?
DOMAnnotations
What would such an API might look like as part of a browser?
A “straw man” proposal. Pick holes in it.
document.createAnnotation()
document.getAnnotations(nodes)
document.removeAnnotation(annotation)
Annotation#addTarget(target)
Annotation#addBody(body)
DOM Events
annotationcreate
annotationchange
annotationremove
DEMO
Not intended to help you with storage/persistence/retrieval.
Not intended to help you with fuzzy anchoring.
Not necessarily intended to help you with serialization.
A reflection of document-annotation state.
Questions for you
DOMAnnotations