webfont loader - Trouble understanding Firefox error: SyntaxError: missing } after property list -


i have following script provides local server fallback fonts:

<!-- load fonts via webfont.js local fallback: https://github.com/typekit/webfontloader --> <script src="//ajax.googleapis.com/ajax/libs/webfont/1.4.7/webfont.js"></script> <script>window.webfont || document.write('<script src="../assets/js/webfont.js"><\/script>')</script> <script>   webfont.load({      // load fonts cdn     google: {       families: ['flamenco']     },     custom: {       families: ['fontawesome'],       urls: [ '//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css' ]     }      // load server fallback if cdn unavailable     fontinactive: function (family, fvd) {       if (family === 'flamenco' || 'fontawesome') {         webfont.load({           custom: {             families: ['flamenco', 'fontawesome'],             urls: [ '../assets/fonts/local-fonts.css' ]           }         })       }     },   }); </script> 

but firefox states line missing closing }

fontinactive: function (family, fvd) {

for life of me can't work out what's wrong sorry - i'm sure there's stupid error somewhere.

any pointers in right direction appreciated.

cheers

sorry, had copied function bottom , forgotten commas - plus fontinactive needs go first think.

corrected script ref:

<!-- load fonts via webfont.js local fallback: https://github.com/typekit/webfontloader --> <script src="//ajax.googleapis.com/ajax/libs/webfont/1.4.7/webfont.js"></script> <script>window.webfont || document.write('<script src="../assets/js/webfont.js"><\/script>')</script> <script>   webfont.load({      // load server fallback if cdn unavailable     fontinactive: function (family, fvd) {       if (family === 'flamenco' || 'fontawesome') {         webfont.load({           custom: {             families: ['flamenco', 'fontawesome'],             urls: [ '../assets/fonts/local-fonts.css' ]           }         })       }     },      // load fonts cdn     google: {       families: ['flamenco']     },     custom: {       families: ['fontawesome'],       urls: [ '//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css' ]     }   }); </script> 

Comments

Popular posts from this blog

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

php - render data via PDO::FETCH_FUNC vs loop -

The canvas has been tainted by cross-origin data in chrome only -