Is there a way to send CoffeeScript to the client's browser and have it compiled to JavaScript *there*?

后端 未结 3 1001
栀梦
栀梦 2020-11-29 02:03

Is there a way to send CoffeeScript to the client\'s browser and have it compiled to JavaScript there?



        
3条回答
  •  渐次进展
    2020-11-29 02:28

    
    
      
        
        CoffeScript on browser
      
      
        
        
      
    
    
    • CoffeeScript has to be loaded after the script you want to run.
    • if using src you must be able to access the file via XMLHTTPRequest, in particular it fails on browsers with file://.

提交回复
热议问题