Re: [Clojurescript] .getElementById returns NULL

2016-01-05 Thread Nathan Smutz
Thanks Francis, that did it. Rookie mistake, that. I wonder if there's ever enough page content to make it worth just delaying the DOM hooks. On Sunday, January 3, 2016 at 7:49:39 PM UTC-8, Francis Avila wrote: > > Your problem is unrelated to clojurescript. > > Your script runs before the bo

[Clojurescript] .getElementById returns NULL

2016-01-03 Thread Francis Avila
Your problem is unrelated to clojurescript. Your script runs before the body is loaded, so the test-content element doesn't exist yet. Either load your script at the end of the body, or wrap your code in a document.onload event handler. -- You received this message because you are subscribed

Re: [Clojurescript] .getElementById returns NULL

2016-01-03 Thread Ryan Fowler
On Sun, Jan 3, 2016 at 8:04 PM, Nathan Smutz wrote: > > (.log js/console (. js/document getElementById "test-content")) > > ​I suspect you need something more like this: ​ (.log js/console (.getElementById js/document "test-content"))​ -- You received this message because you are subscribe

[Clojurescript] .getElementById returns NULL

2016-01-03 Thread Nathan Smutz
Sorry if this is something trivial. I tried to do some due diligence googling with no luck. The function getElementById seems to be returning null where it shouldn't. I'm currently using lein-cljsbuild 1.1.2 clojure 1.7.0 clojurescript 1.7.170 and compiling with optimizations: :none Here's my