9.30.2013

SharePoint 2010 - Chrome Compatibility Fix

This little gem works really well at getting Chrome to load javascript correctly. IE8 does not like this and will throw an error.

<!--[if !IE]><!-->
<script type="text/javascript">
   window[addEventListener ? 'addEventListener' : 'attachEvent'](addEventListener ? 'load' : 'onload', function(){
    if(_spBodyOnLoadWrapper){
      _spBodyOnLoadWrapper();
    }
   });
</script>
<!--<![endif]--> 


http://royaltutorials.com/sharepoint-2010-javascriptribbon-not-working-in-chrome/
http://withinsharepoint.com/archives/256