title: Coffeescript inline conditionals
body: <p>I have this piece of coffeescript which is compiling fine, yet it does actually work as it should.</p>
  
  <pre><code>jQuery ($) -&gt;
      eventMethod = window.addEventListener ? "addEventListener" : "attachEvent"
      eventer = window[eventMethod]
      messageEvent = eventMethod == "attachEvent" ? "onmessage" : "message"
  
  
  # Listen to message from child window
  eventer messageEvent, (e) -&gt;
      console.log "parent received message!:  #{e.data}"
      newHeight = e.data
      $("#cf-iframe").css("height", newHeight)
  , false
  </code></pre>
  
  <p>messageEvent is undefined or false causing an error. Could someone please advise of how to get around this. I'm fairly new to coffeescript, but loving it so far.</p>
  
  <p><strong>Update:</strong> upon further inspection it looks to me like coffeescript does not implement the ?/: operators, instead favouring the if/then/else approach.</p>