HTMLElement: pointerover event
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2020.
Событие pointerover
когда указатель входит в границы элемента обрабатываемого события.
Bubbles | Yes |
---|---|
Cancelable | Yes |
Interface | PointerEvent |
Event handler property |
onpointerover
|
Примеры
С использованием addEventListener()
:
js
const para = document.querySelector("p");
para.addEventListener("pointerover", (event) => {
console.log("Pointer moved in");
});
С использованием свойство элемента onpointerover
:
js
const para = document.querySelector("p");
para.onpointerover = (event) => {
console.log("Pointer moved in");
};
Спецификации
Specification |
---|
Pointer Events # the-pointerover-event |
Pointer Events # dom-globaleventhandlers-onpointerover |
Совместимость с браузерами
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
pointerover event |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- Requires a vendor prefix or different name for use.
- Has more compatibility info.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Смотрите также
gotpointercapture
lostpointercapture
pointerenter
pointerdown
pointermove
pointerup
pointercancel
pointerout
pointerleave
onpointerover
свойство-обработчик события- Событие на элементах
Document
: событиеpointerover