GlobalEventHandlers.onpointerenter

这篇翻译不完整。请帮忙从英语翻译这篇文章

pointerenter 事件的全局事件处理器.

语法

var enterHandler = targetElement.onpointerenter;

返回值

enterHandler

      targetElement的pointerenter事件处理函数。

例子

这个例子展示了使用onpointerenter来设置元素pointerenter事件处理函数的两种方式

<html>
<script>
function enterHandler(ev) {
 // Process the pointerenter event
}
function init() {
 var el=document.getElementById("target1");
 el.onpointerenter = enterHandler;
}
</script>
<body onload="init();">
<div id="target1"> Touch me ... </div>
<div id="target2" onpointerenter="enterHandler(event)"> Touch me ... </div>
</body>
</html>

规范

规范 状态 备注
Pointer Events – Level 2
onpointerenter
Working Draft Non-stable version
Pointer Events
onpointerenter
Recommendation Initial definition

浏览器兼容性

We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 35[1] 59 (59) 10 -ms
11
? 未实现
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support ? 35[1] 29.0 (29)[2] 10 -ms
11
? 未实现

[1] 这是在bug 248918中实现。

[2] 依赖于dom.w3c_pointer_events.enabled属性, 默认值为 false

相关链接

文档标签和贡献者

 此页面的贡献者: lltemplar
 最后编辑者: lltemplar,