chimee
chimee copied to clipboard
pointer-event 兼容性 bug
chimee 的兼容性支持到 ie 多少? 透明插件使用的 pointer-events 兼容性到 ie 11。
video播放器IE9开始支持
chimee 到 ie9,但是需要 babel-polyfill.
pointer-events 这个现在真没兼容。。。周末弄一下
https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-Browser-Polyfills#pointer-events-api
上面那个包好像自定义元素的事件,好像不可以 polyfill 得重新看下
如果确实不可以的话,就得等了。
https://github.com/screeny05/jquery.pointer-events-polyfill https://github.com/Rich-Harris/Points https://github.com/kmewhort/pointer_events_polyfill https://github.com/jquery/PEP
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<!--[if IE 9 ]>
<script src="http://lib.baomitu.com/jquery/1.9.0/jquery.min.js"></script>
<script src="./demo03.js">
</script>
<script>
$(document).ready(function(){
PointerEventsPolyfill.initialize();
});
</script>
<![endif]-->
<title>Document</title>
<style>
#ap {
pointer-events: none;
height: 100px;
width: 100%;
}
</style>
</head>
<body>
<div id="ap">
</div>
<script>
// 不可以阻止
document.getElementById('ap').onclick = function (e) {
console.log(111)
}
// 可以阻止
$('#ap').onclick = function () {
console.log(222)
}
</script>
</body>
</html>
试了下。 核心是使用 jquery 事件 的return false
这个。这个在 jquery 环境下,是可以做到的。这个用 jquery 注册的事件的话,是可以阻止后面的事件执行。
单用 js 写的话, 不行。
不过按照现有的方式,给 chimee-helper-events 也加一个 return false 的判断逻辑。 也可以实现。
如果改造成本不大的话,那就实现下吧~
hls直播 IE支持吗?