metafizzy / fizzy-ui-utils

UI utilities & helpers
46 stars 14 forks source link

Safari 5.1 Windows Type Error #10

Closed JohnPett closed 6 years ago

JohnPett commented 6 years ago

I know this is an edge case, but this doesn't work in Windows Safari 5.1, there is this error in the console that stops it initialising.

image

It appears to be inside this function:


elems.forEach( function( elem ) {
      var attr = elem.getAttribute( dataAttr ) ||
        elem.getAttribute( dataOptionsAttr );
      var options;
      try {
        options = attr && JSON.parse( attr );
      } catch ( error ) {
        // log error, do not initialize
        if ( console ) {
          console.error( 'Error parsing ' + dataAttr + ' on ' + elem.className +
          ': ' + error );
        }
        return;
      }
      // initialize
      var instance = new WidgetClass( elem, options );
      // make available via $().data('namespace')
      if ( jQuery ) {
        jQuery.data( elem, namespace, instance );
      }
    });
desandro commented 6 years ago

Thanks for reporting this issue. fizzy-ui-utils does not support Safari 5.1. Sorry, there will not be a fix for this.