Using pure JS to call PAF