Skip to content

Commit

Permalink
tighten up emoji's detect for canvas for edge case false positives.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish committed Oct 3, 2011
1 parent 7333376 commit f454c96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion feature-detects/emoji.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Modernizr.addTest('emoji', function() {
var node = document.createElement('canvas');
if (!node.getContext) return false;
if (!(node.getContext && node.getContext('2d'))) return false;
var ctx = node.getContext('2d');
ctx.textBaseline = "top";
ctx.font = "32px Arial";
Expand Down

1 comment on commit f454c96

@josh
Copy link
Contributor

@josh josh commented on f454c96 Oct 3, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we use Modernizr['canvas']?

Please sign in to comment.