Using Typekit.load{} - Javascript Language Basics

Javascript examples for Language Basics:Typekit

Description

Using Typekit.load{}

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript">
    window.onload=( function() {//from w  w w  .j  a  va  2 s  .  c  o m
function setGrid()
{
    console.log('inside setGrid');
}
try {
    Typekit.load({
        loading: function() { },
        active: function() { setGrid(); },
        inactive: function() { }
    })
} catch(e) {
    console.log('error') //works
    setGrid(); //doesn't get called
}
    });

      </script> 
   </head> 
   <body>  
   </body>
</html>

Related Tutorials