I dynamically right to DOM. There is an anchor tag which has custom onclick method. The function assigned takes a local object. But on writing to the DOM, its getting treated as string. Hence, if Object as an object property, its causing a problem. What could be alternate to retain Object pass.