The Obsel/Trace API should offer a basic javascript wrapper that would at least allow to export a trace and also add new obsels.