开发者

Do any browsers support HTML5's context menu?

Do any browsers support th开发者_Go百科e HTML5 context menu attribute?


This has been added to Firefox 8.

See this for an example of it working https://bug617528.bugzilla.mozilla.org/attachment.cgi?id=554309


Right now, the contextmenu attribute is not supported by any browser version. According to caniuse.com it doesn't have support for any current browser versions (IE 9, Firefox 4, Safari 5, Chrome 11, Opera 11.1, or any mobile browsers - iOS, Opera, or Android). It is unknown if it will be supported in future versions.

It was discussed in April 2010 regarding adding it to Webkit. But it doesn't look like it's been added to the nightlies yet.


According to this wiki page for now there is no any popular layout engine except Firefox's Gecko that fully supports the menu element. Meanwhile, you can try some script solutions, like jQuery Context Menu Plugin.


You can use Modernizr for HTML5 feature detection.


It is working well here with Firefox 9.


Firefox 8 Aurora implements this feature. But unfortunately it doesn't seem to work for me now...


Pretty sure it's supported with a polyfill: https://github.com/medialize/jQuery-contextMenu

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜