JSFiddle - React, Tailwind, and code Playground

HTML

<span  onclick="test_fn('aaa,bbb')" id="xx">edit</span>

JavaScript

document.getElementById('xx').setAttribute( "onClick", "test_fn('111,222')" );