2016-06-12 5 views

答えて

0

テスト用です。プロダクションでは使用しないでください。もちろん

(function() { 
    $.ajax({ 
     type: 'GET', 
     url: 'https://raw.githubusercontent.com/tj/co/master/index.js', 
     async: false, 
    }).done(function (source) { 
     var module = {exports: {}}; 
     var exports = module.exports; 
     eval(source); // run the source of co 
     window.co = module.exports; // bind co to window 
     console.log(window.co); 
    }).fail(function (xhr, textStatus, statusText) { 
     console.log(textStatus, statusText); 
    }) 
})(); 
0

あなたは、あなたが(regenerator pluginとバベルを使用して)あなたのコードをtranspileする必要がありますすることができ、それが正常に動作しています!

関連する問題