JSFiddle - React, Tailwind, and code Playground
HTML
<a href="">Hello</a>
JavaScript
var whateverFunctionYouWant = function() {
alert('Hello, you called?');
};
(function() {
var elementSetAttribute = Element.prototype.setAttribute;
Element.prototype.setAttribute = function() {
whateverFunctionYouWant.call(this);
return elementSetAttribute.apply(this, arguments);
}
})();
document.links[0].setAttribute('title', 'Hello');