Created
          December 26, 2011 12:17 
        
      - 
      
- 
        Save hozumi/1521051 to your computer and use it in GitHub Desktop. 
    [ClojureScript] Wrapping all def into a load event handler
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | (defn init [] | |
| (def main (goog.dom/getElement "main")) | |
| (def mydiv (goog.dom/createDom "div")) | |
| (goog.dom/appendChild main mydiv) | |
| (defn change-color-mydiv [] | |
| (... mydiv))) | |
| (goog.events/listen js/window goog.events.EventType/LOAD init) | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment