Black lives matter
Portrait Dr. Axel Rauschmayer
Dr. Axel Rauschmayer
Homepage | Twitter
Cover of book “JavaScript for impatient programmers”
Book, exercises, quizzes
(free to read online)
Cover of book “Deep JavaScript”
Book (50% free online)
Cover of book “Tackling TypeScript”
Book (first part free online)
Logo of newsletter “ES.next news”
Newsletter (free)

HTML5 context menus in the wild: Twitter’s “Follow” button

[2013-03-02] dev, html5, webdev
(Ad, please don’t block)

Twitter’s “Follow” button has an HTML5 context menu [1]. The button below allows you to try it out. On Firefox, you get a context menu whose top three items are “Follow”, “@rauschma on Twitter” and “Tweet to @rauschma”. Alas, other browsers don’t support the customization of context menus, yet.

jQuery contextMenu is a polyfill [2] that works on all browsers and uses HTML5 on Firefox. There are plans to parse HTML5, but they are waiting for a second HTML5 implementation before they do that.

References:

  1. HTML5 context menus in Firefox 8+
  2. What is the difference between a shim and a polyfill?