diff --git a/index.js b/index.js index 24f0e85..d9e987d 100644 --- a/index.js +++ b/index.js @@ -750,6 +750,10 @@ HTMLElement.prototype.onClick = function(func) { this.addEventListener("click", func) return this } +HTMLElement.prototype.onRightClick = function(func) { + this.addEventListener("contextmenu", func) + return this +} HTMLElement.prototype.onHover = function(cb) { this.addEventListener("mouseover", () => cb(true))