Search completed in 0.86 seconds.
15 results for "oncontextmenu":
GlobalEventHandlers.oncontextmenu - Web APIs
the
oncontextmenu property of the globaleventhandlers mixin is an eventhandler that processes contextmenu events.
... syntax target.
oncontextmenu = functionref; value functionref is a function name or a function expression.
... only one
oncontextmenu handler can be assigned to an object at a time.
...And 2 more matches
XUL accessibility guidelines - Archive of obsolete content
use the
oncontextmenu event handler or the context attribute to create context menus.
...the
oncontextmenu event and context attribute work with the correct platform-specific context menu triggers, including the keyboard button and appropriate mouse clicks.
... context menus context menus are triggered by the
oncontextmenu event handler.
XRReferenceSpace.getOffsetReferenceSpace() - Web APIs
note also that we set
oncontextmenu up to be ignored by calling preventdefault() on those events.
... canvas.
oncontextmenu = (event) => { event.preventdefault(); }; canvas.addeventlistener("mousemove", (event) => { if (event.buttons & 2) { rotateviewby(event.movementx, event.movementy); } }); next, the rotateviewby() function, which updates the mouse look direction's yaw and pitch based on the mouse delta values from the mousemove event.
ContextMenus - Archive of obsolete content
<hbox id="container" align="center"
oncontextmenu="..."> <label value="name:"/> <textbox id="name"/> </hbox> in this example, an attempt to open a context menu anywhere inside the hbox will call the event listener attached using the
oncontextmenu attribute.
Document - Web APIs
globaleventhandlers.
oncontextmenu is an eventhandler representing the code to be called when the contextmenu event is raised.
Element: auxclick event - Web APIs
; let html = document.queryselector('html'); function random(number) { return math.floor(math.random() * number); } function randomcolor() { return `rgb(${random(255)}, ${random(255)}, ${random(255)})`; } button.onclick = function() { button.style.backgroundcolor = randomcolor(); }; button.onauxclick = function(e) { e.preventdefault(); button.style.color = randomcolor(); } button.
oncontextmenu = function(e) { e.preventdefault(); } notice that in addition to capturing the auxclick event using onauxclick, the contextmenu event is also captured, and preventdefault() called on that event, in order to prevent the context menu from popping up after the color change is applied.
Element: contextmenu event - Web APIs
bubbles yes cancelable yes interface mouseevent event handler property
oncontextmenu examples in this example, the default action of the contextmenu event is canceled using preventdefault() when the contextmenu event is fired at the first paragraph.
GlobalEventHandlers - Web APIs
globaleventhandlers.
oncontextmenu is an eventhandler representing the code to be called when the contextmenu event is raised.
Index - Web APIs
1489 globaleventhandlers.
oncontextmenu api, event handler, globaleventhandlers, html dom, property, reference the
oncontextmenu property of the globaleventhandlers mixin is an eventhandler that processes contextmenu events.
MouseEvent.button - Web APIs
example html <button id="button"
oncontextmenu="event.preventdefault();">click here with your mouse...</button> <p id="log"></p> javascript let button = document.queryselector('#button'); let log = document.queryselector('#log'); button.addeventlistener('mouseup', logmousebutton); function logmousebutton(e) { if (typeof e === 'object') { switch (e.button) { case 0: log.textcontent = 'left button clicked.'; break...
Window - Web APIs
globaleventhandlers.onclose called after the window is closed globaleventhandlers.
oncontextmenu called when the right mouse button is pressed globaleventhandlers.onerror called when a resource fails to load or when an error occurs at runtime.
Global attributes - HTML: Hypertext Markup Language
the event handler attributes: onabort, onautocomplete, onautocompleteerror, onblur, oncancel, oncanplay, oncanplaythrough, onchange, onclick, onclose,
oncontextmenu, oncuechange, ondblclick, ondrag, ondragend, ondragenter, ondragexit, ondragleave, ondragover, ondragstart, ondrop, ondurationchange, onemptied, onended, onerror, onfocus, oninput, oninvalid, onkeydown, onkeypress, onkeyup, onload, onloadeddata, onloadedmetadata, onloadstart, onmousedown, onmouseenter, onmouseleave, onmousemove, onmouseout, onmouseover, onmouseup, onmousewheel, onpause, onplay, o...