I am writing an extension in which I want to add some custom attribute to each tab when I receive chrome.tabs.onUpdated event. I tried to do so, but it's causing error.

How can I do this? Any idea on this. Please bear with me. I am new to chrome extension development.