Closed alanhogan closed 12 years ago
Though it happens even when there isn’t anything actually using response.js on the page. Maybe I’m a bad copy/paster. I’ll figure this out…
Eh it seems, though I’m not sure, that I wasn’t creating the test properly. Was using CoffeeScript and my closure might have been compiling to something just a bit different from what I intended.
@alanhogan I guess you figured out. The code in #10 definitely works, but in order to make it safe for compiling with the Closure Compiler in Advanced mode you'd have to assign the hash
property names using array notation:
var hash = {};
hash['lo'] = 0;
hash['med'] = 481;
hash['hi'] = 961;
Maybe the CoffeeScript compiler needs that too.
Thanks, Ryan. CoffeeScript doesn’t seem to need that, but I did switch to use this closure syntax:
(do (R = Response) -> stuff)
Which gets compiled to pretty much exactly the code in your example over at #10.
@alanhogan Sure thing—that CoffeeScript is hella terse. ;) I haven't got into it really but I like its minimal syntax.
The CoffeeScript site is a super handy reference and its realtime converter is aces for checking your understanding or the finer points of its conversion to JavaScript. I’m not a superpro, but do feel free to reach out to me if you have any CoffeeScript questions!
@alanhogan Right on =]
Tried to set up some responsive content following the pattern described in #10, but response.js is throwing an error
create @fn
.