Yes it is a reasonable expectation, that submit event is not called and methods can be called, but please read the Minor abstraction section of webshims. every problem you have is explained there not only for forms but also for all other polyfills.
Main issues: - Do not use inline event handlers! - Methods are only polyfilled if you opt-in to this (extendNative) (Because those consume a lot of memory) For methods the best option is to use webshims callProp extension.
- Remove unused Modernizr:
Code:
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script>
<script src="/branding/js-webshim/minified/polyfiller.js"></script>
<script>
//webshims.setOptions('extendNative', true); //either use this or use $.callProp
webshims.polyfill('forms');
</script>
- Remove inline event handler (those are beeing considered as bad bad practice)
Code:
<form class="validate">
<input name="texbox" type="text" required="required" />
<input type="submit" />
</form>
3.: Now use JS to do something with you form
Code:
$(function(){
//add events to submit and/or invalid
$('form.validate').on('submit invalid', function(){
if(window.console){
console.log(e.type)
}
if(e.type == 'submit' && !$(this).callProp('checkValidity')){
return false;
}
});
});