Skip to content

Commit

Permalink
Added check for context menu support as introduced in Firefox 8+
Browse files Browse the repository at this point in the history
  • Loading branch information
codepo8 committed Nov 24, 2011
1 parent 2746f43 commit 1c70a42
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions feature-detects/contextmenu.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Modernizr.addTest(
'contextmenu',
('contextMenu' in document.body && 'HTMLMenuItemElement' in window)

This comment has been minimized.

Copy link
@SlexAxton

SlexAxton Feb 6, 2012

Member

I'm running some light tests against all the community tests and this one seems to fail for me when it's in the <head> element.

screenshot

This comment has been minimized.

Copy link
@paulirish

paulirish Feb 6, 2012

Member

cc @addyosmani .. need to update this to use docElem or something

);

// Demo at http://thewebrocks.com/demos/context-menu/



0 comments on commit 1c70a42

Please sign in to comment.