Ah, good call. 

All the added xref and undefined function checks fail without `erlang_js` being enabled by default in the rebar.config. They rightly declare that the functions are undefined. I pulled this out while doing the work, intending it to be temporary, but forgot that I'd done it. 

For all the added compiler warnings to be in place this JS code needs to:

  * have `erlang_js` enabled by default
  * be commented out 
  * be removed

I didn't investigate how hard it would be to enable `erlang_js` by default; I could do that. Thoughts?