wmf.setReferenceHandler(referenceHandler)
referenceHandler would be a function that takes something along the lines of {id: "id2", adjacent_reference_ids: ["id1", "id2", "id3"]} where adjacent_reference_ids are any references next to the tapped reference [1][2][3]
When a reference is tapped, the referenceHandler is called with the appropriate information. This should be similar to the other interfaces between the web and the apps - T217352, T201382, T218049, etc