Warning:
This wiki has been archived and is now read-only.

Events

From Open Annotation Community Group
Jump to: navigation, search

Native browser implementation of annotation events would be useful for annotation systems.

annotationstart

  • Type: annotationstart
  • Interface: AnnotationEvent
  • Sync / Async: Sync
  • Bubbles: Yes
  • Target: Element
  • Cancelable: No
  • Default action: None
  • Context info:
    • Event.target: target of the select event
    • UIEvent.view: defaultView, null
    • UIEvent.detail: 0

A user agent must dispatch this event after a select event has dispatched.

annotationend

  • Type: annotationend
  • Interface: AnnotationEvent
  • Sync / Async: Sync
  • Bubbles: Yes
  • Target: Element
  • Cancelable: No
  • Default action: None
  • Context info:
    • Event.target: target of the select event
    • Event.data: a list of space-separated URLs indicating the permalinks of the completed annotation, if available
    • UIEvent.view: defaultView, null
    • UIEvent.detail: 0

A user agent must dispatch this event when an annotation system completes or cancels the current annotation session, and the annotationend event must be dispatched after the annotation has been sent. If the privacy setting of the annotation was indicated as public, the Event.data property must be populated with a list of space-separated URLs indicating the permalinks of the completed annotation. The event must contain no other information about the annotation.

This event is dispatched immediately after the annotation system completes the annotation session (e.g., the input dialog is closed, minimized, switched out of focus, or otherwise dismissed, and the focus switched back to the document).