Eref parsing for javascript