Answer the question
In order to leave comments, you need to log in
Function scope of compiled coffeeScript file?
Good evening!
As you know, coffe, after compiling, creates a local scope for each function and for each file in which I need to have access to functions. I paste the files. But since all functions have a local scope, there are difficulties in using these functions.
So here's the question. How do I write in cs, some function names to the global scope and is it possible to do it in coffeescript?
Answer the question
In order to leave comments, you need to log in
Assign a function to an attribute of the window object:
window.hello_world = ()->
console.log "Hello World"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question