I created a WebSocket connection to my webserver to receive some data. However, when I log the event that I receive in the onmessage function, then I cannot see the real content of the data. When I …
Tag: coffeescript
Twitter Bootstrap tab shown event not firing on page load
In a page where I have n tabs, and the following script (coffeescript, I checked the compiled javascript and it seems to be ok)… $ -> init() init = -> $(‘a[data-toggle=”tab”]’).on ‘…
Why does an anonymous function get called, whereas a named function doesn’t?
I’m creating a CoffeeScript application that overlays a webcam video with a canvas element (this is just for context and doesn’t seem to relate to my problem though). To get the proper canvas size to …
Get callback in CoffeeScript with library
I am using the YouTube API to embed a video on a page. I call swfobject.embedSWF which embeds the video on the page, it works. When it is done loading, the API is supposed to call …
Remove a value from an array in CoffeeScript
I have an array: array = […, “Hello”, “World”, “Again”, …] How could I check if “World” is in the array? Then remove it if it exists? And have a reference …