Reputation: 10809
The test already exists in the github repo, but when I try to include it on my page I get an error, so I'm not sure how I need to include it in my document. In my html <head>
tag I link the modernizr script and then link to the test I am adding:
<script src="js/modernizr-2.5.3-min.js"></script>
<script src="js/css-pointerevents.js"></script>
When I load the page now I get a javascript error: Uncaught TypeError: Object #<Object> has no method 'addTest'
which must be a reference to the first line of css-pointervents.js (Modernizr.addTest('pointerevents', function(){
)
Upvotes: 2
Views: 3620
Reputation: 10809
It is because the addTest functionality is not included in the default base build of Modernizr . Need to add it specifically (under extensibility) http://modernizr.com/download/
Upvotes: 9