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>
css-pointerevents.js
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(){
)
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>
css-pointerevents.js
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(){
)
1 Answer
Reset to default 9It is because the addTest functionality is not included in the default base build of Modernizr . Need to add it specifically (under extensibility) http://modernizr./download/
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744249944a4565121.html
评论列表(0条)