Added right click event listener
This commit is contained in:
4
index.js
4
index.js
@@ -750,6 +750,10 @@ HTMLElement.prototype.onClick = function(func) {
|
|||||||
this.addEventListener("click", func)
|
this.addEventListener("click", func)
|
||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
HTMLElement.prototype.onRightClick = function(func) {
|
||||||
|
this.addEventListener("contextmenu", func)
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
HTMLElement.prototype.onHover = function(cb) {
|
HTMLElement.prototype.onHover = function(cb) {
|
||||||
this.addEventListener("mouseover", () => cb(true))
|
this.addEventListener("mouseover", () => cb(true))
|
||||||
|
|||||||
Reference in New Issue
Block a user