How to generate global, named javascript functions in coffeescript, for Google Apps Script

前端 未结 4 876
自闭症患者
自闭症患者 2020-12-20 15:39

I\'d like to write Javascript scripts for Google Apps Script using CoffeeScript, and I\'m having trouble generating functions in the expected form.

Google Apps Scrip

4条回答
  •  感动是毒
    2020-12-20 15:58

    CoffeeScript does not allow you to create anything in the global namespace implicitly; but, you can do this by directly specifying the global namespace.

    window.someFunc = (someParam) -> 
        alert(someParam)
    

提交回复
热议问题