gpt4 book ai didi

html - chrome 和 firefox 是否很快支持指针事件(压力、倾斜、触摸等)?

转载 作者:太空宇宙 更新时间:2023-11-04 15:13:06 31 4
gpt4 key购买 nike

我正在 canvas 上编写应该支持平板电脑和触摸压力的网络应用程序。不过,如果我没记错的话,我相信只有IE10支持这些指针事件。我想知道 chrome 和 firefox 是否会很快支持它?

最佳答案

编辑:

Blink 团队有 changed their minds again 2015 年 3 月 25 日。他们最终决定实现指针事件。在撰写本文时,Apple 是唯一反对实现指针事件的主要浏览器供应商。

原答案:

Blink 团队(即 Chrome)在 2014 年 8 月 15 日表示他们不会实现此功能,标记为 issue 162757作为 WontFix。 Here's their full explanation.引用:

Very briefly, pointer events has 3 main drawbacks relative to the alternative:

1) Mobile-first web: Pointer events would likely never supplant touch events on the web (especially without support from Safari). Since touch events are here to stay, supporting another largely redundant input model has a high long-term complexity cost on the web platform.

2) Performance: The hit testing model required by pointer events imposes a non-trivial performance penalty (hit test on every movement event) that neither Android, iOS or touch events has. We're not willing to add any feature that increases the web's performance disadvantage relative to native mobile platforms.

3) Richness: Pointer events requires that scrolling and event handling are mutually exclusive. This precludes some UI effects which are common on on mobile platforms (eg. pull to refresh). Recently strong developer feedback has lead us to change Chrome in the opposite direction here - enabling event handling while scrolling (see issue 293467 ).

关于html - chrome 和 firefox 是否很快支持指针事件(压力、倾斜、触摸等)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17886073/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com